From the below API curl request, I am trying to create a restriction for push and restrict merges for a repository
curl --location 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_name}/branch-restrictions' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '[ {
"kind": "push",
"branch_match_kind": "glob",
"pattern": "test",
"users": [{"username": "{username}"}]
},
{
"kind": "restrict_merges",
"branch_match_kind": "glob",
"pattern": "test" ,
"users": [{"username": "{username}"}]
}]'
And I am getting the below error
{
"type": "error",
"error": {
"message": "Something went wrong",
"id": "674e26aa0b7b4227b3d7bea36d4bfc9c"
}
}