获取工作项
GET/v1/environments/{environment_id}/work/{work_id}
检索特定工作项的详细信息。
此端点接受 Claude API 密钥,但会拒绝环境密钥和工作项的 secret。在 Claude Platform on AWS 或 Claude Models on Google Cloud (Anthropic managed) 上,请改用该平台的凭据。
Parameters
Returns
Errors
Any method can also return the general HTTP errors.
Each code below is the value of error.details.error_code in the response body.
获取工作项
ant beta:environments:work retrieve \
--environment-id env_011CZkZ9X2dpNyB7HsEFoRfW \
--work-id work_idResponse 200
{
"id": "id",
"acknowledged_at": "acknowledged_at",
"created_at": "created_at",
"data": {
"id": "id",
"type": "session"
},
"environment_id": "environment_id",
"latest_heartbeat_at": "latest_heartbeat_at",
"metadata": {
"foo": "string"
},
"secret": "secret",
"started_at": "started_at",
"state": "queued",
"stop_requested_at": "stop_requested_at",
"stopped_at": "stopped_at",
"type": "work"
}Returns Examples
Response 200
{
"id": "id",
"acknowledged_at": "acknowledged_at",
"created_at": "created_at",
"data": {
"id": "id",
"type": "session"
},
"environment_id": "environment_id",
"latest_heartbeat_at": "latest_heartbeat_at",
"metadata": {
"foo": "string"
},
"secret": "secret",
"started_at": "started_at",
"state": "queued",
"stop_requested_at": "stop_requested_at",
"stopped_at": "stopped_at",
"type": "work"
}