I'm not sure what is going on but i'm trying to set the permissions on a branch via the api and after fixing a lot to get my request json correct (it would be nice if the api docs had an actual example sample.) I'm just getting a 500 error. If i add a branch permission and use the get request i use the example return as value for the post (after i remove the permissions so that the permissions are completely empty). "Something went wrong" is not very helpful. Below is the json i'm sending
"display_name": "Morinda Dev Team"
This is with bitbucket cloud. I know that my oauth is working because i can do other api calls properly. I also know that my json should be good because after a lot i was finally able to get past all of the checks for missing values etc. now i'm just stuck at a 500 error and i have no idea where to go.
Thanks for reaching out and welcome to the Community!
500 isn't good, we'll fix that – thanks for reporting. The reason for it seems to be that you didn't specify the content type properly, so it wasn't parsed as JSON. Adding Content-Type: application/json header should fix that.
Also, you don't need half of the attributes in the JSON you posted, here's an example payload that works for me:
curl -u dpenkin:app_password \
-H "Content-Type: application/json" \
I agree, our API docs are suboptimal, this is on our radar.
Hope this helps. Let me know if you have any questions.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events