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 ?