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

Using API to retrieve all my repositories/workspaces

Hi,

I'm a bit confused with the API in the docs, 

what I'm trying to do is to get list of my repositories by workspace.

I got my API token in the atlassian account which I can use to access the REST API.

Running an api call to this URL: https://api.bitbucket.org/2.0/repositories

with Authorization Bearer: <token> in headers retrieves me ALL repositories in bitbucket.

I want the repositories only from my account.

What am I missing here?

 

Thanks!

 

1 answer

1 accepted

1 vote
Answer accepted

Hello @Eddie Nazarov ,

Just  append the workspace id to that URL, here's the endpoint: /2.0/repositories/{workspace}.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Hey @Daniil Penkin ,

Yes that helped, thanks!

Like Daniil Penkin likes this

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,869 views 0 7
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