Not able to create pull Request via Rest API defined for developer portal?

Hi Team
I am using following URL's to create pull request.
http://engstash.int.kronos.com/rest/api/1.0/projects/clas/repos/wfp/pull-requests
and Json
{
"title": "Test Pull Request",
"description": "Pull Request through Web service",
"state": "OPEN",
"open": true,
"closed": false,
"fromRef": {
"id": "refs/heads/develop",
"repository": {
"slug": "wfp",
"name": null,
"project": {
"key": "clas"
}
}
},
"toRef": {
"id": "refs/heads/pmod",
"repository": {
"slug": "wfp",
"name": null,
"project": {
"key": "clas"
}
}
},
"locked": false,
"reviewers": [
{
"user": {
"name": "Johny.Kandhari@KRONOS.com"
}
}
],
"author": {
"user": {
"name": "Johny.Kandhari@KRONOS.com",
"emailAddress": "Johny.Kandhari@Kronos.com"
},
"role": "AUTHOR",
"approved": false,
"status": "UNAPPROVED"
},
"links": {
"self": [
null
]
}
}

 

But the response received from this API is 200 and in below format

{
"size": 18,
"limit": 25,
"isLastPage": true,

"values":[],

"start": 0

 

This values cotains list of all commits present in this PR . Afterr that when I am seeing this under Pull Request created tab on bitbucket, I am not able to see this request. As per me the POST API is working in same way as GET API

 

As per the API Documentation POST API should return 201 response but I am not getting this response. Please let me know what to do for this so that i can create pull request soon. Please reply ASAP.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,381 views 9 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you