Questions tagged [bitbucket-api]

The Bitbucket REST API allows third-party application developers the means for writing applications for the Bitbucket service.

The Bitbucket REST API allows third-party application developers the means for writing applications that integrate with the Bitbucket service. The API includes ways to manage the repository changesets, issues on the issue tracker, permissions etc.

See also

430 questions
2
votes
3 answers

Can I get the most recent commit of a repository with Bitbucket API?

I am using Bitbucket API to retrieve different information. However I am looking to do a request that retrieves the latest commit for a repository. I initially thought it would be done like…
lukef2020
  • 27
  • 1
  • 4
2
votes
1 answer

Using the BitBucket API, list which branches have all content in master and which dont

I have a bitbucket server which has 100's of branches. I would like to separate the branches which contain code already on the master branch, and those that dont. The only way I've thought to get the info would be to get a list of…
DaveM
  • 25
  • 1
  • 3
2
votes
2 answers

Bitbucket api returns 400 for commit pull requests

I'm trying to get the list of pull requests for a given git commit in Bitbucket. I can successfully curl both the commit, and the list of pull requests: curl -u $USER:$APP_TOKEN…
mikelong
  • 3,694
  • 2
  • 35
  • 40
2
votes
1 answer

How to get pull request approvals count via bitbucket API

I am trying to write a bash function which should return me the pull request approvals count using the PR ID. I know the below API URL will provide me with the whole body of pull request response in json. I want to know if there is any other way to…
user1125741
  • 45
  • 1
  • 6
2
votes
0 answers

Bitbucket API: Add default reviewers using usernames

On-prem server Bitbucket 6.10. Referring to the API for adding default reviewers for a project. POST…
Kaliyug Antagonist
  • 3,512
  • 9
  • 51
  • 103
2
votes
0 answers

How to work Javascript API Atlassian Bitbucket?

I am successfully using AP.require ('url' ..), url: api.bitbucket.org/2.0/, but I don’t understand how to work with these javacript api bitbucket modules and how they interact with bitbucket. For…
2
votes
0 answers

Bitbucket Rest Api get difference b/w two branches

I'm trying to find out an end point to get difference between two branches via BitBucket Rest API branch 1: refs/heads/release/1.1 branch 2: refs/heads/release/1.2 However when i invoke GET request…
27P
  • 1,183
  • 16
  • 22
2
votes
0 answers

List private repositories of bitbucket using api 2.0

I am writing a bash script which will take a backup of my all bitbucket cloud repositories. I have multiple private repositories in bitbucket and I want to list them using Bitbucket API 2.0 I have tried adding Bitbucket consumer but I am stuck at…
Devendra
  • 185
  • 14
2
votes
2 answers

How to get build status of PR using BitBucket API?

Not getting Build job details/status of the PR when using Bitbucket API for any pull request Here is my API URL: https://example.com/rest/api/1.0/projects/{projectkey}/repos/{reposlug}/pull-requests/{pullrequestID} How Build status looks like on…
2
votes
0 answers

Is there a way to cherrypick in BitBucket Server API or BitBucket rest api?

I am trying to create a BitBucket hook that would get triggered when a PR is merged to one of the release branches. After that it would identify which release branches are newer, open a feature branch for each of the newer release branches. After,…
2
votes
2 answers

Bitbucket API for updating the build status for a pull request

I see the docs for updating the build status for a commit: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build For a pull request, isn't there a unique…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
2
votes
1 answer

How to authenticate a request in Bitbucket REST API

I am trying to use the bitbucket API for getting details of my repositories, issue, etc., but I am not able to find a clear way of authenticating the API request. I would like to have a simple way of authenticating the endpoints…
Rehan
  • 85
  • 2
  • 2
  • 8
2
votes
1 answer

Create repositories in Bitbucket

I have the below structure of projects and repositories: Project 1: --Repository 1 --Repository 2 -- -- -- --Repository 5 Project 2: --Repository 1 --Repository 2 -- -- -- --Repository 10 Project 3,4... My Projects are already…
Rick
  • 1,392
  • 1
  • 21
  • 52
2
votes
1 answer

Sending ssh key to Bitbucket using curl command failing

I am trying as follows: SSHKEY=`cat ~/.ssh/id_rsa.pub` curl -u username:password -X POST -H "Content-Type: application/json" -d '{"key": "$SSHKEY", "label": "someLabel"}' https://api.bitbucket.org/2.0/users/username/ssh-keys But it is…
Md. Najmul Hasan
  • 605
  • 1
  • 6
  • 19
2
votes
1 answer

C# can write but not read BitBucket API for repositories

I am attempting to access the BitBucket API with C#. I can perform some actions, but not others. Notably, writing to repositories works, but reading them does not. using System.Net; using…
Michael
  • 8,362
  • 6
  • 61
  • 88