Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

ameer.tatour
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 12, 2022

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2022

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

ameer.tatour
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 13, 2022

@Theodora Boudale Thank you very much 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events