Skip to main content

Bitbucket Connector

The Bitbucket connector ingests data from Bitbucket Cloud into the Context Catalog. It runs through the ibdm binary in one of two modes:

  • Sync — pull-based: queries the Bitbucket REST API and exits.
  • Run — push-based: exposes a webhook endpoint that receives Bitbucket events.

Commands

ibdm sync bitbucket --mapping-file <path to mapping file or folder>
ibdm run bitbucket --mapping-file <path to mapping file or folder>

Configuration

VariableRequiredDefaultDescription
BITBUCKET_ACCESS_TOKENOne auth modeBitbucket access token for Bearer auth (workspace, project, or repository scope).
BITBUCKET_API_USERNAMEOne auth modeUsername for HTTP Basic Authentication.
BITBUCKET_API_TOKENOne auth modeApp password / access token for Basic Auth.
BITBUCKET_URLNohttps://api.bitbucket.orgBase URL of the Bitbucket API.
BITBUCKET_HTTP_TIMEOUTNo30sTimeout for HTTP requests (Go duration).
BITBUCKET_WORKSPACENo(empty)Restrict sync to a single workspace slug. When empty, ibdm enumerates all accessible workspaces.
BITBUCKET_WEBHOOK_SECRETRun(empty)HMAC secret for webhook signature validation.
BITBUCKET_WEBHOOK_PATHNo/bitbucket/webhookHTTP path for inbound webhook events.

Authentication

Bitbucket supports two mutually exclusive authentication modes. Setting both is a configuration error.

  • Bearer Token — set BITBUCKET_ACCESS_TOKEN. Sent as Authorization: Bearer <token>.
  • Basic Auth — set both BITBUCKET_API_USERNAME and BITBUCKET_API_TOKEN. Sent as HTTP Basic Authentication.

Supported data types

TypeSyncWebhook
repository
pipeline

Subscribed webhook events:

Event keyProduces
repo:pushrepository upsert
repo:updatedrepository upsert
pullrequest:fulfilledrepository upsert

See also