Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Hello,


I'm working on a system that collects a file{s) from the repo for our package manager.
There is only a problem, in that the bitbucket account, there are a lot of repositories.

So I was playing around with the query functionality of the API.
every repository has a project key, so I thought I could do this:

repositories/{WorkSpace}?project.key={ProjectKey}

Sadly this doesn't work. Is this feature supported?

1 answer

0 votes

Hi @i_rutjes and welcome to the community.

This should work, but I think you're missing the q= part after the question mark in the URL. The URL should be

https://api.bitbucket.org/2.0/repositories/my-workspace?q=project.key="TEST"

You may also need to URL encode the characters = and ", e.g. from my terminal I had to do the following:

curl -u username:app-password https://api.bitbucket.org/2.0/repositories/my-workspace?q=project.key+%3D+%22TEST%22

Is this something that works for you?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,717 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you