Skip to content

List jobs for a workflow run

GET
/repos/{owner}/{repo}/actions/runs/{run_id}/jobs

Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.

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.

run_id
required
integer

The unique identifier of the workflow run.

filter
string
default: latest
Allowed values: latest all

Filters jobs by their completed_at timestamp. 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.

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.”

Response

Media type application/json
object
total_count
required
integer
jobs
required
Array<object>
Job

Information of a job execution in a workflow run

object
id
required

The id of the job.

integer
run_id
required

The id of the associated workflow run.

integer
run_url
required
string
run_attempt

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

integer
node_id
required
string
head_sha
required

The SHA of the commit that is being run.

string
url
required
string
html_url
required
string
nullable
status
required

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

string
Allowed values: queued in_progress completed waiting requested pending
conclusion
required

The outcome of the job.

string
nullable
Allowed values: success failure neutral cancelled skipped timed_out action_required
created_at
required

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

string format: date-time
started_at
required

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

string format: date-time
completed_at
required

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

string format: date-time
nullable
name
required

The name of the job.

string
steps

Steps in this job.

Array<object>
object
status
required

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

string
Allowed values: queued in_progress completed
conclusion
required

The outcome of the job.

string
nullable
name
required

The name of the job.

string
number
required
integer
started_at

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

string format: date-time
nullable
completed_at

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

string format: date-time
nullable
check_run_url
required
string
labels
required

Labels for the workflow job. Specified by the “runs_on” attribute in the action’s workflow file.

Array<string>
runner_id
required

The ID of the runner to which this job has been assigned. (If a runner hasn’t yet been assigned, this will be null.)

integer
nullable
runner_name
required

The name of the runner to which this job has been assigned. (If a runner hasn’t yet been assigned, this will be null.)

string
nullable
runner_group_id
required

The ID of the runner group to which this job has been assigned. (If a runner hasn’t yet been assigned, this will be null.)

integer
nullable
runner_group_name
required

The name of the runner group to which this job has been assigned. (If a runner hasn’t yet been assigned, this will be null.)

string
nullable
workflow_name
required

The name of the workflow.

string
nullable
head_branch
required

The name of the current branch.

string
nullable
Examples
Example default
{
"total_count": 1,
"jobs": [
{
"id": 399444496,
"run_id": 29679449,
"run_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449",
"node_id": "MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==",
"head_sha": "f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0",
"url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496",
"html_url": "https://github.com/octo-org/octo-repo/runs/29679449/jobs/399444496",
"status": "completed",
"conclusion": "success",
"started_at": "2020-01-20T17:42:40Z",
"completed_at": "2020-01-20T17:44:39Z",
"name": "build",
"steps": [
{
"name": "Set up job",
"status": "completed",
"conclusion": "success",
"number": 1,
"started_at": "2020-01-20T09:42:40.000-08:00",
"completed_at": "2020-01-20T09:42:41.000-08:00"
},
{
"name": "Run actions/checkout@v2",
"status": "completed",
"conclusion": "success",
"number": 2,
"started_at": "2020-01-20T09:42:41.000-08:00",
"completed_at": "2020-01-20T09:42:45.000-08:00"
},
{
"name": "Set up Ruby",
"status": "completed",
"conclusion": "success",
"number": 3,
"started_at": "2020-01-20T09:42:45.000-08:00",
"completed_at": "2020-01-20T09:42:45.000-08:00"
},
{
"name": "Run actions/cache@v3",
"status": "completed",
"conclusion": "success",
"number": 4,
"started_at": "2020-01-20T09:42:45.000-08:00",
"completed_at": "2020-01-20T09:42:48.000-08:00"
},
{
"name": "Install Bundler",
"status": "completed",
"conclusion": "success",
"number": 5,
"started_at": "2020-01-20T09:42:48.000-08:00",
"completed_at": "2020-01-20T09:42:52.000-08:00"
},
{
"name": "Install Gems",
"status": "completed",
"conclusion": "success",
"number": 6,
"started_at": "2020-01-20T09:42:52.000-08:00",
"completed_at": "2020-01-20T09:42:53.000-08:00"
},
{
"name": "Run Tests",
"status": "completed",
"conclusion": "success",
"number": 7,
"started_at": "2020-01-20T09:42:53.000-08:00",
"completed_at": "2020-01-20T09:42:59.000-08:00"
},
{
"name": "Deploy to Heroku",
"status": "completed",
"conclusion": "success",
"number": 8,
"started_at": "2020-01-20T09:42:59.000-08:00",
"completed_at": "2020-01-20T09:44:39.000-08:00"
},
{
"name": "Post actions/cache@v3",
"status": "completed",
"conclusion": "success",
"number": 16,
"started_at": "2020-01-20T09:44:39.000-08:00",
"completed_at": "2020-01-20T09:44:39.000-08:00"
},
{
"name": "Complete job",
"status": "completed",
"conclusion": "success",
"number": 17,
"started_at": "2020-01-20T09:44:39.000-08:00",
"completed_at": "2020-01-20T09:44:39.000-08:00"
}
],
"check_run_url": "https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496",
"labels": [
"self-hosted",
"foo",
"bar"
],
"runner_id": 1,
"runner_name": "my runner",
"runner_group_id": 2,
"runner_group_name": "my runner group",
"workflow_name": "CI",
"head_branch": "main"
}
]
}
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"