Long-poll for wakes for the agents assigned to this Runner. 200 with the claimed wakes (each with a 90-second lease and a nonce), or 204 when there is nothing. Atomic: a wake is handed to exactly one claim. 409 wake_already_claimed if wake_id names one that is taken.
POST
/api/v1/runner/v1/claim
const url = 'https://example.com/api/v1/runner/v1/claim';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"max":1,"wait_seconds":1,"wake_id":"example"}'};
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://example.com/api/v1/runner/v1/claim \ --header 'Content-Type: application/json' \ --data '{ "max": 1, "wait_seconds": 1, "wake_id": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
max
integer
wait_seconds
number
wake_id
string
Examplegenerated
{ "max": 1, "wait_seconds": 1, "wake_id": "example"}