Skip to content

executors_claim

POST
/sessions/{id}/executor/claim
curl --request POST \
--url https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/executor/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "cause": 1 }'
id
required

A stream id: 72 hex chars, the shard then the owner digest.

string

The session the record sits on.

Media typeapplication/json

Which record the caller commits to performing.

object
cause
required

Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.

integer format: int64
Examplegenerated
{
"cause": 1
}

The attempt, with a grant for the two that may perform.

Media typeapplication/json

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
attempt
required

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.

string
Allowed values: first again completed
credential
string | null
expires
integer | null format: int64
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.