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

Adding Branch Restrictions using the Rest API

Chandana November 22, 2018

I am trying to add branch restrictions on a repository in Bitbucket Cloud using the Rest Api V2.

 

My request looks like this:

{
{
"kind": "require_passing_builds_to_merge",
"pattern": "integration",
"groups":[],
"users":[],
"value":1
}
}

I am using curl to POST the json.

curl --user XXXXX:YYYY -X POST -H 'Content-Type: application/json' --data @data.json https://api.bitbucket.org/2.0/repositories/myteam/myrepo/branch-restrictions

I am getting an HTTP 400 - Bad Request error.

What am I doing wrong ?

 

1 answer

0 votes
Tran Tien dung August 9, 2019

Hi @Chandana 

I got the same issue, did you fix that?

Thanks.

Chandana August 9, 2019

No, I did not.

I also didn't pursue it as I had other priorities.

I am also disappointed that no one from Bitbucket has seen fit to answer my question. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events