1. Bitbucket Website
  2. Public Issue Tracker
  3. master

Issues

Issue #2364 wontfix

Use revision number to get changesets in REST API (BB-894)

adamschmideg
created an issue

When retrieving changesets, the REST api currently seems to support only changeset ids. If I don't know the hash for a repository with a longer history, I can't get the first commit. My feature request is to keep the current scheme /repositories/USERNAME/REPO_SLUG/changesets/NODE/, but NODE could mean either a hash, or a revision number.

Comments (2)

  1. David Chambers

    Revision numbers really shouldn't be used in this way. Changeset hashes are consistent across forks; revision numbers are not necessarily.

    You should be able to retrieve the first commit by hitting the /changesets endpoint once or twice, then — having ascertained the commit's hash — hitting the /changeset endpoint.

  2. Log in to comment