GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdPipelinesLatest

AI-generated

Summary

Retrieve the latest pipeline for a specified GitLab project, optionally filtered by a branch reference.

Inputs

  • Id (required) — The project ID or URL-encoded path identifying the GitLab project to retrieve the latest pipeline from.
  • Ref — The branch reference to filter the pipeline by; defaults to the project's default branch if omitted.
  • Skip Authentication — Boolean to bypass authentication if set to true (default is false, meaning authentication is used).

Output shape

a single pipeline object representing the latest pipeline matching the project and optional branch ref

Returns the latest pipeline details as a single JSON object. Authentication is required unless explicitly skipped. The operation uses an HTTP GET request to /api/v4/projects/{id}/pipelines/latest with optional query parameter 'ref'.

Examples

Example 1: Retrieve latest pipeline for project ID 11 on the default branch

Set Path Parameter 'Id' to '11' and leave 'Ref' empty.

Example 2: Retrieve latest pipeline for project 'my-group/my-repo' specifically for 'develop' branch

Set Path Parameter 'Id' to 'my-group%2Fmy-repo' and Query Parameter 'Ref' to 'develop'.

Links

Discussion