project_runners
Gets or lists a project_runners resource.
Overview​
| Name | project_runners |
| Type | Resource |
| Id | gitlab.ci.project_runners |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the runner. |
access_level | string | Access level of the runner. (NOT_PROTECTED, REF_PROTECTED) |
admin_url | string | Admin URL of the runner. Only available for administrators. |
contacted_at | string | Timestamp of last contact from the runner. |
created_at | string | Timestamp of creation of the runner. |
creation_state | string | Runner creation state. Used to determine if a runner has been registered and has contacted the GitLab instance. (STARTED, FINISHED) |
description | string | Description of the runner. |
edit_admin_url | string | Admin form URL of the runner. Only available for administrators. |
job_execution_status | string | Job execution status of the runner. (IDLE, ACTIVE) |
locked | boolean | Indicates the runner is locked. |
maintenance_note | string | Runner's maintenance notes. |
maximum_timeout | integer | Maximum timeout (in seconds) for jobs processed by the runner. |
paused | boolean | Indicates the runner is paused and not available to run jobs. |
private_projects_minutes_cost_factor | number | Private projects' "compute cost factor" associated with the runner (GitLab.com only). |
public_projects_minutes_cost_factor | number | Public projects' "compute cost factor" associated with the runner (GitLab.com only). |
register_admin_url | string | URL of the temporary registration page of the runner. Only available before the runner is registered. Only available for administrators. |
run_untagged | boolean | Indicates the runner is able to run untagged jobs. |
runner_type | string | Type of the runner. (INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE) |
short_sha | string | First eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID. |
status | string | Status of the runner. (ONLINE, OFFLINE, STALE, NEVER_CONTACTED) |
tag_list | array | |
token_expires_at | string | Runner token expiration time. |
upgrade_status | string | Availability of upgrades for the runner. (INVALID, NOT_AVAILABLE, AVAILABLE, RECOMMENDED) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | full_path, host | creator_id, creator_username, paused, search, sort, status, type, upgrade_status, version_prefix | Find runners visible to the current user. Generated from the GitLab GraphQL schema field Project.runners (connection of CiRunner nodes). |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
full_path | string | Full path of the project, for example gitlab-org/gitlab |
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
creator_id | string | Filter runners by creator ID. |
creator_username | string | Filter runners by creator username. |
paused | boolean | Filter runners by paused (true) or active (false) status. |
search | string | Filter by full token or partial text in description field. |
sort | string | Sort order of results. |
status | string | Filter runners by status. |
type | string | Filter runners by type. |
upgrade_status | string | Filter by upgrade status. |
version_prefix | string | Filter runners by version. Runners that contain runner managers with the version at the start of the search term are returned. For example, the search term '14.' returns runner managers with versions '14.11.1' and '14.2.3'. |
SELECT examples​
- list
Find runners visible to the current user. Generated from the GitLab GraphQL schema field Project.runners (connection of CiRunner nodes).
SELECT
id,
access_level,
admin_url,
contacted_at,
created_at,
creation_state,
description,
edit_admin_url,
job_execution_status,
locked,
maintenance_note,
maximum_timeout,
paused,
private_projects_minutes_cost_factor,
public_projects_minutes_cost_factor,
register_admin_url,
run_untagged,
runner_type,
short_sha,
status,
tag_list,
token_expires_at,
upgrade_status
FROM gitlab.ci.project_runners
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND creator_id = '{{ creator_id }}'
AND creator_username = '{{ creator_username }}'
AND paused = '{{ paused }}'
AND search = '{{ search }}'
AND sort = '{{ sort }}'
AND status = '{{ status }}'
AND type = '{{ type }}'
AND upgrade_status = '{{ upgrade_status }}'
AND version_prefix = '{{ version_prefix }}'
;