Download job logs of a workflow execution¶
GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}/download_log
Download the log file of the specified job in a workflow run.
Access token support¶
- AtomGit user access tokens
Anonymous access¶
This endpoint does not allow anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | Address path of the namespace that owns the repository (organization or personal address path) |
repo |
path | string | Yes | Repository path (path) |
run_id |
path | string | Yes | Pipeline run ID |
job_id |
path | string | Yes | Job ID |
access_token |
query | string | Yes | User authorization code |
Response parameters¶
On success, the content of the job's log file is returned directly (as a file stream). The reference documentation does not define structured response fields; the schema is {}, and the actual content is log text.
Error responses¶
401 Unauthenticated
404 Not found
The error field names are subject to the actual response.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK), returns the log file content |
401 |
Authentication required (missing or invalid access token) |
404 |
The repository, workflow run, or job does not exist |
Request example¶
Parameter notes¶
<owner>is replaced with the address path of the namespace that owns the repository (organization or personal address path);<repo>is replaced with the repository path (path);<run_id>is replaced with the pipeline run ID;<job_id>is replaced with the job ID;<token>is replaced with your AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/jobs/<job_id>/download_log?access_token=<token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const owner = "<owner>";
const repo = "<repo>";
const runId = "<run_id>";
const jobId = "<job_id>";
const token = "<token>";
const response = await fetch(
`https://api.atomgit.com/api/v8/repos/${owner}/${repo}/actions/runs/${runId}/jobs/${jobId}/download_log?access_token=${token}`,
{ headers: { "Accept": "application/json" } }
);
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const log = await response.text();
console.log(log);
Python¶
import requests
owner = "<owner>"
repo = "<repo>"
run_id = "<run_id>"
job_id = "<job_id>"
token = "<token>"
url = f"https://api.atomgit.com/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}/download_log"
resp = requests.get(
url,
params={"access_token": token},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.text)
Response example¶
Status code: 200
2026-10-14 07:00:01.234 INFO 1 --- [main] c.g.actions.JobRunner : Starting job <job_id>
2026-10-14 07:00:02.345 INFO 1 --- [main] c.g.actions.JobRunner : Checkout repository <owner>/<repo>
2026-10-14 07:00:03.456 INFO 1 --- [main] c.g.actions.JobRunner : Build started
The actual returned content is the log text produced while the job runs; it depends on the run itself.
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
400 |
Invalid parameters or the request could not be parsed |
404 |
The request path does not exist (repository, run, or job not found) |
405 |
The request method is not supported |
429 |
Too many requests; rate limit triggered |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc