I'm using Bitbucket cloud edition and wanted to fetch all modified files of a commit for one of my respository.I prepared the API but receving output in text format instead of JSON.I used following API
https://api.bitbucket.org/2.0/repositories/<MyTeamName>/<My_Repo_Name>/patch/4b2cc72
here 4b2cc72 is commit ID (Hash) I'm getting response in Text format.
Please share the extact API for getting the modified files of a commit(s) through REST API.
Hi Yuvam,
You can use the diffstat endpoint in the 1.0 API to get a list of modified files: https://confluence.atlassian.com/bitbucket/changesets-resource-296095208.html#changesetsResource-GETstatisticsassociatedwithanindividualchangeset
For more info and related discussion, see this post:
https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-list-files-from-commit/qaq-p/561954
Thanks!
Alastair
Knowing that the 1.0 API is officially deprecated or Bitbucket Cloud, what should we use now?
If you came here looking for how to retrieve files in a commit using the 2.0 API:https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/diffstat/%7Bspec%7D
i can find a way to do it with API.. tried also https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-getwhat can be done here? i need the names of files that changed
It looks like you're new here. Sign in or register to get started.