How to get all repos for a user?

Mari M
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!
February 28, 2018
I know of the /2.0/repositories/{username} and privileges endpoints for bitbucket cloud but I am using bitbucket server rest API. Is there a similar endpoint in bitbucket server that I (hopefully) missed to get all the repositories a user owns or is a member of? Thanks!

1 answer

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

Hi Mari,

The concept of project ownership is different between Bitbucket Server and Bitbucket Cloud.

 

In Bitbucket Server, you can use the /rest/api/1.0/projects/{projectKey}/repos REST API (see this link for more details) to retrieve all the private repositories from a user. You'll need to replace {project} with the ~username (note the ~ as a prefix).

 

If you are interested to get the list of repositories that a user can access, you could check the instructions on the How to report on permissions by querying the database page.

 

Cheers, Caterina - Atlassian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events