Get all Repos from Workspace from Bitbucket API

arturo.salazar October 16, 2019

Hey,

I have a little issue to get all repos from a workspace in bitbucketAPI, I only receive with status 200 this:

{ "pagelen": 10, "values": [], "page": 1, "size": 0}

The endpoint that I used is /repositories/{username} 

for authentication I created a OAUTH ID/Secrent in my settings 

 

thanks for your help

3 answers

1 accepted

0 votes
Answer accepted
arturo.salazar October 18, 2019

Thanks everyone for your help, was a authentication issue only, we need to create token in this url>

https://bitbucket.org/site/oauth2/authorize?client_id=Client-ID-HERE&response_type=token

0 votes
seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2019

It's likely that the way you're authenticating isn't working or you're authenticating as someone who doesn't have access to view the repositories you're requesting.

Since repositories can be public or private, you can view the repository list of any user (even without authentication) but the items in the list depend on your access. If you don't have access to view any of a workspace's repositories then you'll see an empty list.

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2019

Hi,

this endpoint returns a paginated list of all repositories owned by the user with username from the url. Is your user really an owner of all the repositories?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events