The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

list the changes in a PR api is not working

ravi.nagayaswanth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2024

Currently, I am using app password for authentication.
when I use below Api: it is working and i am able see the PR information
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}

but when i use the below Api, just by adding "/diff" to get the changes in the PR, i am receiving 'Response status code does not indicate success: 404 (Not Found).'

https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff

or 
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat

Can you help me with this

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
May 24, 2024

According to the BB Cloud API spec  the request returns a 302 to a repository diffstat.

1. Check if you can see the exact PR in the browser, you may not have access to the repo.

2. If you have access in the browser check your app-password scopes are sufficient to see repo and pull requests.

3. Send the request again via curl or postman and see if you get a 302 response with a redirect location.

4. If you use postman, let it follow the redirect, if you use curl run the same request with the '-L' flag

 

Let me know how you go.

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events