423 questions
2
votes
0
answers
58
views
How to download file contents from private BitBucket repository using API token
So far I got this
def _parse_bitbucket_url(value: str) -> Dict[str, str]:
parsed_url = urlparse(value)
if not parsed_url.scheme or "bitbucket.org" not in parsed_url.netloc:
...
1
vote
0
answers
53
views
Bitbucket downloaded file is always corrupted
Ok so I've been trying to create a library to use in multiple projects and I'm having a hard time with the limited tools at my disposal. All the projects are being hosted in Bitbucket, including the ...
-1
votes
1
answer
43
views
How do I convert #issue-id into link to my favorite issue tracker in commit message in a Bitbucket Data Center UI?
My company uses bitbucket data center but we are using our own issue tracker. We would like to convert text like bug#14 and feature#534 which appears in commit messages into links which leads to our ...
0
votes
0
answers
71
views
Bitbucket Cloud /2.0/users API: Forge platform failed to process runtime HTTP request
I'm trying to retrieve user details from Bitbucket cloud users API from my Forge app without success.
This is my code snippet:
const approverDetails = await api.asApp().requestBitbucket(
...
0
votes
1
answer
532
views
How to create/update a Bitbucket Cloud workspace variable via API?
I posted this in the Bitbucket Cloud forums too.
I see this article on how to update variables, but none of them refer to workspace variables. Is there a way to create/update Bitbucket Cloud workspace ...
1
vote
1
answer
655
views
BitBucket - get number of comments and time in review for a list of PRs
I'm an engineering manager with the following thesis about pull requests in my team:
1. Long PRs take longer to review (disproportionate to their length in lines of code)
2. Long PRs receive less ...
0
votes
1
answer
45
views
Unable to escape character in groovy bitbucket
I wanted to output shared path viewable on windows to bitbucket, however unable to get the expected output
Code snippet in groovy and out put as follow:
event_msg="\\\\blr-archieve\\Sfolder\\bins\...
0
votes
1
answer
55
views
Is it possible to check on which server a repository has been cloned in bitbucket and github
Github seems to provide details of the git clones that have been run on a repository in it's Graphs -> traffic tabs. Is this information also available from either the github api or gh cli tools? I'...
0
votes
0
answers
308
views
Programmatically Generate Bitbucket HTTP Access Token Using Existing Access Token
As the title states, is it possible to programmatically generate an HTTP access token on Bitbucket server from an existing access token, e.g. via their REST API?
From reading their documentation, it ...
1
vote
1
answer
1k
views
Get Pull requests from bitbucket REST-API assigned to my user
I am using the below REST-API to get the latest pull request from bitbucket
{link}/rest/api/1.0/projects/{my project}/repos/{my repo}/pull-requests?state=all&limit=1&size=1
It is working ...
0
votes
0
answers
124
views
How to pass payload to Bitbucket api to enable Yaac(yet another commit checker) using Python
I am trying to enable YAAC (Yet another commit checker) using Bitbucket api programatically
(Python 3.7), but somehow the payload looks not good and getting status code as 400, with an error expected ...
0
votes
0
answers
58
views
Get formatted file content from Bitbucket API
Is there some way to get Bitbucket formatted file content instead raw text using Bitbucket API? I'm using cURL in PHP.
1
vote
1
answer
441
views
Enable Git-LFS on BitBucket Server using REST API
I need to interact programmatically with a BitBucket Server to create and manage repositories.
To create a repository, a corresponding REST API method is available.
The created repositories should ...
0
votes
1
answer
98
views
BitBucket API call to get shortcuts details in a repo
For a repo in bitbucket in the left side menu option we can see source, commit, branch, pull request etc. Like wise there is shortcuts option available in my company domain.
I want to know the ...
0
votes
0
answers
423
views
How can I search for specific text in a repository using the bitbucket API?
I am trying to look for specific text in a repo but how can I achieve this with bitbucket server using the bitbucket version 1 API?
I am a bit limited with the advanced search feature on the bitbucket ...
0
votes
0
answers
178
views
Is there any Bitbucket API that can give the list of commits of a user without specifying a project or branch?
I am trying to get all commits of a user in Bitbucket. I couldn't find any documentation related to it. I was wondering if anybody else had the same use case.
I am looking for something like this:
...
0
votes
1
answer
926
views
How to create a new Bitbucket pull request via API?
I'm trying to create a pull request on Bitbucket Server via Rest API, following this documentation. No matter what I try, I get a (400) Bad Request. error. I found this answer and used the body text ...
1
vote
1
answer
334
views
How to react to Bitbucket PR comments via Rest API
I have a Bitbucket Server and I'm trying to figure out how to react to PR comments via the REST API. I'm referencing this documentation. The example shows:
curl --request PUT \
--url 'http://{...
0
votes
0
answers
75
views
Fetching Mention Notifications via Bit-bucket API
I am currently working on a task that involves identifying who has mentioned me in their repositories on Bit-bucket. I understand that Bit-bucket sends out notification emails for such mentions. ...
1
vote
0
answers
52
views
Bitbucker REST API to Commit Files with custom email
I am using Springboot service which connects to Bitbucket via REST API to commit file . This works perfectly when I use the token of a user which has a email associated with it.
I have a usecase when ...
1
vote
1
answer
863
views
Bitbucket Cloud API: is there a way to edit a file in a repo?
The Bitbucket Server API documentation outlines an endpoint to submit a PUT request and edit a file within a specified repository. However, the Bitbucket Cloud API does not seem to have this same ...
0
votes
1
answer
113
views
BitBucket API Call for Creating Pull Request
I am having some issues assigning reviewers to a BitBucket pull request. I can create the pull request just fine, but only one of the users is being assigned as a reviewer. Only the last "user&...
1
vote
1
answer
1k
views
Getting Commit ID on a specific file using file name/path - Bitbucket Server API
I am trying to write some scripts which will create files(json) in Bitbucket Server and occasionally update these files. Later on I would like to be able to query the changes made to the files and ...
15
votes
4
answers
12k
views
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 ...
0
votes
0
answers
442
views
Trying to fetch a raw file from bitbucket private repository using access token
Im trying to fetch a raw VERSION file from a repository for a CD solution.
I created a Repository Access Token with Repository: Read permission, as documented here
Using cURL,
curl https://api....
1
vote
1
answer
2k
views
Trying to create a new file in Bitbucket via a REST API call
This is a follow up question to a previous question. I'm trying to write a program in Javascript that receives the contents of a yml file encoded as a string and adds that yml file to a remote ...
1
vote
1
answer
833
views
Get all Pipelines in BitBucket Cloud API isn't returning a next page
Below you can find my code to get all pipelines for a repository in BitBucket Cloud:
def get_pipelines(token, repo):
"""Return list of pipelines for repo"""
...
0
votes
0
answers
206
views
Bitbucket API receiving GET return when sending a POST request
I am trying to create a new project using Bitbucket API to this endpoint: http://api.bitbucket.org/2.0/workspaces/{My_Workspace}/projects
by sending a POST request.
For headers I am passing:
...
1
vote
1
answer
1k
views
How to get a YAML file from the Bitbucket Server API?
I am trying to get a YAML file, located on our Bitbucket, in YAML format, using an API call in a Python script. The only way I have been able to get any data so far, is by using .json() at the end of ...
0
votes
2
answers
1k
views
As an admin user, how can I use the bitbucket REST API to view the email addresses of all the users in my workspace?
I tried the following api calls:
https://api.bitbucket.org/2.0/workspaces/<workspace_name>/members
followed by self.href for each member.
I can only see their UUID and display name not their ...
0
votes
1
answer
733
views
Create a new Bitbucket Pipeline using API
I would like to create a new pipeline using API for SAST scan. Is this possible using the API. Any pointers to the relevant BB API docs or any sample code?
0
votes
1
answer
853
views
Accessing bitbucket repository settings / links via API
Id like to enable/disable the "Require issue keys in commit messages" setting on repositories via the rest API. This can be done on the site by going to Repository Settings > Links. I ...
2
votes
1
answer
798
views
Programmatically add an access key to a bitbucket repo (Bitbucket cloud API)
The documentation of the Bitbucket Cloud API specifies how to add an SSH key to a specific user.
However, the Bitbucket website also allows to add several SSH "Access keys" (a.k.a. ...
5
votes
1
answer
1k
views
Best way to run bitbucket scheduled pipelines on weekdays
Bitbucket scheduled pipelines UI does not have an option for us to enter a cron expression and we can only run the pipeline hourly, daily or weekly. There is an option to create schedule via API call ...
3
votes
0
answers
643
views
Is it possible to add some custom data to the event payload body or headers sent to a Bitbucket webhook?
I want to add a few strings to the existing event payload that is delivered to a webhook. It doesn't matter if i can send them in the payload body or as Custom HTTP Headers.
I've checked the ...
0
votes
1
answer
322
views
Bitbucket - Revoke Oauth Authorization API
In bitbucket, i have created oauth consumer & implemented authentication flow (Authorization Code Grant) https://developer.atlassian.com/cloud/bitbucket/rest/intro/#1--authorization-code-grant--4-...
0
votes
0
answers
219
views
How can I use curl command in multi-line way?
I am trying to use a curl command which I've found out somewhere in stack overflow community. I have edited it according to my needs (adding my creds and all) the same command if I try to use as a ...
0
votes
1
answer
1k
views
Retrieve Text file content using Bitbucket server rest APIs in Java JsonNode format
I am trying to use the bitbucket server rest API to fetch file content(.json file) from a bitbucket repository in a Java spring boot Application but the response is not as expected.
Content in the ...
0
votes
1
answer
2k
views
BitBucket Rest API, change repository settings
So I have this repo: https://bitbucket.com/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/
this URL outputs alot of information about the repository
I then tried to create a Python script ...
0
votes
1
answer
984
views
Is there a Bitbucket API to search if a repository variable is defined in all of my workspace's repos?
Instead of defining a Bitbucket Cloud workspace variable that can be used by all the repos in the workspace, someone defined it in each repo, but not in all of them, of the workspace. Now I want to ...
1
vote
1
answer
542
views
API POST Endpoint for Inline Pull Request Comments?
I’m hoping someone can help me be able to post inline comments on PR’s. In the UI version of Bitbucket, you can post a comment on a specific line, for example, line 6 (see screenshot):
However, when ...
0
votes
1
answer
1k
views
How to create a branch restriction through Bitbucket (cloud) API
I am trying to create a branch restriction using below curl command but it is throwing a bad request. How can I create a working API call? This executed on Jenkins using sh and enclosed in double ...
0
votes
2
answers
2k
views
how to prevent merge of unapproved pull requests in bitbucket
We are trying to improve our merge process by protecting specific branches from merge of any unapproved pull request.
The developer create a pull request and he/she can´t merge it until it is at least ...
0
votes
0
answers
151
views
Create file structure from strings
I am trying to create a BitBucket plugin to get the repository structure and print it out in a structured format. The plugin creates a button on the repo page and when clicked it connects with a ...
6
votes
1
answer
2k
views
Bitbucket endpoint for all Pull Requests assigned to a user?
Using the Bitbucket REST API, I’m looking for a way to get all pull requests that are assigned to a user. So far this endpoint: https://api.bitbucket.org/2.0/repositories/{workspace}/{repository_name}/...
0
votes
1
answer
709
views
Bitbucket create PR API request timing out
We've suddenly started seeing time-outs on our API-based PR creation requests in Bitbucket. I'm able to create a PR in the UI, but any attempt to do so via API results in a 504 Gateway Time-out.
We're ...
1
vote
1
answer
2k
views
Resource not found - Triggering BitBucket Pipeline using curl
I created a new project and added a repository to it in my workspace. Further, I added a bitbucket-pipelines.yml to build a pipeline. I am able to trigger the pipeline manually however while trying to ...
1
vote
1
answer
129
views
Best way to sort strings of filepaths into a directory structure?
I am using contentService.streamDirectory to get a callback containing all directories/files within a BitBucket project, then I am using a for loop and "callback.getFiles().get(i).toString()"...
3
votes
1
answer
3k
views
search a file with bitbucket rest api (v1.0)
How can I search a file with a name on bitbucket via rest API? (v1.0)
It seems there is an endpoint useful to get the file but there is no one to search and find the file(s) with name.
2
votes
3
answers
3k
views
How to find the default branch of Repository - Bitbucket Cloud API
I went through the complete API documentation of The Bitbucket Cloud Rest API:
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories
But I did not found ...