GitLab CI/CD commit_statuses API

Operations about commit_statuses

Operations 2

GET /api/v4/projects/{id}/repository/commits/{sha}/statuses #
POST /api/v4/projects/{id}/statuses/{sha} #

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-commit-statuses-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-commit-statuses-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Commit Statuses API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: commit_statuses
  description: Operations about commit_statuses
paths:
  /api/v4/projects/{id}/repository/commits/{sha}/statuses:
    get:
      description: Get a commit's statuses
      parameters:
      - in: path
        name: id
        description: ID or URL-encoded path of the project.
        required: true
        schema:
          type: string
      - in: path
        name: sha
        description: Hash of the commit.
        required: true
        example: 18f3e63d05582537db6d183d9d557be09e1f90c8
        schema:
          type: string
      - in: query
        name: ref
        description: Name of the branch or tag. Default is the default branch.
        required: false
        example: develop
        schema:
          type: string
      - in: query
        name: stage
        description: Filter statuses by build stage.
        required: false
        example: test
        schema:
          type: string
      - in: query
        name: name
        description: Filter statuses by job name.
        required: false
        example: bundler:audit
        schema:
          type: string
      - in: query
        name: pipeline_id
        description: Filter statuses by pipeline ID.
        required: false
        example: 1234
        schema:
          type: integer
          format: int32
      - in: query
        name: all
        description: Include all statuses instead of latest only. Default is `false`.
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: order_by
        description: Values for sorting statuses. Valid values are `id` and `pipeline_id`. Default is `id`.
        required: false
        schema:
          type: string
          enum:
          - id
          - pipeline_id
          default: id
      - in: query
        name: sort
        description: Sort statuses in ascending or descending order. Valid values are `asc` and `desc`. Default is `asc`.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - 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 a commit's statuses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_CommitStatus'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - commit_statuses
      operationId: getApiV4ProjectsIdRepositoryCommitsShaStatuses
  /api/v4/projects/{id}/statuses/{sha}:
    post:
      description: Post status to a commit
      parameters:
      - in: path
        name: id
        description: ID or URL-encoded path of the project.
        required: true
        schema:
          type: string
      - in: path
        name: sha
        description: The commit hash
        required: true
        example: 18f3e63d05582537db6d183d9d557be09e1f90c8
        schema:
          type: string
      responses:
        '200':
          description: Post status to a commit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_CommitStatus'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Another update to this commit status is in progress
      tags:
      - commit_statuses
      operationId: postApiV4ProjectsIdStatusesSha
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ProjectsIdStatusesSha'
        required: true
components:
  schemas:
    postApiV4ProjectsIdStatusesSha:
      type: object
      properties:
        state:
          type: string
          description: The state of the status
          enum:
          - pending
          - running
          - success
          - failed
          - canceled
          - skipped
          example: pending
        ref:
          type: string
          description: The ref
          example: develop
        target_url:
          type: string
          description: The target URL to associate with this status
          example: https://gitlab.example.com/janedoe/gitlab-foss/builds/91
        description:
          type: string
          description: A short description of the status
        name:
          type: string
          description: A string label to differentiate this status from the status of other systems
          default: default
          example: coverage
        context:
          type: string
          description: A string label to differentiate this status from the status of other systems
          default: default
          example: coverage
        coverage:
          type: number
          format: float
          description: The total code coverage
          example: 100.0
        pipeline_id:
          type: integer
          format: int32
          description: An existing pipeline ID, when multiple pipelines on the same commit SHA have been triggered
      required:
      - state
      description: Post status to a commit
    API_Entities_CommitStatus:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 93
        sha:
          type: string
          example: 18f3e63d05582537db6d183d9d557be09e1f90c8
        ref:
          type: string
          example: develop
        status:
          type: string
          example: success
        name:
          type: string
          example: default
        target_url:
          type: string
          example: https://gitlab.example.com/janedoe/gitlab-foss/builds/91
        description:
          type: string
        created_at:
          type: string
          format: date-time
          example: '2016-01-19T09:05:50.355Z'
        started_at:
          type: string
          format: date-time
          example: '2016-01-20T08:40:25.832Z'
        finished_at:
          type: string
          format: date-time
          example: '2016-01-21T08:40:25.832Z'
        allow_failure:
          type: boolean
          example: false
        coverage:
          type: number
          format: float
          example: 98.29
        pipeline_id:
          type: integer
          format: int32
          example: 101
        author:
          $ref: '#/components/schemas/API_Entities_UserBasic'
      required:
      - id
      - sha
      - ref
      - status
      - name
      - target_url
      - description
      - created_at
      - started_at
      - finished_at
      - allow_failure
      - coverage
      - pipeline_id
      - author
      description: API_Entities_CommitStatus model
    API_Entities_UserBasic:
      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
      required:
      - id
      - username
      - public_email
      - name
      - state
      - locked
      - avatar_url
      - web_url
      description: API_Entities_UserBasic 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
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query