Details
-
Bug
-
Resolution: Handled by Support
-
Low
Description
Getting a "Bad Request" Error with API when Creating a Pull Request
#!bash #!/usr/bin/env bash set -o errexit set -o xtrace curl -X POST -H "Content-Type: application/json" \ -u {username}:{password}\ https://bitbucket.org/api/2.0/repositories/py-soft/sms_web/pullrequests \ -d '{ "title": "Merge some branches", \ "description": "stackoverflow example", \ "source": { "branch": { "name": "TEST" }, \ "destination": { "branch": { "name": "QA" } }, \ "reviewers": [ { "username": "{username}" } ],\ "close_source_branch": true }' > output.txt 2>&1
#!bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 100 267 100 11 100 256 3 87 0:00:03 0:00:02 0:00:01 87 Bad Request