GitLab API icon

GitLab API

Gitlab

Actions1062

Branches → getApiV4ProjectsIdRepositoryBranches

AI-generated

Summary

Retrieve a list of repository branches from a specific GitLab project using the GitLab API v4 endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project whose repository branches are to be retrieved.
  • page — Current page number for paginated results.
  • per_page — Number of branches to return per page.
  • search — Filter branches by names matching the given search string.
  • regex — Filter branches by names that match the given regular expression.
  • sort — Sort branches by the specified field: 'name_asc', 'updated_asc', or 'updated_desc'.
  • page_token — The branch name to start pagination from.
  • skipAuthentication — Option to skip authentication (default is false).
  • baseUrl — Custom base URL for the GitLab instance; defaults to https://gitlab.com.

Output shape

a list of branch objects as returned by the GitLab API v4 at /api/v4/projects/{id}/repository/branches

The output may be paginated according to the 'page' and 'per_page' query parameters. Authentication is performed unless 'skipAuthentication' is true. If filtering parameters like 'search' or 'regex' are provided, the returned list includes only branches matching these criteria.

Links

Discussion