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

List pull requests that contain a commit not giving the full output reponse

Akshara Anilkumar September 6, 2023

When I am using this url it is not giving the full reponse as which is shown in the document of bitbucket cloud. Is there any reason why this is happening ?(document link: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-commit-commit-pullrequests-get)

 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests' \ --header 'Accept: application/json'

 

This is how I am getting my output but whereas in the document it is showing a lot more .

{
"type": "paginated_pullrequests",
"values": [
{
"type": "pullrequest",
"id": 15,
"title": "userStory.java created online with Bitbucket",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/ck-mux-bitbucket-connector/bitbucket_repo/pullrequests/15"
},
"html": {
"href": "https://bitbucket.org/ck-mux-bitbucket-connector/bitbucket_repo/pull-requests/15"
}
}
}
],
"page": 1,
"pagelen": 50
}

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 7, 2023

Hey @Akshara Anilkumar 

Welcome to the community!

I can reproduce the same response as you, so I am checking this internally to see if the endpoint has a bug.

As a workaround, I believe if you use the `?fields=` options to get the fields you need, it should return the desired outcome, so please try it and let me know if that works.

Regards,
Syahrul

Akshara Anilkumar September 7, 2023

Hi @Syahrul 

Thankyou for the reply. Actually its working when the endpoint is given like this:  https://api.bitbucket.org/2.0/repositories/ck-mux-bitbucket-connector/bitbucket_repo/commit/6114c34588678f9c4b30580c85c558e5801ae0c2/pullrequests?fields=%2Bvalues.merge_commit

Is it possible to resolve this bug as soon as possible?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events