Bitbucket · Capability

Bitbucket API — Deployments

Bitbucket API — Deployments. 16 operations. Lead operation: List repository deploy keys. Self-contained Naftiko capability covering one Bitbucket business surface.

Run with Naftiko BitbucketDeployments

What You Can Do

GET
Get — List repository deploy keys
/v1/repositories/{workspace}/{repo-slug}/deploy-keys
POST
Post — Add a repository deploy key
/v1/repositories/{workspace}/{repo-slug}/deploy-keys
DELETE
Delete — Delete a repository deploy key
/v1/repositories/{workspace}/{repo-slug}/deploy-keys/{key-id}
GET
Get — Get a repository deploy key
/v1/repositories/{workspace}/{repo-slug}/deploy-keys/{key-id}
PUT
Put — Update a repository deploy key
/v1/repositories/{workspace}/{repo-slug}/deploy-keys/{key-id}
GET
Getdeploymentsforrepository — List deployments
/v1/repositories/{workspace}/{repo-slug}/deployments
GET
Getdeploymentforrepository — Get a deployment
/v1/repositories/{workspace}/{repo-slug}/deployments/{deployment-uuid}
GET
Getenvironmentsforrepository — List environments
/v1/repositories/{workspace}/{repo-slug}/environments
POST
Createenvironment — Create an environment
/v1/repositories/{workspace}/{repo-slug}/environments
GET
Getenvironmentforrepository — Get an environment
/v1/repositories/{workspace}/{repo-slug}/environments/{environment-uuid}
DELETE
Deleteenvironmentforrepository — Delete an environment
/v1/repositories/{workspace}/{repo-slug}/environments/{environment-uuid}
POST
Updateenvironmentforrepository — Update an environment
/v1/repositories/{workspace}/{repo-slug}/environments/{environment-uuid}/changes
GET
Get — List project deploy keys
/v1/workspaces/{workspace}/projects/{project-key}/deploy-keys
POST
Post — Create a project deploy key
/v1/workspaces/{workspace}/projects/{project-key}/deploy-keys
DELETE
Delete — Delete a deploy key from a project
/v1/workspaces/{workspace}/projects/{project-key}/deploy-keys/{key-id}
GET
Get — Get a project deploy key
/v1/workspaces/{workspace}/projects/{project-key}/deploy-keys/{key-id}

MCP Tools

list-repository-deploy-keys

List repository deploy keys

read-only idempotent
add-repository-deploy-key

Add a repository deploy key

delete-repository-deploy-key

Delete a repository deploy key

idempotent
get-repository-deploy-key

Get a repository deploy key

read-only idempotent
update-repository-deploy-key

Update a repository deploy key

idempotent
list-deployments

List deployments

read-only idempotent
get-deployment

Get a deployment

read-only idempotent
list-environments

List environments

read-only idempotent
create-environment

Create an environment

get-environment

Get an environment

read-only idempotent
delete-environment

Delete an environment

idempotent
update-environment

Update an environment

list-project-deploy-keys

List project deploy keys

read-only idempotent
create-project-deploy-key

Create a project deploy key

delete-deploy-key-project

Delete a deploy key from a project

idempotent
get-project-deploy-key

Get a project deploy key

read-only idempotent

Capability Spec

cloud-rest-deployments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Bitbucket API — Deployments
  description: 'Bitbucket API — Deployments. 16 operations. Lead operation: List repository deploy keys. Self-contained Naftiko
    capability covering one Bitbucket business surface.'
  tags:
  - Bitbucket
  - Deployments
  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-deployments
    baseUri: https://api.bitbucket.org/2.0
    description: Bitbucket API — Deployments business capability. Self-contained, no shared references.
    resources:
    - name: repositories-workspace-repo_slug-deploy-keys
      path: /repositories/{workspace}/{repo_slug}/deploy-keys
      operations:
      - name: get
        method: GET
        description: List repository deploy keys
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Add a repository deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-deploy-keys-key_id
      path: /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
      operations:
      - name: delete
        method: DELETE
        description: Delete a repository deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get a repository deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update a repository deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-deployments
      path: /repositories/{workspace}/{repo_slug}/deployments
      operations:
      - name: getdeploymentsforrepository
        method: GET
        description: List deployments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
    - name: repositories-workspace-repo_slug-deployments-deployment_uuid
      path: /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}
      operations:
      - name: getdeploymentforrepository
        method: GET
        description: Get a deployment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
        - name: deployment_uuid
          in: path
          type: string
          description: The deployment UUID.
          required: true
    - name: repositories-workspace-repo_slug-environments
      path: /repositories/{workspace}/{repo_slug}/environments
      operations:
      - name: getenvironmentsforrepository
        method: GET
        description: List environments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
      - name: createenvironment
        method: POST
        description: Create an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
        - name: _body
          in: body
          type: string
          description: The environment to create.
          required: true
    - name: repositories-workspace-repo_slug-environments-environment_uuid
      path: /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}
      operations:
      - name: getenvironmentforrepository
        method: GET
        description: Get an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
        - name: environment_uuid
          in: path
          type: string
          description: The environment UUID.
          required: true
      - name: deleteenvironmentforrepository
        method: DELETE
        description: Delete an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
        - name: environment_uuid
          in: path
          type: string
          description: The environment UUID.
          required: true
    - name: repositories-workspace-repo_slug-environments-environment_uuid-changes
      path: /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes
      operations:
      - name: updateenvironmentforrepository
        method: POST
        description: Update an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace
          in: path
          type: string
          description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example
            `{workspace UUID}`.
          required: true
        - name: repo_slug
          in: path
          type: string
          description: The repository.
          required: true
        - name: environment_uuid
          in: path
          type: string
          description: The environment UUID.
          required: true
    - name: workspaces-workspace-projects-project_key-deploy-keys
      path: /workspaces/{workspace}/projects/{project_key}/deploy-keys
      operations:
      - name: get
        method: GET
        description: List project deploy keys
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a project deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: workspaces-workspace-projects-project_key-deploy-keys-key_id
      path: /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}
      operations:
      - name: delete
        method: DELETE
        description: Delete a deploy key from a project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get a project deploy key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: cloud-rest-deployments-rest
    port: 8080
    description: REST adapter for Bitbucket API — Deployments. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repositories/{workspace}/{repo-slug}/deploy-keys
      name: repositories-workspace-repo-slug-deploy-keys
      description: REST surface for repositories-workspace-repo_slug-deploy-keys.
      operations:
      - method: GET
        name: get
        description: List repository deploy keys
        call: cloud-rest-deployments.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Add a repository deploy key
        call: cloud-rest-deployments.post
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/deploy-keys/{key-id}
      name: repositories-workspace-repo-slug-deploy-keys-key-id
      description: REST surface for repositories-workspace-repo_slug-deploy-keys-key_id.
      operations:
      - method: DELETE
        name: delete
        description: Delete a repository deploy key
        call: cloud-rest-deployments.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a repository deploy key
        call: cloud-rest-deployments.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a repository deploy key
        call: cloud-rest-deployments.put
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/deployments
      name: repositories-workspace-repo-slug-deployments
      description: REST surface for repositories-workspace-repo_slug-deployments.
      operations:
      - method: GET
        name: getdeploymentsforrepository
        description: List deployments
        call: cloud-rest-deployments.getdeploymentsforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/deployments/{deployment-uuid}
      name: repositories-workspace-repo-slug-deployments-deployment-uuid
      description: REST surface for repositories-workspace-repo_slug-deployments-deployment_uuid.
      operations:
      - method: GET
        name: getdeploymentforrepository
        description: Get a deployment
        call: cloud-rest-deployments.getdeploymentforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
          deployment_uuid: rest.deployment_uuid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/environments
      name: repositories-workspace-repo-slug-environments
      description: REST surface for repositories-workspace-repo_slug-environments.
      operations:
      - method: GET
        name: getenvironmentsforrepository
        description: List environments
        call: cloud-rest-deployments.getenvironmentsforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createenvironment
        description: Create an environment
        call: cloud-rest-deployments.createenvironment
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
          _body: rest._body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/environments/{environment-uuid}
      name: repositories-workspace-repo-slug-environments-environment-uuid
      description: REST surface for repositories-workspace-repo_slug-environments-environment_uuid.
      operations:
      - method: GET
        name: getenvironmentforrepository
        description: Get an environment
        call: cloud-rest-deployments.getenvironmentforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
          environment_uuid: rest.environment_uuid
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteenvironmentforrepository
        description: Delete an environment
        call: cloud-rest-deployments.deleteenvironmentforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
          environment_uuid: rest.environment_uuid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/environments/{environment-uuid}/changes
      name: repositories-workspace-repo-slug-environments-environment-uuid-changes
      description: REST surface for repositories-workspace-repo_slug-environments-environment_uuid-changes.
      operations:
      - method: POST
        name: updateenvironmentforrepository
        description: Update an environment
        call: cloud-rest-deployments.updateenvironmentforrepository
        with:
          workspace: rest.workspace
          repo_slug: rest.repo_slug
          environment_uuid: rest.environment_uuid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/workspaces/{workspace}/projects/{project-key}/deploy-keys
      name: workspaces-workspace-projects-project-key-deploy-keys
      description: REST surface for workspaces-workspace-projects-project_key-deploy-keys.
      operations:
      - method: GET
        name: get
        description: List project deploy keys
        call: cloud-rest-deployments.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a project deploy key
        call: cloud-rest-deployments.post
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/workspaces/{workspace}/projects/{project-key}/deploy-keys/{key-id}
      name: workspaces-workspace-projects-project-key-deploy-keys-key-id
      description: REST surface for workspaces-workspace-projects-project_key-deploy-keys-key_id.
      operations:
      - method: DELETE
        name: delete
        description: Delete a deploy key from a project
        call: cloud-rest-deployments.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a project deploy key
        call: cloud-rest-deployments.get
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-rest-deployments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Bitbucket API — Deployments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-repository-deploy-keys
      description: List repository deploy keys
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.get
      outputParameters:
      - type: object
        mapping: $.
    - name: add-repository-deploy-key
      description: Add a repository deploy key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-deployments.post
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-repository-deploy-key
      description: Delete a repository deploy key
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-rest-deployments.delete
      outputParameters:
      - type: object
        mapping: $.
    - name: get-repository-deploy-key
      description: Get a repository deploy key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.get
      outputParameters:
      - type: object
        mapping: $.
    - name: update-repository-deploy-key
      description: Update a repository deploy key
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.put
      outputParameters:
      - type: object
        mapping: $.
    - name: list-deployments
      description: List deployments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.getdeploymentsforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
      outputParameters:
      - type: object
        mapping: $.
    - name: get-deployment
      description: Get a deployment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.getdeploymentforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
        deployment_uuid: tools.deployment_uuid
      outputParameters:
      - type: object
        mapping: $.
    - name: list-environments
      description: List environments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.getenvironmentsforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
      outputParameters:
      - type: object
        mapping: $.
    - name: create-environment
      description: Create an environment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-deployments.createenvironment
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
        _body: tools._body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment
      description: Get an environment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.getenvironmentforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
        environment_uuid: tools.environment_uuid
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-environment
      description: Delete an environment
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-rest-deployments.deleteenvironmentforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
        environment_uuid: tools.environment_uuid
      outputParameters:
      - type: object
        mapping: $.
    - name: update-environment
      description: Update an environment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-deployments.updateenvironmentforrepository
      with:
        workspace: tools.workspace
        repo_slug: tools.repo_slug
        environment_uuid: tools.environment_uuid
      outputParameters:
      - type: object
        mapping: $.
    - name: list-project-deploy-keys
      description: List project deploy keys
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-project-deploy-key
      description: Create a project deploy key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-deployments.post
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-deploy-key-project
      description: Delete a deploy key from a project
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-rest-deployments.delete
      outputParameters:
      - type: object
        mapping: $.
    - name: get-project-deploy-key
      description: Get a project deploy key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-deployments.get
      outputParameters:
      - type: object
        mapping: $.