I need to do some simple API queries on a few open source projects. This is quite straightforward for projects hosted at bitbucket.org, with the API for a given project looking like: https://api.bitbucket.org/2.0/repositories/<REPO>/<PROJECT>
But I need to access the API for a project with a custom/business base url like: https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5
I haven't been able to find any documentation on this and my various permutations on api as part of the basename (or adding it to the path) haven't turned up anything either. I assume/hope the API is still available for repos with this configuration, but I would very much appreciate some direction.
Hello and welcome to the community!
https://api.bitbucket.org/2.0/repositories/<REPO>/<PROJECT> can be used for Bitbucket Cloud repos, hosted on https://bitbucket.org/.
An instance with a URL like https://bitbucket.hdfgroup.org/ is a Bitbucket Server instance (self-hosted) and the API is different.
The following documentation has a list of REST resources for Bitbucket Server (version 7.7.0):
Kind regards,
Theodora
Thanks! That did the trick. If anyone else finds this thread the solution for the repo in question looks like:
https://<BASE>/rest/api/1.0/projects/<REPO>/repos/<PROJECT>
But the REST documentation makes it pretty clear what's worth trying if a repo's API URL doesn't exactly conform to that pattern.
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.