Skip to content

Download the specified artifact

GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}

Call this endpoint to download the specified artifact. This endpoint returns the download URL of the artifact zip (302 redirect).

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)
artifact_id path string Yes Artifact ID
archive_format path string Yes Archive format; only zip is supported

Response parameters

On success, this endpoint returns a 302 redirect to the download URL of the artifact zip; the response body is an empty object {} and does not contain business fields.

Error responses

This endpoint normally succeeds with a 302 redirect; on failure it may return 404 (repository or artifact not found). The specific error response fields returned by the backend take precedence.

HTTP response status codes

Status code Description
302 Redirect to the artifact zip download URL (Found)
404 Not Found
401 Requires authentication

Request example

Parameter notes

This endpoint allows anonymous access, so no access token is required; if you need to provide one, use 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; <artifact_id> is replaced with the artifact ID; <archive_format> is replaced with the archive format (only zip is supported).

cURL

curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_id>/<archive_format>' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/artifacts/<artifact_id>/<archive_format>", {
  headers: {
    "Accept": "application/json",
  },
});

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

console.log(response.status);

Python

import requests

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

print(resp.url)

Response example

Status code: 302

{}

Error codes

Error code Description
302 Redirect to the artifact zip download URL
400 Invalid parameters or the request could not be parsed
401 Unauthenticated or invalid credentials
404 Resource not found
500 Internal server error

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