Sample - GitHub REST API
GET/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}

Download an artifact

Returns a redirect URL for downloading a repository artifact archive. Use archive_format set to zip, and retrieve the short-lived URL from the Location response header; the URL expires after one minute. OAuth tokens and personal access tokens (classic) must have the repo scope.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
artifact_idintegerrequired
The unique integer identifier of the artifact to download.
archive_formatstringrequired
The archive format to download. Must be `zip`.

2 status codes
302Returns a redirect response with a `Location` header containing a download URL for the artifact archive. The URL expires after one minute.
410Returned when the requested artifact is no longer available.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 410 is returned when the requested artifact is no longer available. Set archive_format to zip, identify the repository with owner and repo, and use an OAuth token or personal access token (classic) with the repo scope.