# Get execution status Check the status, logs, and result payload for a single Streamline execution. #### Headers **`Authorization`** string required #### Path Parameters **`execution_id`** string required Identifier formatted as `sexec_...`. ## Returns Execution metadata containing status (`queued`, `running`, `completed`, `failed`), timestamps, structured `result`, and aggregated `logs`. Basic Request ```bash curl "https://api.aitronos.com/v1/streamline/executions/sexec_abc123" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ```python import os import requests response = requests.get( "https://api.aitronos.com/v1/streamline/executions/sexec_abc123", headers={"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"} ) response.raise_for_status() execution = response.json() ``` ```javascript const res = await fetch( "https://api.aitronos.com/v1/streamline/executions/sexec_abc123", { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } } ); const execution = await res.json(); ``` With Options ```bash curl "https://api.aitronos.com/v1/streamline/executions/sexec_abc123" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \ -H "X-Streamline-Include-Logs: true" ``` ```python import os import requests headers = { "Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}", "X-Streamline-Include-Logs": "true" } requests.get( "https://api.aitronos.com/v1/streamline/executions/sexec_abc123", headers=headers, timeout=10 ).raise_for_status() ``` ```javascript await fetch( "https://api.aitronos.com/v1/streamline/executions/sexec_abc123", { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}`, "X-Streamline-Include-Logs": "true" } } ); ``` Advanced ```bash curl -s "https://api.aitronos.com/v1/streamline/executions/sexec_abc123" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" | jq '{id, status, completed_at}' ``` ```python import os import requests session = os.environ["FREDDY_SESSION_TOKEN"] execution_id = "sexec_abc123" response = requests.get( f"https://api.aitronos.com/v1/streamline/executions/{execution_id}", headers={"Authorization": f"Bearer {session}"} ) response.raise_for_status() body = response.json() if body["status"] == "failed": raise RuntimeError(body["logs"]) ``` ```javascript async function waitUntilComplete(id) { while (true) { const res = await fetch( `https://api.aitronos.com/v1/streamline/executions/${id}`, { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } } ); const execution = await res.json(); if (execution.status === "completed") return execution; if (execution.status === "failed") throw new Error(execution.logs); await new Promise((resolve) => setTimeout(resolve, 2000)); } } const execution = await waitUntilComplete("sexec_abc123"); ``` **Response:** 200 OK ```json { "id": "sexec_abc123", "automation_id": "sauto_daily_report", "status": "completed", "started_at": "2025-11-17T10:00:00Z", "completed_at": "2025-11-17T10:02:10Z", "result": { "report_url": "https://storage.freddy.ai/reports/daily.pdf" }, "logs": "[10:00:00] Starting pipeline..." } ``` 400 Bad Request ```json { "success": false, "error": { "code": "INVALID_EXECUTION_ID", "message": "Execution id must start with sexec_", "status": 400, "trace_id": "req_bff0d01a" } } ``` 401 Unauthorized ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Missing session token", "status": 401, "trace_id": "req_8e0b44d3" } } ``` 404 Not Found ```json { "success": false, "error": { "code": "EXECUTION_NOT_FOUND", "message": "Execution sexec_abc123 was not found", "status": 404, "trace_id": "req_1184bb1d" } } ``` 429 Rate Limit ```json { "success": false, "error": { "code": "RATE_LIMIT", "message": "Too many execution lookups", "status": 429, "retry_after": 5, "trace_id": "req_d93d3dba" } } ``` 500 Server Error ```json { "success": false, "error": { "code": "INTERNAL_ERROR", "message": "Failed to load execution", "status": 500, "trace_id": "req_c166cc7c" } } ``` ## Related - [Execute automation](/docs/api-reference/streamline/automations-execute) - [List automation executions](/docs/api-reference/streamline/automations-list-executions)