Atlassian · Capability

Atlassian Bit Bucket Repositories API — Restriction

Atlassian Bit Bucket Repositories API — Restriction. 4 operations. Lead operation: Atlassian Create Branch Restriction Rule. Self-contained Naftiko capability covering one Atlassian business surface.

Run with Naftiko AtlassianRestriction

What You Can Do

POST
Createbranchrestrictionrule — Atlassian Create Branch Restriction Rule
/v1/repositories/{workspace}/{repo-slug}/branch-restrictions
DELETE
Deletebranchrestrictionrule — Atlassian Delete Branch Restriction Rule
/v1/repositories/{workspace}/{repo-slug}/branch-restrictions/{id}
GET
Getbranchrestrictionrule — Atlassian Get Branch Restriction Rule
/v1/repositories/{workspace}/{repo-slug}/branch-restrictions/{id}
PUT
Updatebranchrestrictionrule — Atlassian Update Branch Restriction Rule
/v1/repositories/{workspace}/{repo-slug}/branch-restrictions/{id}

MCP Tools

atlassian-create-branch-restriction-rule

Atlassian Create Branch Restriction Rule

atlassian-delete-branch-restriction-rule

Atlassian Delete Branch Restriction Rule

idempotent
atlassian-get-branch-restriction-rule

Atlassian Get Branch Restriction Rule

read-only idempotent
atlassian-update-branch-restriction-rule

Atlassian Update Branch Restriction Rule

idempotent

Capability Spec

bitbucket-repositories-restriction.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Atlassian Bit Bucket Repositories API — Restriction
  description: 'Atlassian Bit Bucket Repositories API — Restriction. 4 operations. Lead operation: Atlassian Create Branch
    Restriction Rule. Self-contained Naftiko capability covering one Atlassian business surface.'
  tags:
  - Atlassian
  - Restriction
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ATLASSIAN_API_KEY: ATLASSIAN_API_KEY
capability:
  consumes:
  - type: http
    namespace: bitbucket-repositories-restriction
    baseUri: https://api.bitbucket.org/2.0
    description: Atlassian Bit Bucket Repositories API — Restriction business capability. Self-contained, no shared references.
    resources:
    - name: repositories-workspace-repo_slug-branch-restrictions
      path: /repositories/{workspace}/{repo_slug}/branch-restrictions
      operations:
      - name: createbranchrestrictionrule
        method: POST
        description: Atlassian Create Branch Restriction Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repositories-workspace-repo_slug-branch-restrictions-id
      path: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}
      operations:
      - name: deletebranchrestrictionrule
        method: DELETE
        description: Atlassian Delete Branch Restriction Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getbranchrestrictionrule
        method: GET
        description: Atlassian Get Branch Restriction Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatebranchrestrictionrule
        method: PUT
        description: Atlassian Update Branch Restriction Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.ATLASSIAN_API_KEY}}'
  exposes:
  - type: rest
    namespace: bitbucket-repositories-restriction-rest
    port: 8080
    description: REST adapter for Atlassian Bit Bucket Repositories API — Restriction. 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: POST
        name: createbranchrestrictionrule
        description: Atlassian Create Branch Restriction Rule
        call: bitbucket-repositories-restriction.createbranchrestrictionrule
        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: deletebranchrestrictionrule
        description: Atlassian Delete Branch Restriction Rule
        call: bitbucket-repositories-restriction.deletebranchrestrictionrule
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getbranchrestrictionrule
        description: Atlassian Get Branch Restriction Rule
        call: bitbucket-repositories-restriction.getbranchrestrictionrule
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatebranchrestrictionrule
        description: Atlassian Update Branch Restriction Rule
        call: bitbucket-repositories-restriction.updatebranchrestrictionrule
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: bitbucket-repositories-restriction-mcp
    port: 9090
    transport: http
    description: MCP adapter for Atlassian Bit Bucket Repositories API — Restriction. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: atlassian-create-branch-restriction-rule
      description: Atlassian Create Branch Restriction Rule
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: bitbucket-repositories-restriction.createbranchrestrictionrule
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: atlassian-delete-branch-restriction-rule
      description: Atlassian Delete Branch Restriction Rule
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: bitbucket-repositories-restriction.deletebranchrestrictionrule
      outputParameters:
      - type: object
        mapping: $.
    - name: atlassian-get-branch-restriction-rule
      description: Atlassian Get Branch Restriction Rule
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-repositories-restriction.getbranchrestrictionrule
      outputParameters:
      - type: object
        mapping: $.
    - name: atlassian-update-branch-restriction-rule
      description: Atlassian Update Branch Restriction Rule
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: bitbucket-repositories-restriction.updatebranchrestrictionrule
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.