Pipory
Node reference

Bitbucket

Bitbucket node reference - all 231 operations, the credential it needs, and a worked example.

Bitbucket Cloud REST API v2.0 (Developer tools). 231 operations: repositories, source files and commits, branches, tags and refs, diffs and patches, build statuses and Code Insights, pull requests with reviews, merges, comments and tasks, default reviewers, Pipelines with steps, logs, variables, schedules and caches, deployments and environments, downloads, repository and workspace webhooks, branch restrictions and branching models, deploy keys, repository and project permissions, workspaces, projects, users and keys, snippets, plus the deprecated issue tracker.

Credential: Bitbucket credential - see Credentials.

Scopes

Each operation below lists the scope it needs. Scopes are fixed on the token at the moment you create it and NOT editable afterwards, so a token missing one has to be recreated rather than adjusted. Where you create it depends on which of the three credential shapes you use, and Bitbucket has TWO scope vocabularies that behave differently. API tokens (id.atlassian.com → Account settings → Security → Create API token with scopes) carry GRANULAR scopes like read:repository:bitbucket and write:pullrequest:bitbucket, and these do NOT cascade — holding the write scope does not give you the read scope, so a read-modify-write needs BOTH ticked. OAuth 2.0 consumers and repository / project / workspace Access Tokens carry the CLASSIC scopes the column below names — repository, repository:write, pullrequest:write, pipeline:variable and so on — and those DO cascade: repository:write implies repository, repository:admin implies repository:write. The column states the classic scope because that is what Bitbucket publishes per endpoint in its own API spec; read a row as "the granular read AND write scopes for this resource" when your credential is an API token. Three specifics catch people out. repository:delete is its own scope and is NOT included in repository:admin, so deleting a repository needs it explicitly. Pipelines split three ways — pipeline reads, pipeline:write runs and stops, and pipeline:variable is a separate scope for anything touching variables, so a token that can trigger a build still cannot create the variable the build needs. And a repository or project Access Token can never hold account, which is why getCurrentUser (GET /user) fails with one however the scopes are set: those tokens are not bound to a person. Two failures below are not scopes at all — a 401 almost always means the credential itself is wrong, and since Atlassian removed app passwords on 2026-07-28 the commonest cause is a stored app password that can no longer authenticate whatever its value; the second commonest is using the Bitbucket USERNAME as the Basic username when the REST API wants the Atlassian account EMAIL (git over HTTPS wants the opposite, which is why the two get swapped). A 404 may be a missing grant rather than a missing resource, because Bitbucket hides private repositories from credentials that cannot see them instead of admitting they exist. If a run fails with a permission error, the node names the missing scope in the error - grant it and re-run; you do not need to rebuild the workflow.

Operations (231)

Repositories

OperationWhat it doesScope
listRepositoriesList repositories in a workspacerepository
getRepositoryGet repositoryrepository
createRepositoryCreate repositoryrepository:admin
updateRepositoryUpdate repositoryrepository:admin
deleteRepositoryDelete repositoryrepository:delete
listForksList forksrepository
forkRepositoryFork repositoryrepository:write
listWatchersList repository watchersrepository

Source & files

OperationWhat it doesScope
getFileGet file or directory at a commitrepository
listSourceRootList repository rootrepository
commitFileCommit a file (create / update / delete)repository:write
listFileHistoryList a file's historyrepository

Branches & tags

OperationWhat it doesScope
listRefsList all refsrepository
listBranchesList branchesrepository
getBranchGet branchrepository
createBranchCreate branchrepository:write
deleteBranchDelete branchrepository:write
listTagsList tagsrepository
getTagGet tagrepository
createTagCreate tagrepository:write
deleteTagDelete tagrepository:write

Commits

OperationWhat it doesScope
listCommitsList commitsrepository
listCommitsForRevisionList commits for a branch or tagrepository
getCommitGet commitrepository
approveCommitApprove commitrepository:write
unapproveCommitRemove commit approvalrepository:write
listCommitPullRequestsList pull requests containing a commitpullrequest

Commit comments

OperationWhat it doesScope
listCommitCommentsList commit commentsrepository
createCommitCommentComment on a commitrepository
getCommitCommentGet commit commentrepository
updateCommitCommentUpdate commit commentrepository
deleteCommitCommentDelete commit commentrepository

Diffs & patches

OperationWhat it doesScope
getDiffGet diff between two commitsrepository
getDiffStatGet diff stats between two commitsrepository
getPatchGet patch between two commitsrepository
getMergeBaseGet merge base of two commitsrepository
listFileConflictsList merge conflictsrepository

Build statuses

OperationWhat it doesScope
listCommitStatusesList commit build statusesrepository
createBuildStatusCreate build statusrepository
getBuildStatusGet build statusrepository
updateBuildStatusUpdate build statusrepository

Code Insights

OperationWhat it doesScope
listReportsList code insight reportsrepository
getReportGet code insight reportrepository
createOrUpdateReportCreate / update code insight reportrepository
deleteReportDelete code insight reportrepository
listAnnotationsList report annotationsrepository
createAnnotationsCreate annotations in bulkrepository
getAnnotationGet annotationrepository
createOrUpdateAnnotationCreate / update annotationrepository
deleteAnnotationDelete annotationrepository

Pull requests

OperationWhat it doesScope
listPullRequestsList pull requestspullrequest
createPullRequestCreate pull requestpullrequest:write
getPullRequestGet pull requestpullrequest
updatePullRequestUpdate pull requestpullrequest:write
listPullRequestActivityList a pull request's activitypullrequest
listRepositoryPullRequestActivityList all pull request activitypullrequest
listPullRequestCommitsList pull request commitspullrequest
getPullRequestDiffGet pull request diffpullrequest
getPullRequestDiffStatGet pull request diff statspullrequest
getPullRequestPatchGet pull request patchpullrequest
listPullRequestStatusesList pull request build statusespullrequest
listPullRequestConflictsList pull request conflictspullrequest
listUserPullRequestsList a user's pull requestspullrequest

Pull request reviews & merges

OperationWhat it doesScope
approvePullRequestApprove pull requestpullrequest:write
unapprovePullRequestRemove pull request approvalpullrequest:write
requestPullRequestChangesRequest changespullrequest:write
removePullRequestChangeRequestRemove change requestpullrequest:write
declinePullRequestDecline pull requestpullrequest:write
mergePullRequestMerge pull requestpullrequest:write
getMergeTaskStatusGet merge task statuspullrequest

Pull request comments

OperationWhat it doesScope
listPullRequestCommentsList pull request commentspullrequest
createPullRequestCommentComment on a pull requestpullrequest
getPullRequestCommentGet pull request commentpullrequest
updatePullRequestCommentUpdate pull request commentpullrequest
deletePullRequestCommentDelete pull request commentpullrequest
resolvePullRequestCommentResolve comment threadpullrequest
reopenPullRequestCommentReopen comment threadpullrequest

Pull request tasks

OperationWhat it doesScope
listPullRequestTasksList pull request taskspullrequest
createPullRequestTaskCreate pull request taskpullrequest
getPullRequestTaskGet pull request taskpullrequest
updatePullRequestTaskUpdate / resolve pull request taskpullrequest
deletePullRequestTaskDelete pull request taskpullrequest

Default reviewers

OperationWhat it doesScope
listDefaultReviewersList default reviewerspullrequest
getDefaultReviewerGet default reviewerpullrequest
addDefaultReviewerAdd default reviewerrepository:admin
removeDefaultReviewerRemove default reviewerrepository:admin
listEffectiveDefaultReviewersList effective default reviewerspullrequest

Pipelines

OperationWhat it doesScope
listPipelinesList pipelinespipeline
runPipelineRun a pipelinepipeline
getPipelineGet pipelinepipeline
stopPipelineStop pipelinepipeline:write
listPipelineStepsList pipeline stepspipeline
getPipelineStepGet pipeline steppipeline
getPipelineStepLogGet pipeline step logpipeline
getPipelineStepLogChunkGet one chunk of a step logpipeline
getPipelineTestReportGet step test reportpipeline
listPipelineTestCasesList step test casespipeline

Pipeline configuration

OperationWhat it doesScope
getPipelinesConfigGet pipelines configurationrepository:admin
updatePipelinesConfigEnable / disable pipelinesrepository:admin
updateBuildNumberSet next build numberpipeline:variable
listPipelineVariablesList repository variablespipeline
createPipelineVariableCreate repository variablepipeline:variable
getPipelineVariableGet repository variablepipeline
updatePipelineVariableUpdate repository variablepipeline:variable
deletePipelineVariableDelete repository variablepipeline:variable
listPipelineSchedulesList pipeline schedulespipeline
createPipelineScheduleCreate pipeline schedulepipeline:write
getPipelineScheduleGet pipeline schedulepipeline
updatePipelineScheduleUpdate pipeline schedulepipeline:write
deletePipelineScheduleDelete pipeline schedulepipeline:write
listScheduleExecutionsList schedule executionspipeline

Pipeline caches

OperationWhat it doesScope
listPipelineCachesList pipeline cachespipeline
deletePipelineCachesDelete all pipeline cachespipeline:write
deletePipelineCacheDelete one pipeline cachepipeline:write
getPipelineCacheContentUriGet pipeline cache download URIpipeline

Deployments & environments

OperationWhat it doesScope
listDeploymentsList deploymentspipeline
getDeploymentGet deploymentpipeline
listEnvironmentsList environmentspipeline
createEnvironmentCreate environmentpipeline
getEnvironmentGet environmentpipeline
deleteEnvironmentDelete environmentpipeline
changeEnvironmentChange environment (lock / unlock)pipeline
listDeploymentVariablesList environment variablespipeline
createDeploymentVariableCreate environment variablepipeline:variable
updateDeploymentVariableUpdate environment variablepipeline:variable
deleteDeploymentVariableDelete environment variablepipeline:variable

Downloads

OperationWhat it doesScope
listDownloadsList download artifactsrepository
uploadDownloadUpload download artifactrepository:write
getDownloadGet download artifact linkrepository
deleteDownloadDelete download artifactrepository:write

Webhooks

OperationWhat it doesScope
listRepositoryWebhooksList repository webhookswebhook
createRepositoryWebhookCreate repository webhookwebhook
getRepositoryWebhookGet repository webhookwebhook
updateRepositoryWebhookUpdate repository webhookwebhook
deleteRepositoryWebhookDelete repository webhookwebhook
listWorkspaceWebhooksList workspace webhookswebhook
createWorkspaceWebhookCreate workspace webhookwebhook
getWorkspaceWebhookGet workspace webhookwebhook
updateWorkspaceWebhookUpdate workspace webhookwebhook
deleteWorkspaceWebhookDelete workspace webhookwebhook
listHookEventsList webhook event types(any valid credential — this is the public catalogue of event types)
listSubjectHookEventsList event types for a subject(any valid credential — this is the public catalogue of event types)

Branch restrictions & branching model

OperationWhat it doesScope
listBranchRestrictionsList branch restrictionsrepository:admin
createBranchRestrictionCreate branch restrictionrepository:admin
getBranchRestrictionGet branch restrictionrepository:admin
updateBranchRestrictionUpdate branch restrictionrepository:admin
deleteBranchRestrictionDelete branch restrictionrepository:admin
getBranchingModelGet branching modelrepository
getBranchingModelSettingsGet branching model settingsrepository:admin
updateBranchingModelSettingsUpdate branching model settingsrepository:admin
getEffectiveBranchingModelGet effective branching modelrepository

Deploy keys

OperationWhat it doesScope
listDeployKeysList deploy keysrepository
createDeployKeyAdd deploy keyrepository
getDeployKeyGet deploy keyrepository
updateDeployKeyUpdate deploy keyrepository
deleteDeployKeyDelete deploy keyrepository

Repository permissions

OperationWhat it doesScope
listRepositoryUserPermissionsList repository user permissionsrepository:admin
getRepositoryUserPermissionGet a user's repository permissionrepository:admin
setRepositoryUserPermissionGrant a user repository accessrepository:admin
removeRepositoryUserPermissionRevoke a user's repository accessrepository:admin
listRepositoryGroupPermissionsList repository group permissionsrepository:admin
getRepositoryGroupPermissionGet a group's repository permissionrepository:admin
setRepositoryGroupPermissionGrant a group repository accessrepository:admin
removeRepositoryGroupPermissionRevoke a group's repository accessrepository:admin

Workspaces

OperationWhat it doesScope
listMyWorkspacesList my workspacesaccount
getWorkspaceGet workspace(any valid credential — this is public workspace data)
listWorkspaceMembersList workspace membersaccount
getWorkspaceMemberGet workspace memberaccount
listWorkspacePermissionsList workspace permissionsaccount
listWorkspaceRepositoryPermissionsList repository permissions in a workspaceaccount
getWorkspaceRepositoryPermissionGet repository permissions for one repositoryrepository
getMyWorkspacePermissionGet my permission in a workspaceaccount
listMyRepositoryPermissionsList my repository permissionsaccount + repository

Workspace pipeline variables

OperationWhat it doesScope
listWorkspaceVariablesList workspace variablespipeline
createWorkspaceVariableCreate workspace variablepipeline:variable
getWorkspaceVariableGet workspace variablepipeline
updateWorkspaceVariableUpdate workspace variablepipeline:variable
deleteWorkspaceVariableDelete workspace variablepipeline:variable

Projects

OperationWhat it doesScope
listProjectsList projectsproject
createProjectCreate projectproject:admin
getProjectGet projectproject
updateProjectUpdate projectproject:admin
deleteProjectDelete projectproject:admin
listProjectUserPermissionsList project user permissionsproject:admin
setProjectUserPermissionGrant a user project accessproject:admin
removeProjectUserPermissionRevoke a user's project accessproject:admin
listProjectGroupPermissionsList project group permissionsproject:admin
setProjectGroupPermissionGrant a group project accessproject:admin
removeProjectGroupPermissionRevoke a group's project accessproject:admin

Project reviewers & deploy keys

OperationWhat it doesScope
listProjectDefaultReviewersList project default reviewersproject:admin
getProjectDefaultReviewerGet project default reviewerproject:admin
addProjectDefaultReviewerAdd project default reviewerproject:admin
removeProjectDefaultReviewerRemove project default reviewerproject:admin
listProjectDeployKeysList project deploy keysproject
createProjectDeployKeyAdd project deploy keyproject
deleteProjectDeployKeyDelete project deploy keyproject

Users & keys

OperationWhat it doesScope
getCurrentUserGet the authenticated useraccount (and an API token or OAuth — a repository/project/workspace Access Token is not bound to a user and cannot call this)
listMyEmailsList my email addressesemail
getMyEmailGet one of my email addressesemail
getUserGet a user(any valid credential — this is public profile data)
listUserSshKeysList a user's SSH keysaccount
createUserSshKeyAdd an SSH keyaccount:write
getUserSshKeyGet an SSH keyaccount
updateUserSshKeyUpdate an SSH keyaccount:write
deleteUserSshKeyDelete an SSH keyaccount:write
listUserGpgKeysList a user's GPG keysaccount
createUserGpgKeyAdd a GPG keyaccount:write
getUserGpgKeyGet a GPG keyaccount
deleteUserGpgKeyDelete a GPG keyaccount:write

Snippets

OperationWhat it doesScope
listSnippetsList snippets in a workspacesnippet
createSnippetCreate snippetsnippet:write
getSnippetGet snippetsnippet
updateSnippetUpdate snippetsnippet:write
deleteSnippetDelete snippetsnippet:write
listSnippetCommentsList snippet commentssnippet
createSnippetCommentComment on a snippetsnippet
getSnippetCommentGet snippet commentsnippet
updateSnippetCommentUpdate snippet commentsnippet
deleteSnippetCommentDelete snippet commentsnippet
getSnippetFileGet a snippet's file contentssnippet
listSnippetCommitsList snippet commitssnippet

Issues (deprecated — removed 2026-08-20)

OperationWhat it doesScope
createIssueCreate issueissue:write
getIssueGet issueissue
listIssuesList issuesissue
updateIssueUpdate issueissue:write
deleteIssueDelete issueissue:write
listIssueCommentsList issue commentsissue
createIssueCommentComment on an issueissue:write
getIssueCommentGet issue commentissue
updateIssueCommentUpdate issue commentissue:write
deleteIssueCommentDelete issue commentissue:write