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

Johny Kandhari July 21, 2017

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
TAGS
AUG Leaders

Atlassian Community Events