GitLab API

GitlabTool

Actions1095

Projects → getApiV4ProjectsIdProtectedBranchesName

AI-generated

Summary

Retrieve details of a specific protected branch in a GitLab project by providing the project ID or URL-encoded path and the branch name.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • name (required) — The name of the branch or a wildcard pattern to identify the protected branch.
  • skipAuthentication — Whether to skip authentication for this request; defaults to false.
  • baseUrl — The base URL of the GitLab instance; defaults to 'https://gitlab.com'.

Output shape

a single JSON object representing the protected branch's details.

Returns data from the GitLab API endpoint /api/v4/projects/{id}/protected_branches/{name}. Authentication is required unless explicitly skipped. The response includes branch protection properties as defined by the GitLab API.

Links

Discussion