Search code examples
bitbucketbitbucket-apibitbucket-server

Bitbucket API - read shared repositories


How can I read all repositories for the current logged in user (under current user I understand the user authenticated with the acess_token - we are in API side). The "/repositories" endpoint return us all the public repositories. The "/repositories/{username}" returns all the user (identified by the username) repositories. This endpoint is good but from the raw logic we didn't know the user's username (the user who shared with the current user a repository).

So I'm looking for and endpoint witch returns for me all my (current user) repositories but also all the repositories shared with me.


Solution

  • Recieved from BitBucket - [Bitbucket Cloud Support]

    I have went though the documentations and below are my findings.

    The API(s) that are currently used to return the repositories result, are based on the username. This means that the results are only returning owned repositories. As of now, there is no endpoint that can return shared repositories owned by other users. I hope this clarifies. Please let me know if you require further clarification.