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

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

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
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.

 

Suggest an answer

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

Atlassian Community Events