# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand. overlay: 1.0.0 info: title: API Evangelist conversational phrasing for Bitbucket Branch restrictions API version: 1.0.0 extends: openapi/bitbucket-branch-restrictions-api-openapi.yml actions: - target: $.info update: x-apievangelist-phrasing: method: generated generated: '2026-10-01' generator: build-phrasing.py label: Generated by API Evangelist operations: 5 - target: $.paths['/repositories/{workspace}/{repo_slug}/branch-restrictions'].get update: x-apievangelist-phrasing: intent: List a repository's branch restrictions effect: read questions: - Which branch protection rules are set on my Bitbucket repo? - Can I filter branch restrictions by kind, like only push rules? - What restrictions apply to branches matching a given pattern? instructions: - text: List all branch restrictions on {workspace}/{repo_slug}. slots: workspace: path.workspace repo_slug: path.repo_slug - text: Show {kind} restrictions in {workspace}/{repo_slug}. slots: kind: query.kind workspace: path.workspace repo_slug: path.repo_slug - text: List restrictions on {workspace}/{repo_slug} that match pattern {pattern}. slots: workspace: path.workspace repo_slug: path.repo_slug pattern: query.pattern method: generated generated: '2026-10-01' - target: $.paths['/repositories/{workspace}/{repo_slug}/branch-restrictions'].post update: x-apievangelist-phrasing: intent: Create a branch restriction rule effect: write questions: - How do I stop people force-pushing to main? - Can I require approvals before merging into release branches? - What kinds of branch restriction rules can I create? instructions: - text: Add a {kind} restriction on branches matching {pattern} in {workspace}/{repo_slug}. slots: kind: requestBody.kind pattern: requestBody.pattern workspace: path.workspace repo_slug: path.repo_slug - text: Protect branch pattern {pattern} in {workspace}/{repo_slug} from deletion. slots: pattern: requestBody.pattern workspace: path.workspace repo_slug: path.repo_slug method: generated generated: '2026-10-01' - target: $.paths['/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}'].get update: x-apievangelist-phrasing: intent: Get a branch restriction rule effect: read questions: - Can I look up a single branch restriction by its id? - What exactly does one branch protection rule enforce? instructions: - text: Get branch restriction {id} in {workspace}/{repo_slug}. slots: id: path.id workspace: path.workspace repo_slug: path.repo_slug - text: Show the details of restriction rule {id} on {repo_slug}. slots: id: path.id repo_slug: path.repo_slug method: generated generated: '2026-10-01' - target: $.paths['/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}'].put update: x-apievangelist-phrasing: intent: Update a branch restriction rule effect: write questions: - How do I change the pattern an existing branch restriction applies to? - Can I edit the users exempt from a branch restriction I already created? instructions: - text: Change branch restriction {id} in {workspace}/{repo_slug} to match {pattern}. slots: id: path.id workspace: path.workspace repo_slug: path.repo_slug pattern: requestBody.pattern - text: Update existing restriction rule {id} on {repo_slug} to kind {kind}. slots: id: path.id repo_slug: path.repo_slug kind: requestBody.kind method: generated generated: '2026-10-01' - target: $.paths['/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}'].delete update: x-apievangelist-phrasing: intent: Delete a branch restriction rule effect: destructive questions: - How do I remove a branch protection rule? - Can I lift a restriction on a branch by deleting the rule? instructions: - text: Delete branch restriction {id} from {workspace}/{repo_slug}. slots: id: path.id workspace: path.workspace repo_slug: path.repo_slug - text: Remove restriction rule {id} on {repo_slug}. slots: id: path.id repo_slug: path.repo_slug method: generated generated: '2026-10-01'