executors_claim
const url = 'https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/executor/claim';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cause":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/executor/claim \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cause": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A stream id: 72 hex chars, the shard then the owner digest.
The session the record sits on.
Request Bodyrequired
Section titled “Request Bodyrequired”Which record the caller commits to performing.
object
Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.
Examplegenerated
{ "cause": 1}Responses
Section titled “Responses”The attempt, with a grant for the two that may perform.
What the claim answers: which attempt this is, and, while there is anything left to do, the grant to complete under and when it expires.
object
Where a record stands with one claimant: never claimed, claimed with no
completion behind it, or answered. The three an effect outside this
process is told; a mounted one hears the first two as an Attempt.
Example
{ "attempt": "first"}An invalid body; the response names the invalid field when available.
No session token, or one that did not verify.
The token does not attach, or the record is not this executor’s work.
No such session, or nothing this token is shown at that cursor.
The session is archived; nothing lands on it again.