Skip to navigation

Answer a hold

View as Markdown

Sends the answer of a person to a hold of a run. Only the credential that started the run can send it. The answer comes at the next stop of the run, or at the end of the wait: Prefer: wait=N (1 to 90), default 30 seconds. A run that ended gives 409 not_waiting. Needs the scope machines.

Authentication

AuthorizationBearer

An API key (crk_), an exchanged token (crt_) or a JWT of a trusted issuer. The credential needs the scope of the capability. Read the description of each route.

Path parameters

idstringRequired

The run id. It is also the job id: job_ and a ULID.

Headers

PreferstringOptional

wait=N (1 to 90) holds the request up to N seconds. respond-async answers 202 at once. Behind a proxy with a 60 second idle timeout, use wait=55 or less.

Query parameters

waitintegerOptional1-90

The alias of Prefer: wait=N. The Prefer header wins when both are there.

Request

This endpoint expects an object.
seqintegerRequired0-9007199254740991

The seq of the hold.

valueanyRequired

The answer. It must match the schema of the hold.

Response headers

x-request-idstringOptional

The id of the request: req_ and a ULID. Every answer has it.

server-timingstringOptional
The time of the admission.
x-ratelimit-limit-requestsstringOptional
The size of the request bucket, per minute.
x-ratelimit-remaining-requestsstringOptional
The requests that remain.
x-ratelimit-reset-requestsstringOptional
The time until the request bucket is full.
x-ratelimit-limit-unitsstringOptional
The size of the units bucket, per minute. Absent when no limit applies.
x-ratelimit-remaining-unitsstringOptional
The units that remain.
x-ratelimit-reset-unitsstringOptional
The time until the units bucket is full.

Response

The run at its next stop.
object"machine_run"
idstring
The run id. It is also the job id.
machinestring or null
Null for an inline run.
versioninteger or null-9007199254740991-9007199254740991
ir_hashstring
job_statusenum or null
statusenum
outcomeenum or null
Allowed values:
required_actionobject or null

What the run waits for: tool outputs, the answer of a person, or an input. Send it with the route of its type.

reportstring or null
holdobject or null
divergedstring or null
errorobject or null
entriesinteger-9007199254740991-9007199254740991
The log entries so far.
usageobject
created_atdatetime
ended_atdatetime or null

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error