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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,911 views 26 12
Join discussion

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