List async code runs
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/code/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/code/runs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "<string>",
"machine_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>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Code
List async code runs
GET
/
v1
/
machines
/
{id}
/
code
/
runs
List async code runs
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/code/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/code/runs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "<string>",
"machine_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>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"error_detail": {
"message": "<string>",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Query Parameters
Available options:
queued, running, succeeded, failed, cancelled Required range:
1 <= x <= 200⌘I