protected_branches
Retrieve a protected branch or wildcard protected branch
Retrieves a specified protected branch or wildcard protected branch.
get/api/v4/projects/{id}/protected_branches/{name}
Request
- Base URLhttps://gitlab.com
- Authnone declared
Path parameters
idstring required
The ID or URL-encoded path of the project
namestring required
The name of the branch or wildcard
Response
Retrieve a protected branch or wildcard protected branch
Example response
{
"id": 1,
"name": "main",
"push_access_levels": [
{
"id": 1,
"access_level": 40,
"access_level_description": "Maintainers",
"deploy_key_id": 1,
"user_id": 1,
"group_id": 1,
"member_role_id": 42,
"member_role_name": "Lead Developer"
}
],
"merge_access_levels": [
{
"id": 1,
"access_level": 40,
"access_level_description": "Maintainers",
"deploy_key_id": 1,
"user_id": 1,
"group_id": 1,
"member_role_id": 42,
"member_role_name": "Lead Developer"
}
],
"unprotect_access_levels": [
{
"id": 1,
"access_level": 40,
"access_level_description": "Maintainers",
"deploy_key_id": 1,
"user_id": 1,
"group_id": 1,
"member_role_id": 42,
"member_role_name": "Lead Developer"
}
]
}Changes
No recorded changes to this operation across all 5 revisions of this API.