@managed-api/bitbucket-cloud-v2-sr-connect
v2.5.0
Published
Adaptavist Managed API for Bitbucket Cloud for ScriptRunner Connect environment
Keywords
Readme
ScriptRunner Connect Managed API for Bitbucket Cloud
Managed API for Bitbucket Cloud is an API Client for Bitbucket Cloud by Adaptavist. You can read more about Managed APIs here.
This is ScriptRunner Connect runtime specific version of the Managed API (with sr-connect suffix). If you want to use Managed API in any other runtime, have a look at the runtime agnostic version.
Supported API calls
- fetch
- Repository
- createRepository
- deleteRepository
- getBranchesAndTags
- getRepositories
- getRepositoriesByWorkspace
- getRepository
- updateRepository
- Branch
- Commit
- Deployment
- Environment
- Fork
- Pipeline
- createAndInitiatePipeline
- findPipelines
- retrievePipeline
- stopPipeline
- Configuration
- Step
- Pullrequest
- Reviewer
- Tag
- User
- Workspace
Constructing Managed API
In ScriptRunner Connect a Managed API is constructed for you, but if you need to construct it manually, here's how you can do it:
import { BitbucketCloudApi } from '@managed-api/bitbucket-cloud-v2-sr-connect';
export default async function() {
const api = new BitbucketCloudApi('API_CONNECTION_ID');
}Contact
Feel free to drop ideas, suggestions or improvements into our Community hub.
Changelog
2.5.0
Changed the following methods:
Repository.Pipeline.findPipelines: Change the type ofsortrequest parameter tostring.
2.3.0
- Removed non-empty body from HEAD requests.
2.2.0
Changed the following methods:
Repository.Commit.Status.getStatuses: Addrefnameparameter.Repository.Branch.Restriction.createRestriction: Addrequire_commits_behind,allow_auto_merge_when_builds_passandrequire_all_comments_resolvedtokind.Repository.Pipeline.findPipelines: Several new parameters.
Following responses got changed:
AccountAsResponseis used instead ofReviewerAsResponse.
Improved error messaging
2.1.0
Changed response type for the following methods:
- List commits on a pull request
that can be used as
Repository.Pullrequest.Commit.getCommitsorAll.getRepositoryPullrequestCommits. - List commits with include/exclude that can be used as
Repository.Commit.getCommitsorAll.getRepositoryCommits.
- List commits on a pull request
that can be used as
2.0.1
Fixed the following method to use the appropriate header:
- List commits with include/exclude that can be used as
Repository.Commit.getCommitsorAll.getRepositoryCommits.
- List commits with include/exclude that can be used as
2.0.0
Breaking change: URL and query string parameters are now URL encoded, meaning if you encoded them explicitly before you have to remove your own encoding, otherwise they will get double encoded.
0.12.0
Changed response type for following Repository methods:
- List public repositories
that can be used as
Repository.getRepositoriesorAll.getRepositories.
- List public repositories
that can be used as
0.11.0
Changed the name for following methods:
Repository.Branch.createRepositoryBranchtoRepository.Branch.createBranch.Repository.Commit.getRepositoryCommitstoRepository.Commit.getCommits.
Fixed the following methods:
- Update variable for a workspace that can be used as
Workspace.Variable.updateVariableorAll.updateWorkspaceVariable. - Get a branch restriction rule that can be used as
Repository.Branch.Restriction.getRestrictionorAll.getRepositoryBranchRestriction. - Delete a branch restriction rule that can be used as
Repository.Branch.Restriction.deleteRestrictionorAll.deleteRepositoryBranchRestriction. - Get an email address for current user that can be used as
User.getCurrentUserEmailorAll.getCurrentUserEmail. - List email addresses for current user that can be used as
User.getCurrentUserEmailsorAll.getCurrentUserEmails. - Get a default reviewer that can be used as
Repository.Reviewer.Default.getReviewerorAll.getRepositoryDefaultReviewer. - Add a user to the default reviewers that can be used as
Repository.Reviewer.Default.addReviewerorAll.addRepositoryDefaultReviewer. - List default reviewers that can be used as
Repository.Reviewer.Default.getReviewersorAll.getRepositoryDefaultReviewers. - List commits with include/exclude that can be used as
Repository.Commit.getCommitsorAll.getRepositoryCommits.
- Update variable for a workspace that can be used as
Copyright Adaptavist 2025 (c) All rights reserved
