Skip to content

List all jobs processed by a runner

GET
/api/v4/runners/{id}/jobs

Lists all jobs that are being processed or were processed by a specified runner. The list of jobs is limited to projects where the user has the Reporter, Developer, Maintainer, or Owner role.

id
required
integer

The ID of a runner

system_id
string
nullable

System ID associated with the runner manager

status
string
nullable
Allowed values: created waiting_for_resource preparing waiting_for_callback pending running success failed canceling canceled skipped manual scheduled

Status of the job

order_by
string
nullable
Allowed values: id

Order by id

sort
string
default: desc nullable
Allowed values: asc desc

Sort by asc or desc order. Specify order_by as well, including for id

cursor
string
nullable

Cursor for obtaining the next set of records

page
integer
default: 1 nullable

Current page number

Example
1
per_page
integer
default: 20 nullable

Number of items per page

Example
20

OK

Media type application/json
object
id
integer format: int64
status
string
stage
string
name
string
ref
string
tag
boolean
coverage
number format: float
allow_failure
boolean
created_at
string format: date-time
started_at
string format: date-time
finished_at
string format: date-time
erased_at
string format: date-time
duration

Time spent running

number format: float
queued_duration

Time spent enqueued

number format: float
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
created_at
string
bio
string
location
string
linkedin
string
twitter
string
discord
string
website_url
string
github
string
job_title
string
pronouns
string
organization
string
bot
boolean
work_information
string
followers
string
following
string
is_followed
string
local_time
string
commit
object
id
string
short_id
string
created_at
string format: date-time
parent_ids
Array<string>
title
string
message
string
author_name
string
author_email
string
authored_date
string format: date-time
committer_name
string
committer_email
string
committed_date
string format: date-time
trailers
object
extended_trailers
object
web_url
string
pipeline
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
failure_reason
string
web_url
string
project
object
id
integer format: int64
description
string
name
string
name_with_namespace
string
path
string
path_with_namespace
string
created_at
string format: date-time
Example
{
"id": 1,
"status": "waiting_for_resource",
"stage": "deploy",
"name": "deploy_to_production",
"ref": "main",
"coverage": 98.29,
"created_at": "2015-12-24T15:51:21.880Z",
"started_at": "2015-12-24T17:54:30.733Z",
"finished_at": "2015-12-24T17:54:31.198Z",
"erased_at": "2015-12-24T18:00:29.728Z",
"duration": 0.465,
"queued_duration": 0.123,
"user": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
},
"commit": {
"id": "2695effb5807a22ff3d138d593fd856244e155e7",
"short_id": "2695effb",
"created_at": "2017-07-26T11:08:53.000+02:00",
"parent_ids": [
"2a4b78934375d7f53875269ffd4f45fd83a84ebe"
],
"title": "Initial commit",
"message": "Initial commit",
"author_name": "John Smith",
"author_email": "john@example.com",
"authored_date": "2012-05-28T04:42:42-07:00",
"committer_name": "Jack Smith",
"committer_email": "jack@example.com",
"committed_date": "2012-05-28T04:42:42-07:00",
"trailers": {
"Merged-By": "Jane Doe janedoe@gitlab.com"
},
"extended_trailers": {
"Signed-off-by": [
"John Doe <johndoe@gitlab.com>",
"Jane Doe <janedoe@gitlab.com>"
]
},
"web_url": "https://gitlab.example.com/janedoe/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746"
},
"pipeline": {
"id": 1,
"iid": 2,
"project_id": 3,
"sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52",
"ref": "feature-branch",
"status": "success",
"source": "push",
"created_at": "2022-10-21T16:49:48.000+02:00",
"updated_at": "2022-10-21T16:49:48.000+02:00",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61"
},
"failure_reason": "script_failure",
"web_url": "https://example.com/foo/bar/-/jobs/1",
"project": {
"id": 1,
"description": "desc",
"name": "project1",
"name_with_namespace": "John Doe / project1",
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}

Bad Request

Unauthorized

No access granted

Runner not found