GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdRepositoryCommitsShaStatuses

AI-generated

Summary

Retrieve the commit status details from a specific GitLab project repository for a given commit SHA, optionally filtering and sorting the results.

Inputs

  • id (required) — ID or URL-encoded path of the project from which to get commit statuses.
  • sha (required) — Hash of the commit to retrieve statuses for.
  • ref — Name of the branch or tag to filter the commit statuses; defaults to the default branch if not supplied.
  • stage — Filter statuses by build stage name.
  • name — Filter statuses by job name.
  • pipeline_id — Filter statuses by a specific pipeline ID.
  • all — Boolean to include all commit statuses rather than only the latest for each context; defaults to false.
  • order_by — Field by which to sort the statuses, either 'id' or 'pipeline_id'; defaults to 'id'.
  • sort — Sort order: 'asc' for ascending or 'desc' for descending; defaults to 'asc'.
  • page — Page number for paginated results; defaults to 1.
  • per_page — Number of items per page for pagination; defaults to 20.

Output shape

a paginated JSON list of commit status objects for the specified commit in the project repository

Supports pagination through 'page' and 'per_page' query parameters. Optional filtering by branch/tag, build stage, job name, pipeline ID, and sorting options are available. Returns multiple commit statuses with their details per the GitLab API specification.

Links

Discussion