Hello,
Looking at the API response for a branch permission (see below), we are not able to find ‘Allow rewriting branch history’ nor ‘Allow deleting this branch’ settings in the response (see this screenshot
Are those just not in the API or do I need to look somewhere else?
Below is an example of the response for a test repo branch permission…we can find all the settings except those two mentioned above.
Thanks!
{
“pagelen”: 10,
“values”: [
{
“kind”: “require_passing_builds_to_merge”,
“users”: ,
“links”: {
“self”: {
“href”: 2.0/repositories/ABC/private-repo-test/branch-restrictions/4128570"
}
},
“pattern”: “test”,
“value”: 1,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128570
},
{
“kind”: “require_approvals_to_merge”,
“users”: ,
“links”: {
“self”: {
“href”: 2.0/repositories/ABC/private-repo-test/branch-restrictions/4128569"
}
},
“pattern”: “test”,
“value”: 1,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128569
},
{
“kind”: “reset_pullrequest_approvals_on_change”,
“users”: ,
“links”: {
“self”: {
“href”: “2.0/repositories/ABC/private-repo-test/branch-restrictions/4128568”
}
},
“pattern”: “test”,
“value”: null,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128568
},
{
“kind”: “require_tasks_to_be_completed”,
“users”: ,
“links”: {
“self”: {
“href”: “2.0/repositories/ABC/private-repo-test/branch-restrictions/4128567”
}
},
“pattern”: “test”,
“value”: null,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128567
},
{
“kind”: “enforce_merge_checks”,
“users”: ,
“links”: {
“self”: {
“href”: “/2.0/repositories/ABC/private-repo-test/branch-restrictions/4128566”
}
},
“pattern”: “test”,
“value”: null,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128566
},
{
“kind”: “restrict_merges”,
“users”: [
{
“username”: “tc”,
“display_name”: “TC”,
“type”: “user”,
“uuid”: “{760f4849-362f-46e8-a676}”,
“links”: {
“self”: {
“href”: “api.bitbucket.org/2.0/users/tc”
},
“html”: {
“href”: “/tc/”
},
“avatar”: {
“href”: “/account/tc/avatar/32/”
}
}
},
{
“username”: “aw”,
“display_name”: “AW”,
“type”: “user”,
“uuid”: “{2dcdcae5-101d-4939-ad3e}”,
“links”: {
“self”: {
“href”: “/2.0/users/aw”
},
“html”: {
“href”: “/aw/”
},
“avatar”: {
“href”: “/account/aq/avatar/32/”
}
}
}
],
“links”: {
“self”: {
“href”: “/2.0/repositories/ABC/private-repo-test/branch-restrictions/4128565”
}
},
“pattern”: “test”,
“value”: null,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128565
},
{
“kind”: “push”,
“users”: [
{
“username”: “aw”,
“display_name”: “AW”,
“type”: “user”,
“uuid”: “{2dcdcae5-101d-4939-ad3e}”,
“links”: {
“self”: {
“href”: “/2.0/users/aw”
},
“html”: {
“href”: “/aw/”
},
“avatar”: {
“href”: “account/aw/avatar/32/”
}
}
}
],
“links”: {
“self”: {
“href”: “/2.0/repositories/ABC/private-repo-test/branch-restrictions/4128564”
}
},
“pattern”: “test”,
“value”: null,
“groups”: ,
“type”: “branchrestriction”,
“id”: 4128564
}
],
“page”: 1,
“size”: 7
}