Skip to content

Get an artifact

GET
/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Gets a specific artifact for a workflow run.

Anyone with read access to the repository can use this endpoint.

If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

artifact_id
required
integer

The unique identifier of the artifact.

Response

Media type application/json
Artifact

An artifact

object
id
required
integer
node_id
required
string
name
required

The name of the artifact.

string
size_in_bytes
required

The size in bytes of the artifact.

integer
url
required
string
archive_download_url
required
string
expired
required

Whether or not the artifact has expired.

boolean
created_at
required
string format: date-time
nullable
expires_at
required
string format: date-time
nullable
updated_at
required
string format: date-time
nullable
digest

The SHA256 digest of the artifact. This field will only be populated on artifacts uploaded with upload-artifact v4 or newer. For older versions, this field will be null.

string
nullable
workflow_run
object
id
integer
repository_id
integer
head_repository_id
integer
head_branch
string
head_sha
string
Examples
Example default
{
"id": 11,
"node_id": "MDg6QXJ0aWZhY3QxMQ==",
"name": "Rails",
"size_in_bytes": 556,
"url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11",
"archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip",
"expired": false,
"created_at": "2020-01-10T14:59:22Z",
"expires_at": "2020-01-21T14:59:22Z",
"updated_at": "2020-01-21T14:59:22Z",
"digest": "sha256:cfc3236bdad15b5898bca8408945c9e19e1917da8704adc20eaa618444290a8c",
"workflow_run": {
"id": 2332938,
"repository_id": 1296269,
"head_repository_id": 1296269,
"head_branch": "main",
"head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3"
}
}