Skip to content
Browse documentation

OpenAPI operations

Read an agent.run log

GET
/v1/tasks/runs/{runId}/log
curl --request GET \
--url 'https://api.hooks.events/v1/tasks/runs/example/log?step=example&download=1' \
--header 'Authorization: Bearer <token>'

Returns the tail of the log stored for one agent.run step. Add ?step=<stepId> to choose the step, and ?download=1 for the full log as text/plain. Steps without a captured log return 404 RUN_LOG_NOT_FOUND.

runId
required
string
step
required
string

Step id of the agent.run step.

download
string
Allowed values: 1

Return the full stored log as text/plain instead of the JSON tail.

Success

Agent run log tail

object
stepId
required
string
bytes
required

Stored bytes across every chunk

integer
>= -9007199254740991 <= 9007199254740991
truncated
required

True once the 8 MiB step cap cut the log

boolean
complete
required

True after the agent callback was accepted

boolean
text
required

Last 100 KiB of the log

string
key
additional properties

Example generated

{
"stepId": "example",
"bytes": 1,
"truncated": true,
"complete": true,
"text": "example"
}

Validation error

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}

Missing or invalid credentials

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}

The credential lacks the required scope, or the workspace is not writable

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}

Resource not found

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}

Rate limited

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}
X-RateLimit-Limit
integer

Requests allowed per window

X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer

Seconds until the window resets

Retry-After
integer

Seconds to wait before retrying. Absent when the rejection has no retry time (for example the Free lifetime quota).

X-Quota-Limit
integer

Request allowance for the workspace’s plan

X-Quota-Remaining
integer

Requests left in the allowance after this request