The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set default reviewers using API 2.0

Daniel Rosario Carletti
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!
March 6, 2020

Not sure if this is possible, but it seems it was once possible to set default reviewers using the API. Could not find it on the documentation. I'm trying to automate repository creation and setting the default reviewers is an important step. Has anyone tried and succeeded?

My request as of now (attempted to add a participants field, that of course didnt work):

curl -X POST \ https://api.bitbucket.org/2.0/repositories/myhandle/mynewrepo \ -H 'Authorization: Basic yattayattayatta' \ -H 'Content-Type: application/json' \ -d '{ "scm": "git", "is_private": true, "participants": [ { "is_staff": true, "account_id": "my_own_account", "role": [REVIEWER], "approved": true } ], "project": { "key": "MYPROJECT" }}'

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2020

Hello @Daniel Rosario Carletti,

Welcome to the Community.

Here are the endpoints to add and delete a user to/from default reviewers for a given repository. This endpoint lists all default reviewers.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

TAGS
AUG Leaders

Atlassian Community Events