Download an artifact

Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location: in the response header to find the URL for the download. The :archive_format must be zip. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.

GET /repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format

Example

Call this endpoint using the -v flag, which enables verbose output and allows you to see the download URL in the header. To download the file into the current working directory, specify the filename using the -o flag.

curl -v -L -u octocat:$token -o Rails.zip /
"https://api.github.com/repos/octo-org/octo-repo/actions/artifacts/30209828/zip"

Response

Status: 302 Found
Location: https://pipelines.actions.githubusercontent.com/OhgS4QRKqmgx7bKC27GKU83jnQjyeqG8oIMTge8eqtheppcmw8/_apis/pipelines/1/runs/176/signedlogcontent?urlExpires=2020-01-24T18%3A10%3A31.5729946Z&urlSigningMethod=HMACV1&urlSignature=agG73JakPYkHrh06seAkvmH7rBR4Ji4c2%2B6a2ejYh3E%3D