Missed Team ’24? Catch up on announcements here.

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

Using API to retrieve all my repositories/workspaces

Eddie Nazarov
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!
May 13, 2020

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
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2020

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

Eddie Nazarov
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!
May 13, 2020

Hey @Daniil Penkin ,

Yes that helped, thanks!

Like Daniil Penkin likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events