# Bitbucket on Onekey > 8 endpoints for Bitbucket (8 stable, 0 beta), 1 to 5 credits each. Category: Developer platforms. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/bitbucket Reference (Markdown): https://onekey.dev/docs/api/bitbucket.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 8 mapped Bitbucket endpoints return each: - `author.displayName` (string): 6 - `author.username` (string): 5 - `content.createdAt` (ISO 8601 date): 3 - `content.id` (string): 3 - `content.url` (URL): 3 - `entity.name` (string): 3 - `entity.updatedAt` (ISO 8601 date): 3 - `entity.url` (URL): 3 - `author.avatarUrl` (URL): 2 - `author.id` (string): 2 - `author.url` (URL): 2 - `content.text` (string): 2 - `content.title` (string): 2 - `entity.createdAt` (ISO 8601 date): 2 - `entity.description` (string): 2 - `entity.id` (string): 2 - `entity.language` (string): 2 - `package.defaultBranch` (string): 2 - `author.createdAt` (ISO 8601 date): 1 - `author.private` (boolean): 1 - `content.state` (string): 1 - `content.updatedAt` (ISO 8601 date): 1 - `engagement.comments` (integer): 1 - plus 3 platform-specific fields under `ext.` ## Endpoints ### bitbucket.branches Branches of a Bitbucket repository. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/branches?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `entity.name`, `entity.updatedAt`, `entity.url`, `ext.commit` - Reference: https://onekey.dev/docs/api/bitbucket/branches.md ### bitbucket.commits Recent commits of a Bitbucket repository. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/commits?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `content.id`, `content.text`, `content.url`, `content.createdAt`, `author.displayName`, `author.username` - Reference: https://onekey.dev/docs/api/bitbucket/commits.md ### bitbucket.pull_requests Merged pull requests of a Bitbucket repository. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/pull_requests?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.updatedAt`, `content.state`, `author.displayName`, `engagement.comments` - Reference: https://onekey.dev/docs/api/bitbucket/pull_requests.md ### bitbucket.repo Bitbucket Cloud repository metadata. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bitbucket/repo?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.language`, `entity.createdAt`, `entity.updatedAt`, `author.displayName`, `author.username`, `package.defaultBranch`, `ext.size`, `ext.private` - Reference: https://onekey.dev/docs/api/bitbucket/repo.md ### bitbucket.tags Tags of a Bitbucket repository. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/tags?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `content.title`, `content.id`, `content.createdAt`, `content.url` - Reference: https://onekey.dev/docs/api/bitbucket/tags.md ### bitbucket.watchers Watchers of a Bitbucket repository. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/watchers?workspace=atlassian&repo=aui` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - `repo` (string, required): Repository slug - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/bitbucket/watchers.md ### bitbucket.workspace Bitbucket Cloud workspace profile. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bitbucket/workspace?workspace=atlassian` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `author.createdAt`, `author.private` - Reference: https://onekey.dev/docs/api/bitbucket/workspace.md ### bitbucket.workspace_repos Public repositories of a Bitbucket workspace. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bitbucket/workspace_repos?workspace=atlassian` with header `x-api-key: YOUR_API_KEY` - Parameters: - `workspace` (string, required): Bitbucket workspace slug - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.language`, `entity.createdAt`, `entity.updatedAt`, `author.displayName`, `author.username`, `package.defaultBranch`, `ext.size`, `ext.private` - Reference: https://onekey.dev/docs/api/bitbucket/workspace_repos.md ## Sample request ```bash curl "https://api.onekey.dev/v1/bitbucket/repo?workspace=atlassian&repo=aui" \ -H "x-api-key: YOUR_API_KEY" ```