Poll for Work
Poll for Work through the OMA API.
?beta=true.Authorizations
OMA workspace API key.
Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.
The version of the OMA API you want to use.
Read more about versioning and our version history here.
Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console
Path Parameters
Query Parameters
Selects the beta API contract for this endpoint. Must be true.
true How long to wait for work to arrive before returning. Must be 1-999 in milliseconds. Defaults to non-blocking (returns immediately if no work is available).
x >= 1Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms).
x >= 1Response
Successful Response
Work resource representing a unit of work in a self-hosted environment.
Work items are queued when sessions are created or when long-dormant sessions receive new messages. The environment worker polls for work to execute in a self-hosted sandbox.
RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox
RFC 3339 timestamp when work was created
The actual work to be performed
Environment identifier this work belongs to (e.g., env_...)
Work identifier (e.g., 'work_...')
RFC 3339 timestamp of the most recent heartbeat
User-provided metadata key-value pairs associated with this work item
Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
RFC 3339 timestamp when work execution started
Current state of the work item
queued, starting, active, stopping, stopped RFC 3339 timestamp when stop was requested
RFC 3339 timestamp when work execution stopped
The type of object (always 'work')
"work"