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
36
votes
5 answers

Is there a way to rename a repository on Bitbucket using their API

I couldn't find anything even remotely related in the documentation.
crazybyte
  • 9,999
  • 5
  • 26
  • 22
27
votes
2 answers

curl vs python "requests" when hitting APIs

I am trying to hit the Bitbucket API for my account, and a successful attempt looks like: curl --user screename:mypassword https://api.bitbucket.org/1.0/user/repositories in the command line. In python, I try: import requests url =…
codyc4321
  • 9,014
  • 22
  • 92
  • 165
20
votes
5 answers

How to get a full list of repositories that a user is allowed to access?

I have found bitbucket api like: https://bitbucket.org/api/2.0/repositories/{teamname} But this link return 301 status (moved permanently to !api/2.0/repositories/{teamname}). Ok, but this one returns status 200 with zero repositories. I provide…
gaussblurinc
  • 3,642
  • 9
  • 35
  • 64
17
votes
3 answers

How do I post a pull request comment using BitBucket REST api 2.0?

Using REST API 1.0, I can do the following POST /api/1.0/repositories/{owner}/{repo}/pullrequests/1/comments What is the equivalent of this in 2.0? 2.0 documentation for pullrequests resource states "Finally, you can use this resource to manage the…
WiSeeker
  • 812
  • 9
  • 24
14
votes
0 answers

How to access Bitbucket Server bundled elasticsearch via REST API

I need to run a code search report across many projects/repositories hosted on Bitbucket Server. The browser interface is not helpful for this task as it pages the results and requires manual scrolling to load the (many) results. Found a REST API at…
Kim Taylor
  • 348
  • 1
  • 10
13
votes
2 answers

Get raw file content using Stash Rest API

I am able to get raw file content using the Bitbucket REST API, as https://api.bitbucket.org/1.0/repositories/AccountName/Repo_Slug/raw/master/MyFolder/MyFile.cs, Is there a equivalent to get it from Stash using Stash Rest API. I couldn't find it…
parsh
  • 746
  • 1
  • 10
  • 23
12
votes
4 answers

SSH Host Key Rotation

While opening bitbucket I got a message on snackbar saying "SSH Host Key Rotation" what does it really means? Do I need to do something? SSH Host Key Rotation IMPORTANT NOTICE: Bitbucket Cloud’s RSA SSH Host Key will be rotated on June 20, 2023 1700…
Mukesh Maurya
  • 340
  • 4
  • 16
12
votes
1 answer

Get pull request subject/topic automatically

I am interested in creating automated release notes based on the Pull Request description, such as "Add legal resolutions claim report function" shown on the screen below. However, I am not very experienced with Pull Requests, and I am not sure if…
10
votes
3 answers

Cloning Bitbucket server repo with access tokens

I am trying to clone a bitbucket server repo (self-hosted) using access-token however I could not find any documentation on Bitbucket server API. My clone url is ssh based. Or is there a way to use REST API curl command to clone bitbucket server…
10
votes
2 answers

Commit a file to git repository using Stash (bitbucket server) REST API

I am using Atlassian Stash (Bitbucket server) to manage my git repository. Recently I had a requirement to commit a file (a newly created .xml file) to my Git repository using the Stash REST API. I've gone through the documentation, but it seems…
gihan-maduranga
  • 4,381
  • 5
  • 41
  • 74
9
votes
6 answers

One ssh-key to all repositories in bitbucket

We have a application account in my server for which we have generated a ssh-key. We need to upload the application account public key to all the repositories in my bit-bucket project. There are so many repositories in my project we can't upload the…
8
votes
1 answer

Bitbucket pull request builder plugin keeps triggering same commit build

I need to integrate Bitbucket with Jenkins. So that whenever a PR is opened it will trigger a build in Jenkins. Then commit status of the last commit in the PR will be updated as failed or success and this commit wont trigger the build again. (This…
raitisd
  • 3,875
  • 5
  • 26
  • 37
7
votes
2 answers

Webhooks for Bitbucket that apply to all repos

Our team has an account on Bitbucket and we have to configure webhooks for each repo. Is there a way to configure webhooks for all repos in once place instead of managing webhooks in each repo separately? Alternatively, is there a way to use the…
user1604294
7
votes
3 answers

cloud-builds pub/sub topic appears to be unlisted or inaccessible

I'm attempting to create an integration between Bitbucket Repo and Google Cloud Build to automatically build and test upon pushes to certain branches and report status back (for that lovely green tick mark). I've got the first part working, but the…
7
votes
2 answers

Bitbucket API 2.0 - list of private repositories

It is possible to get all user repositories using Bitbucket API 2.0 including private repositories? When I use https://api.bitbucket.org/2.0/repositories/{username} i got only public.
1
2 3
28 29