how can i query the bitbucket rest api for all repositories within a project?

Guy Matz July 29, 2016

I would like to query the bitbucket rest api for all repositories within a project.  Is this possible?  I don't see . . .

2 answers

2 votes
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2016

I'm afraid that is currently not possible. The API portion of the projects rollout is currently being worked on, but hasn't been released yet.

However, it will eventually be possible to apply a standard API filter query on the team's repositories endpoint (project.key = "PROJ"):

https://api.bitbucket.org/2.0/repositories/bitbucket?q=project.key%3D%22PROJ%22

I'll try to update this answer when we roll that out.

Lee Myring September 17, 2018

In case anyone wanders by this post...yes, this is now rolled out and I can confirm it works

Like # people like this
1 vote
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2016

I used this in Stash (not BB though)

/rest/api/1.0/projects/$PROJECT/repos?limit=999

evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2016

Stash (Bitbucket Server) and bitbucket.org are very different code bases and their APIs reflect these differences. The above does not apply to Bitbucket Cloud.

GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2016

Oh it's Cloud! Not checking the tags... zzz.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events