I am trying to automate the process to provide the user access on Bitbucket branches on the cloud via bitbucket API using curl command. Please help me with the command as I have visit link. But no luck.
I have run the below command but getting 400. Please help where I am doing the wrong.
.\curl -i -u user:password -H "Content-Type: application/json" -X POST -d '{"type": "no-delet es","matcher": {"id": "refs/heads/branchname","displayId": "branchname","type": {"id": "BRANCH","name": "Bra nch"},"active": true},"users": ["user"],"groups": []}' 'https://api.bitbucket.org/rest/branch-permissions/2.0/pro jects/projectkey/repos/reponame/restrictions'