Bitbucket · Capability

Bitbucket API — Webhooks

Bitbucket API — Webhooks. 12 operations. Lead operation: Get a webhook resource. Self-contained Naftiko capability covering one Bitbucket business surface.

Run with Naftiko BitbucketWebhooks

What You Can Do

GET
Get — Get a webhook resource
/v1/hook-events
GET
Get — List subscribable webhook types
/v1/hook-events/{subject-type}
GET
Get — List webhooks for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks
POST
Post — Create a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks
DELETE
Delete — Delete a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
GET
Get — Get a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
PUT
Put — Update a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
GET
Get — List webhooks for a workspace
/v1/workspaces/{workspace}/hooks
POST
Post — Create a webhook for a workspace
/v1/workspaces/{workspace}/hooks
DELETE
Delete — Delete a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}
GET
Get — Get a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}
PUT
Put — Update a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}

MCP Tools

get-webhook-resource

Get a webhook resource

read-only idempotent
list-subscribable-webhook-types

List subscribable webhook types

read-only idempotent
list-webhooks-repository

List webhooks for a repository

read-only idempotent
create-webhook-repository

Create a webhook for a repository

delete-webhook-repository

Delete a webhook for a repository

idempotent
get-webhook-repository

Get a webhook for a repository

read-only idempotent
update-webhook-repository

Update a webhook for a repository

idempotent
list-webhooks-workspace

List webhooks for a workspace

read-only idempotent
create-webhook-workspace

Create a webhook for a workspace

delete-webhook-workspace

Delete a webhook for a workspace

idempotent
get-webhook-workspace

Get a webhook for a workspace

read-only idempotent
update-webhook-workspace

Update a webhook for a workspace

idempotent

Capability Spec

cloud-rest-webhooks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Bitbucket API — Webhooks
  description: 'Bitbucket API — Webhooks. 12 operations. Lead operation: Get a webhook resource. Self-contained Naftiko capability
    covering one Bitbucket business surface.'
  tags:
  - Bitbucket
  - Webhooks
  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-webhooks
    baseUri: https://api.bitbucket.org/2.0
    description: Bitbucket API — Webhooks business capability. Self-contained, no shared references.
    resources:
    - name: hook_events
      path: /hook_events
      operations:
      - name: get
        method: GET
        description: Get a webhook resource
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: hook_events-subject_type
      path: /hook_events/{subject_type}
      operations:
      - name: get
        method: GET
        description: List subscribable webhook types
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-hooks
      path: /repositories/{workspace}/{repo_slug}/hooks
      operations:
      - name: get
        method: GET
        description: List webhooks for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a webhook for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-hooks-uid
      path: /repositories/{workspace}/{repo_slug}/hooks/{uid}
      operations:
      - name: delete
        method: DELETE
        description: Delete a webhook for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get a webhook for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update a webhook for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: workspaces-workspace-hooks
      path: /workspaces/{workspace}/hooks
      operations:
      - name: get
        method: GET
        description: List webhooks for a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a webhook for a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: workspaces-workspace-hooks-uid
      path: /workspaces/{workspace}/hooks/{uid}
      operations:
      - name: delete
        method: DELETE
        description: Delete a webhook for a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get a webhook for a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update a webhook for a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: cloud-rest-webhooks-rest
    port: 8080
    description: REST adapter for Bitbucket API — Webhooks. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/hook-events
      name: hook-events
      description: REST surface for hook_events.
      operations:
      - method: GET
        name: get
        description: Get a webhook resource
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/hook-events/{subject-type}
      name: hook-events-subject-type
      description: REST surface for hook_events-subject_type.
      operations:
      - method: GET
        name: get
        description: List subscribable webhook types
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/hooks
      name: repositories-workspace-repo-slug-hooks
      description: REST surface for repositories-workspace-repo_slug-hooks.
      operations:
      - method: GET
        name: get
        description: List webhooks for a repository
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a webhook for a repository
        call: cloud-rest-webhooks.post
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
      name: repositories-workspace-repo-slug-hooks-uid
      description: REST surface for repositories-workspace-repo_slug-hooks-uid.
      operations:
      - method: DELETE
        name: delete
        description: Delete a webhook for a repository
        call: cloud-rest-webhooks.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a webhook for a repository
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a webhook for a repository
        call: cloud-rest-webhooks.put
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/workspaces/{workspace}/hooks
      name: workspaces-workspace-hooks
      description: REST surface for workspaces-workspace-hooks.
      operations:
      - method: GET
        name: get
        description: List webhooks for a workspace
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a webhook for a workspace
        call: cloud-rest-webhooks.post
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/workspaces/{workspace}/hooks/{uid}
      name: workspaces-workspace-hooks-uid
      description: REST surface for workspaces-workspace-hooks-uid.
      operations:
      - method: DELETE
        name: delete
        description: Delete a webhook for a workspace
        call: cloud-rest-webhooks.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a webhook for a workspace
        call: cloud-rest-webhooks.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a webhook for a workspace
        call: cloud-rest-webhooks.put
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-rest-webhooks-mcp
    port: 9090
    transport: http
    description: MCP adapter for Bitbucket API — Webhooks. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-webhook-resource
      description: Get a webhook resource
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: list-subscribable-webhook-types
      description: List subscribable webhook types
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: list-webhooks-repository
      description: List webhooks for a repository
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-webhook-repository
      description: Create a webhook for a repository
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-webhooks.post
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-webhook-repository
      description: Delete a webhook for a repository
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-rest-webhooks.delete
      outputParameters:
      - type: object
        mapping: $.
    - name: get-webhook-repository
      description: Get a webhook for a repository
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: update-webhook-repository
      description: Update a webhook for a repository
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.put
      outputParameters:
      - type: object
        mapping: $.
    - name: list-webhooks-workspace
      description: List webhooks for a workspace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-webhook-workspace
      description: Create a webhook for a workspace
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-rest-webhooks.post
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-webhook-workspace
      description: Delete a webhook for a workspace
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-rest-webhooks.delete
      outputParameters:
      - type: object
        mapping: $.
    - name: get-webhook-workspace
      description: Get a webhook for a workspace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.get
      outputParameters:
      - type: object
        mapping: $.
    - name: update-webhook-workspace
      description: Update a webhook for a workspace
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-rest-webhooks.put
      outputParameters:
      - type: object
        mapping: $.