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:
Thanks!
Alastair
Knowing that the 1.0 API is officially deprecated or Bitbucket Cloud, what should we use now?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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-get
what can be done here?
i need the names of files that changed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.