Update a branch restriction rule
Updates an existing branch restriction rule.
Fields not present in the request body are ignored.
See POST for details.
Request
- Base URLhttps://api.bitbucket.org/2.0
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: repository:admin
- or HTTP basic
- or API key in header Authorization
Request body
The branch restriction status' id.
The type of restriction that is being applied.
Indicates how the restriction is matched against a branch. The default is glob.
Apply the restriction to branches of this type. Active when branch_match_kind is branching_model. The branch type will be calculated using the branching model configured for the repository.
Apply the restriction to branches that match this pattern. Active when branch_match_kind is glob. Will be empty when branch_match_kind is branching_model.
List of source branch names allowed to push back to the restricted branch. Used in conjunction with pipeline-based restrictions.
Value with kind-specific semantics:
-
require_approvals_to_merge uses it to require a minimum number of approvals on a PR.
-
require_default_reviewer_approvals_to_merge uses it to require a minimum number of approvals from default reviewers on a PR.
-
require_passing_builds_to_merge uses it to require a minimum number of passing builds.
-
require_commits_behind uses it to require the current branch is up to a maximum number of commits behind it destination.
Response
The updated branch restriction rule
The branch restriction status' id.
The type of restriction that is being applied.
Indicates how the restriction is matched against a branch. The default is glob.
Apply the restriction to branches of this type. Active when branch_match_kind is branching_model. The branch type will be calculated using the branching model configured for the repository.
Apply the restriction to branches that match this pattern. Active when branch_match_kind is glob. Will be empty when branch_match_kind is branching_model.
List of source branch names allowed to push back to the restricted branch. Used in conjunction with pipeline-based restrictions.
Value with kind-specific semantics:
-
require_approvals_to_merge uses it to require a minimum number of approvals on a PR.
-
require_default_reviewer_approvals_to_merge uses it to require a minimum number of approvals from default reviewers on a PR.
-
require_passing_builds_to_merge uses it to require a minimum number of passing builds.
-
require_commits_behind uses it to require the current branch is up to a maximum number of commits behind it destination.
Changes
No recorded changes to this operation across all 23 revisions of this API.