GitLab CI/CD ci_triggers API

Operations about ci_triggers

Operations 6

POST /api/v4/projects/{id}/(ref/{ref}/)trigger/pipeline #
GET /api/v4/projects/{id}/triggers #
POST /api/v4/projects/{id}/triggers #
GET /api/v4/projects/{id}/triggers/{trigger_id} #
PUT /api/v4/projects/{id}/triggers/{trigger_id} #
DELETE /api/v4/projects/{id}/triggers/{trigger_id} #

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-triggers-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-triggers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Ci Triggers API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: ci_triggers
  description: Operations about ci_triggers
paths:
  /api/v4/projects/{id}/(ref/{ref}/)trigger/pipeline:
    post:
      description: Trigger a GitLab project pipeline
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        schema:
          type: string
      - in: path
        name: ref
        description: The commit sha or name of a branch or tag
        required: true
        example: develop
        schema:
          type: string
      responses:
        '201':
          description: Trigger a GitLab project pipeline
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Ci_Pipeline'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - ci_triggers
      operationId: postApiV4ProjectsId(refRef)triggerPipeline
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ProjectsId_refRef_triggerPipeline'
        required: true
  /api/v4/projects/{id}/triggers:
    get:
      description: Get trigger tokens list
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        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 trigger tokens list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_Trigger'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - ci_triggers
      operationId: getApiV4ProjectsIdTriggers
    post:
      description: Create a trigger token
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        schema:
          type: string
      responses:
        '201':
          description: Create a trigger token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Trigger'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - ci_triggers
      operationId: postApiV4ProjectsIdTriggers
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ProjectsIdTriggers'
        required: true
  /api/v4/projects/{id}/triggers/{trigger_id}:
    get:
      description: Get specific trigger token of a project
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        schema:
          type: string
      - in: path
        name: trigger_id
        description: The trigger token ID
        required: true
        example: 10
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Get specific trigger token of a project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Trigger'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - ci_triggers
      operationId: getApiV4ProjectsIdTriggersTriggerId
    put:
      description: Update a trigger token
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        schema:
          type: string
      - in: path
        name: trigger_id
        description: The trigger token ID
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Update a trigger token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Trigger'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - ci_triggers
      operationId: putApiV4ProjectsIdTriggersTriggerId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4ProjectsIdTriggersTriggerId'
        required: true
    delete:
      description: Delete a trigger token
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        example: 18
        schema:
          type: string
      - in: path
        name: trigger_id
        description: The trigger token ID
        required: true
        example: 10
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: Delete a trigger token
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '412':
          description: Precondition Failed
      tags:
      - ci_triggers
      operationId: deleteApiV4ProjectsIdTriggersTriggerId
components:
  schemas:
    API_Entities_Ci_Pipeline:
      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: '2015-12-24T15:51:21.880Z'
        updated_at:
          type: string
          format: date-time
          example: '2015-12-24T17:54:31.198Z'
        web_url:
          type: string
          example: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61
        before_sha:
          type: string
          example: a91957a858320c0e17f3a0eca7cfacbff50ea29a
        tag:
          type: boolean
          example: false
        yaml_errors:
          type: string
          example: 'widgets:build: needs ''widgets:test'''
        user:
          $ref: '#/components/schemas/API_Entities_UserBasic'
        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'
        committed_at:
          type: string
          format: date-time
          example: '2015-12-24T15:51:21.880Z'
        duration:
          type: integer
          format: int32
          example: 127
          description: Time spent running in seconds
        queued_duration:
          type: integer
          format: int32
          example: 63
          description: Time spent enqueued in seconds
        coverage:
          type: number
          format: float
          example: 98.29
        detailed_status:
          $ref: '#/components/schemas/DetailedStatusEntity'
        archived:
          type: boolean
          example: false
      required:
      - id
      - iid
      - project_id
      - sha
      - ref
      - status
      - source
      - created_at
      - updated_at
      - web_url
      - before_sha
      - tag
      - yaml_errors
      - user
      - started_at
      - finished_at
      - committed_at
      - duration
      - queued_duration
      - coverage
      - detailed_status
      - archived
      description: API_Entities_Ci_Pipeline model
    postApiV4ProjectsIdTriggers:
      type: object
      properties:
        description:
          type: string
          description: The trigger token description
          example: my trigger token description
        expires_at:
          type: string
          format: date-time
          description: Timestamp of when the pipeline trigger token expires.
          example: '2024-07-01T00:00:00.000Z'
      required:
      - description
      description: Create a trigger token
    DetailedStatusEntity:
      type: object
      properties:
        icon:
          type: string
          example: status_success
        text:
          type: string
          example: passed
        label:
          type: string
          example: passed
        group:
          type: string
          example: success
        tooltip:
          type: string
          example: passed
        has_details:
          type: boolean
          example: true
        details_path:
          type: string
          example: /test-group/test-project/-/pipelines/287
        illustration:
          type: object
          example:
            image: illustrations/empty-state/empty-job-not-triggered-md.svg
            size: ''
            title: This job has not been triggered yet
            content: This job depends on upstream jobs that need to succeed in order for this job to be triggered
        favicon:
          type: string
          example: /assets/ci_favicons/favicon_status_success.png
        action:
          type: object
          properties:
            icon:
              type: string
              example: cancel
            title:
              type: string
              example: Cancel
            path:
              type: string
              example: /namespace1/project1/-/jobs/2/cancel
            method:
              type: string
              example: post
            button_title:
              type: string
              example: Cancel this job
            confirmation_message:
              type: string
              example: Are you sure?
          required:
          - icon
          - title
          - path
          - method
          - button_title
          - confirmation_message
      required:
      - icon
      - text
      - label
      - group
      - tooltip
      - has_details
      - details_path
      - illustration
      - favicon
    API_Entities_CustomAttribute:
      type: object
      properties:
        key:
          type: string
          example: foo
        value:
          type: string
          example: bar
      required:
      - key
      - value
      description: API_Entities_CustomAttribute 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
    postApiV4ProjectsId_refRef_triggerPipeline:
      type: object
      properties:
        token:
          type: string
          description: The unique token of trigger or job token
          example: 6d056f63e50fe6f8c5f8f4aa10edb7
        variables:
          type: object
          description: The list of variables to be injected into build
          example:
            VAR1: value1
            VAR2: value2
        inputs:
          type: object
          description: The list of inputs to be used to create the pipeline.
      required:
      - token
      description: Trigger a GitLab project pipeline
    API_Entities_Trigger:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 10
        token:
          type: string
          example: 6d056f63e50fe6f8c5f8f4aa10edb7
        description:
          type: string
          example: test
        created_at:
          type: string
          format: date-time
          example: '2015-12-24T15:51:21.880Z'
        updated_at:
          type: string
          format: date-time
          example: '2015-12-24T17:54:31.198Z'
        last_used:
          type: string
          format: date-time
          example: '2015-12-24T17:54:31.198Z'
        expires_at:
          type: string
          format: date-time
          example: '2015-12-24T17:54:31.198Z'
        owner:
          $ref: '#/components/schemas/API_Entities_UserBasic'
      required:
      - id
      - token
      - description
      - created_at
      - updated_at
      - last_used
      - expires_at
      - owner
      description: API_Entities_Trigger model
    putApiV4ProjectsIdTriggersTriggerId:
      type: object
      properties:
        description:
          type: string
          description: The trigger token description
      description: Update a trigger token
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query