GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdProtectedBranches

AI-generated

Summary

Retrieve a list of protected branches for a specific GitLab project using its ID or URL-encoded path.

Inputs

  • id (required) — The ID or URL-encoded path of the project to retrieve protected branches from.
  • page — The page number of results to return (for pagination). Defaults to 1.
  • per_page — The number of protected branches to return per page. Defaults to 20.
  • search — A search string to filter protected branches by name.
  • skipAuthentication — If set to true, skips authentication for the request. Defaults to false.
  • baseUrl — Optional base URL of the GitLab instance. Defaults to https://gitlab.com.

Output shape

a list of protected branch objects associated with the specified project

Results may be paginated according to the 'page' and 'per_page' query parameters. The operation uses HTTP GET method and requires proper GitLab API credentials unless authentication is skipped.

Links

Discussion