Hi all,
Using the 1.0 API, it was possible to get for each file the revision and date this file was last updated.
I don't find this information with the 2.0 API.
How can this be done, using the response of the result of the endpoint as documented here: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/src/%7Bnode%7D/%7Bpath%7D
Or is this no longer possible?
Kind regards.
Hi @Michelle Gybels,
You can get this information using filehistory endpoint. So if you're interested only in the commit hash and timestamp of the latest update, API request might look like this:
https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/filehistory/master/website/package.json?fields=values.commit.hash,values.commit.date&pagelen=1
Hope this helps.
Cheers,
Daniil
Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.
Join the webinar ✨Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.