GitLab API

GitlabTool

Actions1095

Branches → putApiV4ProjectsIdRepositoryBranchesBranchUnprotect

AI-generated

Summary

Unprotect a specific branch in a GitLab project by sending a PUT request to the GitLab API's branch unprotect endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the branch to unprotect.
  • branch (required) — The name of the branch to unprotect.
  • skipAuthentication — Whether to skip authentication for this API call; defaults to false.
  • baseUrl — The base URL for the GitLab instance API; defaults to 'https://gitlab.com'.

Output shape

a single record representing the updated branch status as returned by the GitLab API.

The operation returns the API response for the unprotected branch. The request requires authentication unless explicitly skipped. Path parameters 'id' and 'branch' are mandatory. This operation corresponds to a PUT HTTP method to the endpoint '/api/v4/projects/{id}/repository/branches/{branch}/unprotect'.

Examples

Example 1: Unprotect the 'develop' branch in project with ID 1234

Set 'id' to '1234' and 'branch' to 'develop'; ensure authentication is enabled.

Links

Discussion