GitHub v3 REST API

List artifacts for a repository

Lists all artifacts for a repository. 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
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/artifacts

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

200 application/json

Response

total_countintegerrequired
artifactsarray[object]required

An artifact

Show Child Parameters
get/repos/{owner}/{repo}/actions/artifacts
 
200 application/json

Get an artifact

Gets a specific artifact for a workflow run. 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
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Path Parameters

ownerstringrequired
repostringrequired
artifact_idintegerrequired

artifact_id parameter

Response

200 application/json

Response

Artifact

An artifact

idintegerrequired

Example:5

node_idstringrequired

Example:MDEwOkNoZWNrU3VpdGU1

namestringrequired

The name of the artifact.

Example:AdventureWorks.Framework

size_in_bytesintegerrequired

The size in bytes of the artifact.

Example:12345

urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/artifacts/5

archive_download_urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip

expiredbooleanrequired

Whether or not the artifact has expired.

created_atstring | null(date-time)required
expires_atstring | null(date-time)required
updated_atstring | null(date-time)required
get/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
 
200 application/json

Delete an artifact

Deletes an artifact for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Path Parameters

ownerstringrequired
repostringrequired
artifact_idintegerrequired

artifact_id parameter

Response

204

Response

delete/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
 
204

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
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}

Path Parameters

ownerstringrequired
repostringrequired
artifact_idintegerrequired

artifact_id parameter

archive_formatstringrequired

Response

302

Response

get/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}
 
302

Get a job for a workflow run

Gets a specific job in a workflow run. 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
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/jobs/{job_id}

Path Parameters

ownerstringrequired
repostringrequired
job_idintegerrequired

job_id parameter

Response

200 application/json

Response

Job

Information of a job execution in a workflow run

idintegerrequired

The id of the job.

Example:21

run_idintegerrequired

The id of the associated workflow run.

Example:5

run_urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/runs/5

run_attemptinteger

Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run.

Example:1

node_idstringrequired

Example:MDg6Q2hlY2tSdW40

head_shastringrequired

The SHA of the commit that is being run.

Example:009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d

urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/jobs/21

html_urlstring | nullrequired

Example:https://github.com/github/hello-world/runs/4

statusstringrequired

The phase of the lifecycle that the job is currently in.

Allowed values:queuedin_progresscompleted

Example:queued

conclusionstring | nullrequired

The outcome of the job.

Example:success

started_atstring(date-time)required

The time that the job started, in ISO 8601 format.

Example:2019-08-08T08:00:00-07:00

completed_atstring | null(date-time)required

The time that the job finished, in ISO 8601 format.

Example:2019-08-08T08:00:00-07:00

namestringrequired

The name of the job.

Example:test-coverage

stepsarray[object]

Steps in this job.

Show Child Parameters
check_run_urlstringrequired

Example:https://api.github.com/repos/github/hello-world/check-runs/4

get/repos/{owner}/{repo}/actions/jobs/{job_id}
 
200 application/json