The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

What is the API URL for bitbucket servers with alternate basenames?

wspear
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 28, 2020

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.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2020

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

wspear
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2020

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.

Like • Theodora Boudale likes this
TAGS
AUG Leaders

Atlassian Community Events