command executed successfully but no luck. Pull requests didn't get generated. Here is the command which I fired.
curl -u myUserName:myPwd -H "Content-Type: application/json" https://bitbucket.org/rest/api/1.0/projects/myProject/repos/myCore/pull-requests -X POST --data '{"title":"merge","description":"merge","fromRef":{"id":"refs/heads/testBranch","repository":{"slug":"myCore","name":null,"project":{"key":"testBranch"}}},"toRef":{"id":"refs/heads/toBranch","repository":{"slug":"myRepo","name":null,"project":{"key":"testBranch"}}}}'
Hello @Ramashankar Mishra,
By the look of the URL, you're trying to use Bitbucket Server's API endpoint with Bitbucket Cloud. Unfortunately, the APIs are actually very different, here's the endpoint to create a pull request in Bitbucket Cloud:
POST /2.0/repositories/{workspace}/{repo_slug}/pullrequests
This page contains some examples of curl commands too.
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.