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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.