You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I tried in cURL its working But When I use it in same JSON format in python its showing 400.
curl --request POST -u usename:AppPassword \
--url 'https://api.bitbucket.org/2.0/repositories/*****/******/branch-restrictions' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"kind": "restrict_merges",
"branch_match_kind": "glob",
"pattern":"develop",
"groups": [
{
"slug": "administrators",
"full_slug": "****:administrators",
"name": "Administrators",
"default_permission": "admin",
"account_privilege": "admin"
}]
}'
its worked.
_________________________________________________________
But python
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.bitbucket.org/2.0/repositories/******/*******/branch-restrictions
Please help to solve this issue.
Thanks & Regards,
Karthikraj M