GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsId(refRef)triggerPipeline

AI-generated

Summary

Trigger a pipeline run for a specific GitLab project and reference (branch, tag, or commit SHA) by invoking the corresponding API endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to trigger the pipeline for.
  • ref (required) — The commit SHA or name of a branch or tag within the project to use as the pipeline reference.
  • postApiV4ProjectsId(refRef)triggerPipeline (required) — The body of the request containing parameters for triggering the pipeline as defined by the GitLab API schema.
  • baseUrl — Optional base URL for the GitLab instance; defaults to https://gitlab.com if not specified.
  • skipAuthentication — Optionally skip authentication if set to true.

Output shape

a single JSON object representing the pipeline that was triggered

The response conforms to GitLab's pipeline creation response schema. Authentication is required unless explicitly skipped. The operation uses HTTP POST method to the path /api/v4/projects/{id}/ref/{ref}/trigger/pipeline.

Examples

Example 1: Trigger a pipeline for project ID 18 on branch 'develop' with required parameters

Set 'id' to '18', 'ref' to 'develop', provide the required request body per schema, ensure credentials are set or skipAuthentication is false.

Links

Discussion