Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,480
Community Members
 
Community Events
168
Community Groups

Is there any way to enable issue tracker in the repo by rest API?

I can't find in the documentation (bitbucket cloud) that we can enable the issue tracker by the rest API, there is only documentation on how to enable it by the UI.
So if I created a 100 repository by the rest API and I need to enable the issue tracker, I need to go over it and enable the issue tracker by the UI for each repo!
Please any help 

1 answer

1 accepted

0 votes
Answer accepted

Hi @ameer_tatour and welcome to the community!

It is possible to enable the issue tracker for a repo via API, using the same endpoint for creating a repository. Since the repositories already exist, you will need to use the PUT method to update each repository.

An example request is as follows:

curl -X PUT https://api.bitbucket.org/2.0/repositories/workspace-id/repo -u username:app-password --header "Content-Type:application/json" --data '{"has_issues": true}'

where workspace-id, repo, username, app-password replace with the respective values for the workspace-id of the repo, the repo slug, your Bitbucket username, and an app password for your user with at least Repositories: Admin permissions.

Please keep in mind that if the repositories you created are private, then the issue tracker you create via API will be private as well. If the repos are public, the issue tracker you create via API will also be public.

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

@Theodora Boudale Thank you very much 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,495 views 3 10
Read article

Atlassian Community Events