Use this API to interact with resource groups.
List all resource groups
GET /api/v4/projects/{id}/resource_groups
Lists all resource groups for a specified project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Retrieve a resource group
GET /api/v4/projects/{id}/resource_groups/{key}
Retrieves a specified resource group for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
keyPath, | String | URL-resource%5 instead of resource_ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Update a resource group
PUT /api/v4/projects/{id}/resource_groups/{key}
Updates the properties for a specified resource group. It returns 200 if the resource group was successfully updated. In case of an error, a status code 400 is returned.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
keyPath, | String | URL-resource%5 instead of resource_ |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
process_ | String | Process mode of the resource group. Allowed values: unordered,oldest_,newest_,newest_ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not found | — |
Retrieve current job for a resource group
GET /api/v4/projects/{id}/resource_groups/{key}/current_job
Retrieves the current job for a specified resource group in a project. This feature was introduced in GitLab 18.6.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
keyPath, | String | URL-resource%5 instead of resource_ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
List all upcoming jobs for a resource group
GET /api/v4/projects/{id}/resource_groups/{key}/upcoming_jobs
Lists all upcoming jobs for a specified resource group.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
keyPath, | String | URL-resource%5 instead of resource_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCiJobBasic
| Property | Type | Description |
|---|---|---|
allow_ | Boolean | — |
commit | APIEntities | — |
coverage | Number (float) | Example:98. |
created_ | String (date- | Example:2015- |
duration | Number (float) | Time spent running Example: 0. |
erased_ | String (date- | Example:2015- |
failure_ | String | Example:script_ |
finished_ | String (date- | Example:2015- |
id | Integer (int64) | Example:1 |
name | String | Example:deploy_ |
pipeline | APIEntities | — |
project | Object | — |
project. | String | Example:false |
queued_ | Number (float) | Time spent enqueued Example: 0. |
ref | String | Example:main |
stage | String | Example:deploy |
started_ | String (date- | Example:2015- |
status | String | Example:waiting_ |
tag | Boolean | — |
user | APIEntities | — |
web_ | String | Example:https: |
APIEntitiesCiPipelineBasic
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Timestamp when the pipeline was created Example: 2022- |
id | Integer (int64) | ID of the pipeline Example: 1 |
iid | Integer | Internal ID of the pipeline Example: 2 |
project_ | Integer (int64) | ID of the project of the pipeline Example: 3 |
ref | String | Git reference of the pipeline Example: feature- |
sha | String | SHA of the commit the pipeline runs for Example: 0ec9e58fdfca6cdd6652 |
source | String | Source that triggered the pipeline Example: push |
status | String | Status of the pipeline Example: success |
updated_ | String (date- | Timestamp when the pipeline was last updated Example: 2022- |
web_ | String | URL of the pipeline in the Git Example: https: |
APIEntitiesCiResourceGroup
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Example:2021- |
id | Integer (int64) | Example:1 |
key | String | Example:production |
process_ | String | Example:unordered |
updated_ | String (date- | Example:2021- |
APIEntitiesCommit
| Property | Type | Description |
|---|---|---|
author_ | String | Email address of the commit author Example: john@example. |
author_ | String | Name of the commit author Example: John Smith |
authored_ | String (date- | Date and time when the commit was authored Example: 2012- |
committed_ | String (date- | Date and time when the commit was committed Example: 2012- |
committer_ | String | Email address of the committer Example: jack@example. |
committer_ | String | Name of the committer Example: Jack Smith |
created_ | String (date- | Date and time when the commit was created.committed_Example: 2017- |
extended_ | Object | Git trailers parsed from the commit message, Example: {"Signed- |
id | String | Full SHA of the commit Example: 2695effb5807a22ff3d1 |
message | String | Full commit message Example: Initial commit |
parent_ | Array of strings | SHAs of the parent commits Example: ["2a4b78934375d7f53875 |
short_ | String | Short SHA of the commit Example: 2695effb |
title | String | Title of the commit message Example: Initial commit |
trailers | Object | Git trailers parsed from the commit message. Example: {"Merged- |
web_ | String | URL to view the commit in the Git Example: https: |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesUser
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bio | String | Biography of the user |
bot | Boolean | — |
created_ | String (date- | Creation date and time of the user account in ISO 8601 format |
custom_ | Array of APIEntities | — |
discord | String | Discord user ID of the user |
followers | String | — |
following | String | — |
github | String | Git |
id | Integer (int64) | ID of the user Example: 1 |
is_ | String | — |
job_ | String | Job title of the user |
linkedin | String | Linked |
local_ | String | — |
location | String | Location of the user |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
organization | String | Organization of the user |
pronouns | String | Pronouns of the user |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
twitter | String | Twitter username of the user |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
website_ | String | Website of the user |
work_ | String | — |