Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Server Pull Request POST API Response body is wrong in documentation.

Sayantan Ghosh September 16, 2021

Hi, when I tried to create a Pull Request in my destination server , I got a 400 error that says author is not expected.

When I remove the author key, it successfully executed with a 201 response code. when I include the author key in my response body it always throw a 400 error. Please review the given response body in the documentation. It has a bug.

Please find the given author section from the screenshot and validate it.

Screenshot_20210917-015029667.jpg

 

Documentation Link - 

https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8287391664

 

1 answer

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2021

Hi Sayantan,

 

The response body is what the server responds with. You need to look at the sample listed under Example request representations. 

Cheers,

Christian

Premier Support Engineer

Atlassian

Sayantan Ghosh September 18, 2021

Hi @Christian Glockner , I have seen the sample response body. 

But one thing I would like to address, I have getting the server response and modifying its key values in order to migrate the Pull Requests from Source server to destination server. And strangely, it worked fine and the pull request is successfully migrated. 

But the only problem is whoever is doing the migration , in the destination server the name of the pull request creator is replaced by the migrator name. 

That's why , when I am trying to pass the author key, it's says error. Then it means there's no way I can properly migrate a pull request of a repository??

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events