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: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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
TAGS
AUG Leaders

Atlassian Community Events