Claim a queued run
POST/run/:id/claim
Executor protocol. Claims a queued campaign run for the caller, which then executes it: a local run with an API key or login token of the run's organization (hackagent run <id> does this), a cloud run with the cloud worker's token only. The run becomes RUNNING. A cloud claim also returns the run's token (run_token) and the values of the secrets its spec references (env); a cloud run that can no longer run (its spec, endpoints or secrets changed) is failed instead. 409 when the run is no longer queued, says who has it, or when its organization has no free cloud slot.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 429
OK
Validation error: the request is invalid and nothing was changed.
Missing, invalid, expired or revoked credential, or a credential this endpoint does not accept.
The run's executor is not one this credential may claim.
Not found: no such object in the caller's organization.
Conflict
Rate limited: retry after the number of seconds in the Retry-After header.