API 2.0 equivalent for the /1.0/user/repositories endpoint

Hi all,
Is there an API 2.0 call that returns the same data as https://bitbucket.org/api/1.0/user/repositories ?

I’ve tried:
/2.0/repositories/{username} - It returns only public/owned repositories
/2.0/users/{username}/repositories - same as first one

/2.0/user/permissions/repositories - returns a good list of repositories but missing the data that I used to get in the API 1.0 call. It will force me to make another call per repository to get the info.

Any help will be much appreciated.
Thanks a lot,
Giora.

1 Like

Hi @giora,

/2.0/repositories/{username} is what you want: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/{username}

By default it will only return public repositories. However, to get non-public repositories you can authenticate using Basic Auth.
e.g.

curl -u username -H "Content-Type: application/json" https://bitbucket.org/api/2.0/repositories/{username}

Hope that helps,
Kristy