# Get Git sync status Retrieve recent sync jobs for a Git-based automation. #### Headers **`Authorization`** string required #### Path Parameters **`automation_id`** string required #### Query Parameters **`limit`** integer optional ยท Defaults to `10` Maximum number of sync jobs to return. ## Returns A `sync_jobs` array containing job identifiers, statuses, timestamps, detected changes, and commit SHAs. Basic Request ```bash curl "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ```python import os import requests response = requests.get( "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report", headers={"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"} ) response.raise_for_status() syncs = response.json()["sync_jobs"] ``` ```javascript const apiKey = process.env.FREDDY_API_KEY; const response = await fetch( "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report", { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } } ); const payload = await response.json(); ``` With Options ```bash curl "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report?limit=5" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ```python import os import requests response = requests.get( "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report", headers={"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"}, params={"limit": 5} ) response.raise_for_status() ``` ```javascript const url = new URL("https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report"); url.searchParams.set("limit", "5"); await fetch(url, { headers: { Authorization: `Bearer ${process.env.FREDDY_SESSION_TOKEN}` } }); ``` Advanced ```bash curl -s "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" | jq '.sync_jobs | map({id, status, synced_at})' ``` ```python import os import requests headers = {"Authorization": f"Bearer {os.environ['FREDDY_SESSION_TOKEN']}"} response = requests.get( "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report", headers=headers ) response.raise_for_status() for job in response.json()["sync_jobs"]: print(job["id"], job["status"], job["synced_at"]) ``` ```javascript const apiKey = process.env.FREDDY_API_KEY; const token = process.env.FREDDY_SESSION_TOKEN; const jobs = await fetch( "https://api.aitronos.com/v1/streamline/automations/git/syncs/sauto_daily_report", { headers: { Authorization: `Bearer ${apiKey}` } } ).then((res) => res.json()); const completed = jobs.sync_jobs.filter((job) => job.status === "completed"); console.log(completed); ``` **Response:** 200 OK ```json { "sync_jobs": [ { "id": "sgit_001", "status": "completed", "synced_at": "2025-11-17T12:00:00Z", "changes_detected": true, "commit_sha_after": "d4c9f2a" }, { "id": "sgit_000", "status": "failed", "synced_at": "2025-11-16T12:00:00Z", "changes_detected": false, "commit_sha_after": null } ] } ``` 400 Bad Request ```json { "success": false, "error": { "code": "NOT_GIT_AUTOMATION", "message": "Automation is not linked to Git", "status": 400, "trace_id": "req_6a8df28a" } } ``` 401 Unauthorized ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Missing session token", "status": 401, "trace_id": "req_461de4a1" } } ``` 404 Not Found ```json { "success": false, "error": { "code": "AUTOMATION_NOT_FOUND", "message": "Automation sauto_daily_report was not found", "status": 404, "trace_id": "req_5f9f7dd7" } } ``` 429 Rate Limit ```json { "success": false, "error": { "code": "RATE_LIMIT", "message": "Too many sync history requests", "status": 429, "retry_after": 15, "trace_id": "req_cac9cf8d" } } ``` 500 Server Error ```json { "success": false, "error": { "code": "INTERNAL_ERROR", "message": "Failed to load sync history", "status": 500, "trace_id": "req_9d855c61" } } ``` ## Related - [Trigger Git sync job](/docs/api-reference/streamline/automations-git-sync)