Appearance
Executions
Query execution history for a cron job. Each execution records the HTTP status, response body, duration, and error details.
Base URL: https://app.krafter.dev/api/v1
List Executions
Retrieve execution history for a specific job, ordered by most recent first.
GET /cron/jobs/:id/executionsRequired scope: cron:read
Retention
The most recent 100 executions per job are retained. Older executions are deleted by a nightly cleanup at 04:00 UTC.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Number of executions to return. Maximum 100. |
Example Request
bash
curl "https://app.krafter.dev/api/v1/cron/jobs/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/executions?limit=5" \
-H "Authorization: Bearer kr_live_abc123def456"Example Response
json
{
"data": [
{
"id": "e1f2a3b4-c5d6-e7f8-a9b0-c1d2e3f4a5b6",
"status": "success",
"http_status": 200,
"response_body": "{\"status\":\"ok\"}",
"error": null,
"attempt": 1,
"duration_ms": 142,
"started_at": "2025-01-15T10:10:00Z",
"finished_at": "2025-01-15T10:10:00Z"
},
{
"id": "f2a3b4c5-d6e7-f8a9-b0c1-d2e3f4a5b6c7",
"status": "failed",
"http_status": 500,
"response_body": "{\"error\":\"Internal Server Error\"}",
"error": "HTTP 500",
"attempt": 3,
"duration_ms": 1523,
"started_at": "2025-01-15T10:05:00Z",
"finished_at": "2025-01-15T10:05:01Z"
}
]
}Execution Status Reference
Timeouts and connection errors both produce status: "failed" with the error class captured in the error field (e.g. "%Mint.TransportError{reason: :timeout}"). HTTP status codes from the target endpoint are recorded in http_status; for connection-level errors (including timeouts) http_status is null.
| Status | Description |
|---|---|
success | The HTTP request completed with a 2xx status code. |
failed | The HTTP request returned a non-2xx status code, timed out, or a connection error occurred. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique execution identifier. |
status | string | Execution result: "success" or "failed". |
http_status | integer | null | HTTP status code from the target endpoint. null for connection-level errors (including timeouts). |
response_body | string | null | Response body from the target endpoint (truncated to 2 KB; suffix ...[truncated] appended when truncation occurs). null for connection-level errors. |
error | string | null | Error message (inspect-form of the underlying error class). null for successful executions. |
attempt | integer | Attempt number (1 for the first attempt, incremented on retries). |
duration_ms | integer | Total execution time in milliseconds. |
started_at | string | ISO 8601 timestamp when the execution started. |
finished_at | string | ISO 8601 timestamp when the execution completed. |