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 ?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I re-up the question and got the answer in https://community.atlassian.com/t5/Bitbucket-questions/Bad-request-when-adding-Branch-Restrictions-using-the-Rest-API/qaq-p/1150581?utm_source=atlcomm&utm_medium=email&utm_campaign=mentions_answer&utm_content=topic
It would be work after remove extra wrapping curly braces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.