GitHub v3 REST API

Get a workflow run

Gets a specific 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
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}

Query Parameters

exclude_pull_requestsboolean

If true pull requests are omitted from the response (empty array).

Default:false

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

200 application/json

Response

Workflow Run

An invocation of a workflow

idintegerrequired

The ID of the workflow run.

Example:5

namestring | null

The name of the workflow run.

Example:Build

node_idstringrequired

Example:MDEwOkNoZWNrU3VpdGU1

check_suite_idinteger

The ID of the associated check suite.

Example:42

check_suite_node_idstring

The node ID of the associated check suite.

Example:MDEwOkNoZWNrU3VpdGU0Mg==

head_branchstring | nullrequired

Example:master

head_shastringrequired

The SHA of the head commit that points to the version of the workflow being run.

Example:009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d

run_numberintegerrequired

The auto incrementing run number for the workflow run.

Example:106

run_attemptinteger

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

Example:1

eventstringrequired

Example:push

statusstring | nullrequired

Example:completed

conclusionstring | nullrequired

Example:neutral

workflow_idintegerrequired

The ID of the parent workflow.

Example:5

urlstringrequired

The URL to the workflow run.

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

html_urlstringrequired

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

pull_requestsarray | null[object]required
Show Child Parameters
created_atstring(date-time)required
updated_atstring(date-time)required
run_started_atstring(date-time)

The start time of the latest run. Resets on re-run.

jobs_urlstringrequired

The URL to the jobs for the workflow run.

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

logs_urlstringrequired

The URL to download the logs for the workflow run.

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

check_suite_urlstringrequired

The URL to the associated check suite.

Example:https://api.github.com/repos/github/hello-world/check-suites/12

artifacts_urlstringrequired

The URL to the artifacts for the workflow run.

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

cancel_urlstringrequired

The URL to cancel the workflow run.

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

rerun_urlstringrequired

The URL to rerun the workflow run.

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

previous_attempt_urlstring | null

The URL to the previous attempted run of this workflow, if one exists.

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

workflow_urlstringrequired

The URL to the workflow.

Example:https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml

head_commitobject | nullrequired

Simple Commit

Show Child Parameters
repositoryobjectrequired

Minimal Repository

Show Child Parameters
head_repositoryobjectrequired

Minimal Repository

Show Child Parameters
head_repository_idinteger

Example:5

get/repos/{owner}/{repo}/actions/runs/{run_id}
 
200 application/json

Delete a workflow run

Delete a specific workflow run. Anyone with write 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:write permission to use
this endpoint.

delete
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

204

Response

delete/repos/{owner}/{repo}/actions/runs/{run_id}
 
204

List workflow run artifacts

Lists artifacts 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
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/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
run_idintegerrequired

The id of the workflow run.

Response

200 application/json

Response

total_countintegerrequired
artifactsarray[object]required

An artifact

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

Cancel a workflow run

Cancels a workflow run using its id. 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.

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/cancel

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

202 application/json

Response

object
* Additional properties are NOT allowed.
post/repos/{owner}/{repo}/actions/runs/{run_id}/cancel
 
202 application/json

List jobs for a workflow run

Lists jobs 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. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/jobs

Query Parameters

filterstring

Filters jobs by their completed_at timestamp. Can be one of:
* latest: Returns jobs from the most recent execution of the workflow run.
* all: Returns all jobs for a workflow run, including from old executions of the workflow run.

Allowed values:latestall

Default:latest

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

200 application/json

Response

total_countintegerrequired
jobsarray[object]required

Information of a job execution in a workflow run

Show Child Parameters
get/repos/{owner}/{repo}/actions/runs/{run_id}/jobs
 
200 application/json