Skip to main content
GET
/
v1
/
sandboxes
/
{id}
/
code
/
runs
List async code runs
import requests

url = "https://api.13-215-85-171.sslip.io/v1/sandboxes/{id}/code/runs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "items": [
    {
      "id": "<string>",
      "sandbox_id": "<string>",
      "context_id": "<string>",
      "timeout_secs": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z",
      "cancel_requested_at": "2023-11-07T05:31:56Z",
      "execution": {
        "results": [
          {
            "text": "<string>",
            "html": "<string>",
            "markdown": "<string>",
            "svg": "<string>",
            "png": "<string>",
            "jpeg": "<string>",
            "pdf": "<string>",
            "latex": "<string>",
            "json": "<unknown>",
            "javascript": "<string>",
            "data": {},
            "is_main_result": true
          }
        ],
        "artifacts": [
          {
            "id": "<string>",
            "context_id": "<string>",
            "mime_type": "<string>",
            "name": "<string>",
            "size_bytes": 123,
            "sha256": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "execution_count": 123,
            "expires_at": "2023-11-07T05:31:56Z",
            "preview_url": "<string>",
            "download_url": "<string>",
            "metadata": {}
          }
        ],
        "logs": {
          "stdout": [
            "<string>"
          ],
          "stderr": [
            "<string>"
          ]
        },
        "error": {
          "name": "<string>",
          "value": "<string>",
          "traceback": "<string>"
        },
        "execution_count": 123
      },
      "failure_reason": "<string>"
    }
  ],
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Sandbox ID (e.g. sb_a1b2c3d4)

Query Parameters

status
enum<string>
Available options:
queued,
running,
succeeded,
failed,
cancelled
context_id
string
limit
integer
Required range: 1 <= x <= 200
cursor
string

Response

Code run list

items
object[]
required
next_cursor
string | null
required

Cursor for the next page; always present and null when there are no further pages.