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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

710 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot