# Get Streamline automation Pull the complete configuration and metadata for a single Streamline automation. #### Headers **`Authorization`** string required Bearer session token. #### Path Parameters **`automation_id`** string required Identifier formatted as `sauto_...`. ## Returns A Streamline automation resource containing descriptions, upload sources, Git configuration (if any), scheduling flags, and execution statistics. Basic Request ```bash curl "https://api.aitronos.com/v1/streamline/automations/sauto_daily_report" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ```python import os import requests automation_id = "sauto_daily_report" url = f"https://api.aitronos.com/v1/streamline/automations/{automation_id}" response = requests.get( url, headers={"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"} ) response.raise_for_status() record = response.json() ``` ```javascript const automationId = "sauto_daily_report"; const response = await fetch( `https://api.aitronos.com/v1/streamline/automations/${automationId}`, { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } } ); if (!response.ok) throw new Error("Automation not found"); const automation = await response.json(); ``` With Options ```bash curl "https://api.aitronos.com/v1/streamline/automations/sauto_daily_report" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \ -H "X-Streamline-Expand-Schedule: true" ``` ```python import os import requests headers = { "Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}", "X-Streamline-Expand-Schedule": "true" } response = requests.get( "https://api.aitronos.com/v1/streamline/automations/sauto_daily_report", headers=headers ) response.raise_for_status() schedule = response.json().get("schedule") ``` ```javascript const headers = new Headers(); headers.set("Authorization", `Bearer ${process.env.FREDDY_SESSION_TOKEN}`); headers.set("X-Streamline-Expand-Schedule", "true"); const result = await fetch( "https://api.aitronos.com/v1/streamline/automations/sauto_daily_report", { headers } ); const automation = await result.json(); console.log(automation.schedule?.cron_expression); ``` Advanced ```bash curl -s "https://api.aitronos.com/v1/streamline/automations/sauto_daily_report" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" | jq '{id, name, upload_method, git_repository_url}' ``` ```python import os import requests def get_automation(automation_id: str) -> dict: response = requests.get( f"https://api.aitronos.com/v1/streamline/automations/{automation_id}", headers={"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"}, timeout=15 ) response.raise_for_status() return response.json() record = get_automation("sauto_daily_report") if record.get("upload_method") == "git": print(f"Tracking repo {record['git_repository_url']}@{record['git_branch']}") ``` ```javascript import fetch from "node-fetch"; async function requireActiveAutomation(id) { const response = await fetch( `https://api.aitronos.com/v1/streamline/automations/${id}`, { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } } ); if (!response.ok) { throw new Error(`Streamline lookup failed: ${response.status}`); } const automation = await response.json(); if (!automation.is_active) { throw new Error("Automation is disabled"); } return automation; } const automation = await requireActiveAutomation("sauto_daily_report"); console.log({ id: automation.id, upload_method: automation.upload_method }); ``` **Response:** 200 OK ```json { "id": "sauto_daily_report", "name": "Daily Report Generation", "description": "Generates the sales PDF and emails stakeholders.", "organization_id": "org_123", "upload_method": "git", "git_repository_url": "https://github.com/freddy/reports", "git_branch": "main", "execution_file_path": "src/run.py", "is_active": true, "last_executed_at": "2025-11-17T10:00:00Z", "execution_count": 37, "schedule": { "enabled": true, "cron_expression": "0 10 * * 1", "timezone": "Europe/Zurich" } } ``` 400 Bad Request ```json { "success": false, "error": { "code": "INVALID_AUTOMATION_ID", "message": "automation_id must use the sauto_ prefix", "status": 400, "trace_id": "req_1f33d90c" } } ``` 401 Unauthorized ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Missing session token", "status": 401, "trace_id": "req_d6c93f55" } } ``` 404 Not Found ```json { "success": false, "error": { "code": "AUTOMATION_NOT_FOUND", "message": "Automation sauto_daily_report was not found", "status": 404, "trace_id": "req_781f9964" } } ``` 429 Rate Limit ```json { "success": false, "error": { "code": "RATE_LIMIT", "message": "Too many automation lookups", "status": 429, "retry_after": 20, "trace_id": "req_d3f8029f" } } ``` 500 Server Error ```json { "success": false, "error": { "code": "INTERNAL_ERROR", "message": "Unexpected Streamline backend failure", "status": 500, "trace_id": "req_b17d1f6e" } } ``` ## Related - [List automations](/docs/api-reference/streamline/automations-list) - [Delete automation](/docs/api-reference/streamline/automations-delete)