API

Sandboxes

The containers agents execute in, and their live metrics.

GET
/sandboxes

Query Parameters

projectId?string
status?string

Value in

  • "running"
  • "stale"
  • "destroyed"
  • "completed"
  • "failed"
limit?integer
Range1 <= value <= 500
Default200

Response Body

application/json

application/json

curl -X GET "https://example.com/sandboxes"
{  "data": [    {      "sandboxId": "string",      "issueId": "string",      "projectId": "string",      "role": "string",      "harness": "string",      "harnessVersion": "string",      "runId": "string",      "status": "running",      "terminationReason": "string",      "instanceType": "string",      "createdAt": 0,      "timeoutAt": 0,      "lastHeartbeatAt": 0,      "destroyedAt": 0,      "lastCpuPct": 0,      "lastMemUsedMb": 0,      "lastMemTotalMb": 0,      "lastDiskUsedPct": 0,      "lastMetricAt": 0    }  ],  "nextCursor": "string"}
GET
/sandboxes/{sandboxId}

Path Parameters

sandboxId*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/sandboxes/string"
{  "sandbox": {    "sandboxId": "string",    "issueId": "string",    "projectId": "string",    "role": "string",    "harness": "string",    "harnessVersion": "string",    "runId": "string",    "status": "running",    "terminationReason": "string",    "instanceType": "string",    "createdAt": 0,    "timeoutAt": 0,    "lastHeartbeatAt": 0,    "destroyedAt": 0,    "lastCpuPct": 0,    "lastMemUsedMb": 0,    "lastMemTotalMb": 0,    "lastDiskUsedPct": 0,    "lastMetricAt": 0  },  "metrics": [    {      "t": 0,      "cpuPct": 0,      "memUsedMb": 0,      "memTotalMb": 0,      "diskUsedPct": 0    }  ],  "sessions": [    {      "role": "string",      "sessionId": "string",      "ts": "string",      "outcome": "string",      "logKey": "string",      "systemKey": "string",      "totalCostUsd": 0    }  ],  "liveFragments": [    {      "kind": "thought",      "t": 0,      "body": "string",      "action": "string",      "parameter": "string",      "result": "string",      "toolUseId": "string",      "items": [        {          "content": "string",          "status": "string"        }      ]    }  ]}
GET
/sandboxes/{sandboxId}/logs

Path Parameters

sandboxId*string
Length1 <= length

Query Parameters

role*string
sessionId*string
part?string
Default"session"

Value in

  • "session"
  • "system"
  • "prompt"

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/sandboxes/string/logs?role=string&sessionId=string"
{  "sandboxId": "string",  "role": "string",  "sessionId": "string",  "part": "session",  "content": "string",  "bytes": 0,  "promptScope": "repo-contributed",  "promptSpans": [    {      "id": "string",      "content": "string"    }  ]}
POST
/sandboxes/{sandboxId}/kill

Path Parameters

sandboxId*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/sandboxes/string/kill"
{  "ok": true,  "sandboxId": "string"}

How is this page?