工作
記錄心跳
$ ant beta:environments:work heartbeatPOST/v1/environments/{environment_id}/work/{work_id}/heartbeat
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.
Response after recording a heartbeat for a work item.
RFC 3339 timestamp of the actual heartbeat from DB
Whether the heartbeat succeeded in extending the lease
Current state of the work item (active/stopping/stopped)
Effective TTL applied to the lease
The type of response
Response when listing work items with cursor-based pagination.
Statistics about the work queue for an environment.
Uses Redis Stream consumer group metrics for O(1) queries.
Number of work items waiting to be picked up (lag from consumer group)
RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty
Number of work items being processed (polled but not acknowledged)
The type of object
Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.
Request to stop a work item.
If true, immediately stop work without graceful shutdown
Request to update work item metadata.
Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata.
Work data for session work items.
This resource type is used when work represents a session that needs to be executed in a self-hosted environment.
Session identifier (e.g., 'session_...')
Type of work data