Listar itens de trabalho
GET/v1/environments/{environment_id}/work
Liste itens de trabalho em um ambiente.
Este endpoint aceita a chave do ambiente como bearer token. Ele rejeita uma chave de API do Claude. Na Claude Platform on AWS ou em Claude Models on Google Cloud (Anthropic managed), use as credenciais dessa plataforma.
Parameters
Returns
Listar itens de trabalho
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
page = anthropic.beta.environments.work.list("env_011CZkZ9X2dpNyB7HsEFoRfW")
puts(page)Response 200
{
"data": [
{
"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"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"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"
}
],
"next_page": "next_page"
}