naftiko: 1.0.0-alpha2 info: label: Bitbucket API — Branch restrictions description: 'Bitbucket API — Branch restrictions. 5 operations. Lead operation: List branch restrictions. Self-contained Naftiko capability covering one Bitbucket business surface.' tags: - Bitbucket - Branch restrictions created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BITBUCKET_API_KEY: BITBUCKET_API_KEY capability: consumes: - type: http namespace: cloud-rest-branch-restrictions baseUri: https://api.bitbucket.org/2.0 description: Bitbucket API — Branch restrictions business capability. Self-contained, no shared references. resources: - name: repositories-workspace-repo_slug-branch-restrictions path: /repositories/{workspace}/{repo_slug}/branch-restrictions operations: - name: get method: GET description: List branch restrictions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: kind in: query type: string description: Branch restrictions of this type - name: pattern in: query type: string description: Branch restrictions applied to branches of this pattern - name: post method: POST description: Create a branch restriction rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: _body in: body type: string description: The new rule required: true - name: repositories-workspace-repo_slug-branch-restrictions-id path: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id} operations: - name: delete method: DELETE description: Delete a branch restriction rule outputRawFormat: json outputParameters: - name: result type: object value: $. - name: get method: GET description: Get a branch restriction rule outputRawFormat: json outputParameters: - name: result type: object value: $. - name: put method: PUT description: Update a branch restriction rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: _body in: body type: string description: The new version of the existing rule required: true exposes: - type: rest namespace: cloud-rest-branch-restrictions-rest port: 8080 description: REST adapter for Bitbucket API — Branch restrictions. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repositories/{workspace}/{repo-slug}/branch-restrictions name: repositories-workspace-repo-slug-branch-restrictions description: REST surface for repositories-workspace-repo_slug-branch-restrictions. operations: - method: GET name: get description: List branch restrictions call: cloud-rest-branch-restrictions.get with: kind: rest.kind pattern: rest.pattern outputParameters: - type: object mapping: $. - method: POST name: post description: Create a branch restriction rule call: cloud-rest-branch-restrictions.post with: _body: rest._body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/branch-restrictions/{id} name: repositories-workspace-repo-slug-branch-restrictions-id description: REST surface for repositories-workspace-repo_slug-branch-restrictions-id. operations: - method: DELETE name: delete description: Delete a branch restriction rule call: cloud-rest-branch-restrictions.delete outputParameters: - type: object mapping: $. - method: GET name: get description: Get a branch restriction rule call: cloud-rest-branch-restrictions.get outputParameters: - type: object mapping: $. - method: PUT name: put description: Update a branch restriction rule call: cloud-rest-branch-restrictions.put with: _body: rest._body outputParameters: - type: object mapping: $. - type: mcp namespace: cloud-rest-branch-restrictions-mcp port: 9090 transport: http description: MCP adapter for Bitbucket API — Branch restrictions. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-branch-restrictions description: List branch restrictions hints: readOnly: true destructive: false idempotent: true call: cloud-rest-branch-restrictions.get with: kind: tools.kind pattern: tools.pattern outputParameters: - type: object mapping: $. - name: create-branch-restriction-rule description: Create a branch restriction rule hints: readOnly: false destructive: false idempotent: false call: cloud-rest-branch-restrictions.post with: _body: tools._body outputParameters: - type: object mapping: $. - name: delete-branch-restriction-rule description: Delete a branch restriction rule hints: readOnly: false destructive: true idempotent: true call: cloud-rest-branch-restrictions.delete outputParameters: - type: object mapping: $. - name: get-branch-restriction-rule description: Get a branch restriction rule hints: readOnly: true destructive: false idempotent: true call: cloud-rest-branch-restrictions.get outputParameters: - type: object mapping: $. - name: update-branch-restriction-rule description: Update a branch restriction rule hints: readOnly: false destructive: false idempotent: true call: cloud-rest-branch-restrictions.put with: _body: tools._body outputParameters: - type: object mapping: $.