It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Posted in Bitbucket

Share your software development horror stories!

Hey Community! I work on the Bitbucket product marketing team. With Halloween approaching, we wanted to discuss a topic tailor-made for October: development horror stories. Whether it was a lurk...

624 views 6 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you