Skip to content

List the artifacts of a specific run

GET /api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts

Call this endpoint to page through all artifacts produced by the specified Workflow Run; sorting by creation time is supported.

Access token support

  • AtomGit user access tokens

Anonymous access

This endpoint allows 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
name query string No Artifact name filter (fuzzy match)
sort query string No Sort field; currently only created is supported
direction query string No Sort direction, asc or desc; default desc
page query integer No Current page number; must be a positive integer
per_page query integer No Number of items per page

Response parameters

Field Type Always returned Nullable Description
total_count integer Yes No Total artifact count
artifacts array Yes No Artifact list

artifacts[] object

Field Type Always returned Nullable Description
artifacts[].id string Yes No Artifact ID
artifacts[].name string Yes No Artifact name
artifacts[].size_bytes integer Yes No Artifact size (bytes)
artifacts[].workflow_id string Yes No Workflow ID
artifacts[].workflow_run_id string Yes No Workflow run ID
artifacts[].digest string Yes No SHA256 digest
artifacts[].expires_at string Yes Yes Expiration time(ISO 8601 timestamp string), may be empty
artifacts[].created_at string Yes Yes Creation time(ISO 8601 timestamp string), may be empty
artifacts[].updated_at string Yes Yes Update time(ISO 8601 timestamp string), may be empty

Error responses

400 Invalid parameters

{
  "error": "bad_request",
  "message": "Parameter validation failed; page must be a positive integer"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

404 Not found

{
  "error": "not_found",
  "message": "The repository or the specified Workflow Run does not exist"
}

The error field names returned by the backend take precedence.

HTTP response status codes

Status code Description
200 Success (OK)
400 Bad request
401 Requires authentication
403 Forbidden
404 Not found
500 Internal server error

Request example

Parameter notes

Replace the placeholders in the example with actual values to call this endpoint; this endpoint allows anonymous access and may also carry an AtomGit user access token.

<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; <run_id> is replaced with the pipeline run ID.

cURL

curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/artifacts?page=1&per_page=10' \
  -H 'Accept: application/json'

JavaScript

const response = await fetch(
  "https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/artifacts?page=1&per_page=10",
  {
    headers: { "Accept": "application/json" },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.get(
    "https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runs/<run_id>/artifacts",
    params={"page": 1, "per_page": 10},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "total_count": 1,
  "artifacts": [
    {
      "id": "0195f4f8-2f3a-7b9e-9c8d-1a2b3c4d5e6f",
      "name": "build-output",
      "size_bytes": 1048576,
      "workflow_id": "12345",
      "workflow_run_id": "67890",
      "digest": "sha256:2c3f4e5a6d7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b",
      "expires_at": "2026-10-14T00:00:00+08:00",
      "created_at": "2026-10-01T10:00:00+08:00",
      "updated_at": "2026-10-01T10:05:00+08:00"
    }
  ]
}

Error codes

Error code Description
400 Invalid parameters or the request could not be parsed
401 Unauthenticated or invalid credentials (missing or invalid access token)
403 Forbidden; no permission
404 The request path or resource does not exist
500 Internal server error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc