Skip to content

List artifacts for a repository

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

Lists all artifacts for a repository.

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

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.

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.

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

name
string

The name field of an artifact. When specified, only artifacts with this name will be returned.

Response

Media type application/json
object
total_count
required
integer
artifacts
required
Array<object>
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
{
"total_count": 2,
"artifacts": [
{
"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-03-21T14:59:22Z",
"updated_at": "2020-02-21T14:59:22Z",
"digest": "sha256:cfc3236bdad15b5898bca8408945c9e19e1917da8704adc20eaa618444290a8c",
"workflow_run": {
"id": 2332938,
"repository_id": 1296269,
"head_repository_id": 1296269,
"head_branch": "main",
"head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3"
}
},
{
"id": 13,
"node_id": "MDg6QXJ0aWZhY3QxMw==",
"name": "Test output",
"size_in_bytes": 453,
"url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13",
"archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip",
"expired": false,
"created_at": "2020-01-10T14:59:22Z",
"expires_at": "2020-03-21T14:59:22Z",
"updated_at": "2020-02-21T14:59:22Z",
"digest": "sha256:cfc3236bdad15b5898bca8408945c9e19e1917da8704adc20eaa618444290a8c",
"workflow_run": {
"id": 2332942,
"repository_id": 1296269,
"head_repository_id": 1296269,
"head_branch": "main",
"head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652"
}
}
]
}
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"