GitLab CI/CD ci_resource_groups API

Operations to manage job concurrency with resource groups

Operations 5

GET /api/v4/projects/{id}/resource_groups #
GET /api/v4/projects/{id}/resource_groups/{key} #
PUT /api/v4/projects/{id}/resource_groups/{key} Edit an existing resource group #
GET /api/v4/projects/{id}/resource_groups/{key}/current_job #
GET /api/v4/projects/{id}/resource_groups/{key}/upcoming_jobs #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab-ci-ci-resource-groups-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-ci-ci-resource-groups-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Ci Resource Groups API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: ci_resource_groups
  description: Operations to manage job concurrency with resource groups
paths:
  /api/v4/projects/{id}/resource_groups:
    get:
      description: Get all resource groups for a project
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: Get all resource groups for a project
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_Ci_ResourceGroup'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - ci_resource_groups
      operationId: getApiV4ProjectsIdResourceGroups
  /api/v4/projects/{id}/resource_groups/{key}:
    get:
      description: Get a specific resource group
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: key
        description: The key of the resource group
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get a specific resource group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Ci_ResourceGroup'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - ci_resource_groups
      operationId: getApiV4ProjectsIdResourceGroupsKey
    put:
      summary: Edit an existing resource group
      description: Updates an existing resource group's properties.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: key
        description: The key of the resource group
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Edit an existing resource group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Ci_ResourceGroup'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - ci_resource_groups
      operationId: putApiV4ProjectsIdResourceGroupsKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4ProjectsIdResourceGroupsKey'
        required: true
  /api/v4/projects/{id}/resource_groups/{key}/current_job:
    get:
      description: Show current job for a specific resource group
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: key
        description: The key of the resource group
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Show current job for a specific resource group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Ci_JobBasic'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - ci_resource_groups
      operationId: getApiV4ProjectsIdResourceGroupsKeyCurrentJob
  /api/v4/projects/{id}/resource_groups/{key}/upcoming_jobs:
    get:
      description: List upcoming jobs for a specific resource group
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: key
        description: The key of the resource group
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: List upcoming jobs for a specific resource group
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_Ci_JobBasic'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - ci_resource_groups
      operationId: getApiV4ProjectsIdResourceGroupsKeyUpcomingJobs
components:
  schemas:
    API_Entities_Ci_ResourceGroup:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        key:
          type: string
          example: production
        process_mode:
          type: string
          example: unordered
        created_at:
          type: string
          format: date-time
          example: '2021-09-01T08:04:59.650Z'
        updated_at:
          type: string
          format: date-time
          example: '2021-09-01T08:04:59.650Z'
      required:
      - id
      - key
      - process_mode
      - created_at
      - updated_at
      description: API_Entities_Ci_ResourceGroup model
    API_Entities_CustomAttribute:
      type: object
      properties:
        key:
          type: string
          example: foo
        value:
          type: string
          example: bar
      required:
      - key
      - value
      description: API_Entities_CustomAttribute model
    putApiV4ProjectsIdResourceGroupsKey:
      type: object
      properties:
        process_mode:
          type: string
          description: The process mode of the resource group
          enum:
          - unordered
          - oldest_first
          - newest_first
          - newest_ready_first
      description: Edit an existing resource group
    API_Entities_User:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        username:
          type: string
          example: admin
        public_email:
          type: string
          example: john@example.com
        name:
          type: string
          example: Administrator
        state:
          type: string
          example: active
        locked:
          type: boolean
        avatar_url:
          type: string
          example: https://gravatar.com/avatar/1
        avatar_path:
          type: string
          example: /user/avatar/28/The-Big-Lebowski-400-400.png
        custom_attributes:
          type: array
          items:
            $ref: '#/components/schemas/API_Entities_CustomAttribute'
        web_url:
          type: string
          example: https://gitlab.example.com/root
        created_at:
          type: string
        bio:
          type: string
        location:
          type: string
        linkedin:
          type: string
        twitter:
          type: string
        discord:
          type: string
        website_url:
          type: string
        github:
          type: string
        job_title:
          type: string
        pronouns:
          type: string
        organization:
          type: string
        bot:
          type: boolean
        work_information:
          type: string
        followers:
          type: string
        following:
          type: string
        is_followed:
          type: string
        local_time:
          type: string
      required:
      - id
      - username
      - public_email
      - name
      - state
      - locked
      - avatar_url
      - web_url
      - bio
      - location
      - linkedin
      - twitter
      - discord
      - website_url
      - github
      - job_title
      - pronouns
      - organization
      - bot
      - work_information
      - local_time
    API_Entities_Ci_PipelineBasic:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        iid:
          type: integer
          format: int32
          example: 2
        project_id:
          type: integer
          format: int32
          example: 3
        sha:
          type: string
          example: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52
        ref:
          type: string
          example: feature-branch
        status:
          type: string
          example: success
        source:
          type: string
          example: push
        created_at:
          type: string
          format: date-time
          example: '2022-10-21T16:49:48.000+02:00'
        updated_at:
          type: string
          format: date-time
          example: '2022-10-21T16:49:48.000+02:00'
        web_url:
          type: string
          example: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61
      required:
      - id
      - iid
      - project_id
      - sha
      - ref
      - status
      - source
      - created_at
      - updated_at
      - web_url
      description: API_Entities_Ci_PipelineBasic model
    API_Entities_Commit:
      type: object
      properties:
        id:
          type: string
          example: 2695effb5807a22ff3d138d593fd856244e155e7
        short_id:
          type: string
          example: 2695effb
        created_at:
          type: string
          format: date-time
          example: '2017-07-26T11:08:53.000+02:00'
        parent_ids:
          type: array
          items:
            type: string
          example:
          - 2a4b78934375d7f53875269ffd4f45fd83a84ebe
        title:
          type: string
          example: Initial commit
        message:
          type: string
          example: Initial commit
        author_name:
          type: string
          example: John Smith
        author_email:
          type: string
          example: john@example.com
        authored_date:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        committer_name:
          type: string
          example: Jack Smith
        committer_email:
          type: string
          example: jack@example.com
        committed_date:
          type: string
          format: date-time
          example: '2012-05-28T04:42:42-07:00'
        trailers:
          type: object
          example:
            Merged-By: Jane Doe janedoe@gitlab.com
        extended_trailers:
          type: object
          example:
            Signed-off-by:
            - John Doe <johndoe@gitlab.com>
            - Jane Doe <janedoe@gitlab.com>
        web_url:
          type: string
          example: https://gitlab.example.com/janedoe/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746
      required:
      - id
      - short_id
      - created_at
      - parent_ids
      - title
      - message
      - author_name
      - author_email
      - authored_date
      - committer_name
      - committer_email
      - committed_date
      - trailers
      - extended_trailers
      - web_url
      description: API_Entities_Commit model
    API_Entities_Ci_JobBasic:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        status:
          type: string
          example: waiting_for_resource
        stage:
          type: string
          example: deploy
        name:
          type: string
          example: deploy_to_production
        ref:
          type: string
          example: main
        tag:
          type: boolean
        coverage:
          type: number
          format: float
          example: 98.29
        allow_failure:
          type: boolean
        created_at:
          type: string
          format: date-time
          example: '2015-12-24T15:51:21.880Z'
        started_at:
          type: string
          format: date-time
          example: '2015-12-24T17:54:30.733Z'
        finished_at:
          type: string
          format: date-time
          example: '2015-12-24T17:54:31.198Z'
        erased_at:
          type: string
          format: date-time
          example: '2015-12-24T18:00:29.728Z'
        duration:
          type: number
          format: float
          example: 0.465
          description: Time spent running
        queued_duration:
          type: number
          format: float
          example: 0.123
          description: Time spent enqueued
        user:
          $ref: '#/components/schemas/API_Entities_User'
        commit:
          $ref: '#/components/schemas/API_Entities_Commit'
        pipeline:
          $ref: '#/components/schemas/API_Entities_Ci_PipelineBasic'
        failure_reason:
          type: string
          example: script_failure
        web_url:
          type: string
          example: https://example.com/foo/bar/-/jobs/1
        project:
          type: object
          properties:
            ci_job_token_scope_enabled:
              type: string
              example: false
          required:
          - ci_job_token_scope_enabled
      required:
      - id
      - status
      - stage
      - name
      - ref
      - tag
      - coverage
      - allow_failure
      - created_at
      - started_at
      - finished_at
      - erased_at
      - duration
      - queued_duration
      - user
      - commit
      - pipeline
      - web_url
      - project
      description: API_Entities_Ci_JobBasic model
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query