Hello,
I'm working on a Bitbucket Cloud integration and need clarification on several critical API endpoints that are being deprecated as part of CHANGE-2770.
Deprecated Endpoints in Question:
GET /user/permissions/workspaces - DocumentationGET /user/permissions/repositories - DocumentationGET /repositories - DocumentationThe suggested workspace-scoped alternatives appear to be:
/workspaces/{workspace}/permissions/repositories/workspaces/{workspace}/permissions/repositories/{repo_slug}However, these alternatives have a critical limitation: they require the authenticated user to have admin permissions on the repository (as stated in the documentation: "Only users with admin permission for the repository may access this resource").
Our integration needs to allow non-admin users to:
The deprecated endpoints were perfect for this because they:
GET /repositories?role=member)
Thank you
Hi Roman,
To answer your questions:
1. We currently don't have any information regarding a planned replacement for these endpoints or a concrete date for their full deprecation, unfortunately. I can confirm that all of these still function at this stage, and that any deprecation will have an appropriate notice period prior to implementation.
2. Refer to question 1.
3. Refer to question 1.
4. If you wish to check user-scoped access, this is technically possible without admin access using the new endpoint (it just requires extra queries) by using the role filter.
For a given workspace and repo_slug:
Check if the repo appears under:
GET /2.0/repositories/{workspace}?role=adminIf yes → user is admin on that repo.
Else, check:
GET /2.0/repositories/{workspace}?role=contributorIf yes → user has write (but not admin).
Else, check:
GET /2.0/repositories/{workspace}?role=memberIf yes → user has at least read access.
This is a workaround alternative using the new endpoint as an alternative to a replacement (which does not yet exist). Combining those 3 calls together will give a list of repositories in a workspace where it can be inferred if the current scoped user is an admin, has write, or read access.
I hope this helps somewhat, please let me know if I can be of any further assistance :)
Cheers!
- Ben (Bitbucket Cloud Support)
Hi Ben,
Thank you for your response. However, I'm still confused because the official changelog for CHANGE-2770 states:
Sunset date: February 27, 2026
"Bitbucket will be introducing replacements for each of these endpoints"
This seems to indicate that:
Could you please clarify:
Regarding the workaround you suggested using role filters on /repositories/{workspace} - this would require us to make 3 API calls per workspace just to determine access, and we'd need to know all workspaces upfront. The deprecated endpoints solved this by returning all accessible repositories across all workspaces in a single call. Is there a more efficient approach that doesn't require multiple calls per workspace?
Thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My apologies. Yes, the plan is still to replace those endpoints on that date. I have confirmed with the engineering team responsible that a replacement for these will definitely be released before the deprecation date.
Unfortunately, there is not a more efficient approach for this at this stage that I am aware of. This is because our API's are being scoped for single workspaces. I would suggest using the existing API calls in the interim, and waiting for the replacement endpoints to determine their effectiveness. If they do not solve your use case, we can raise feature request tickets with our developers if improvements are needed prior to the deprecation date.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Thank you for confirming. Apologies for being pedantic but I'm still a bit concerned about the timeline. Could you please clarify:
I'm concerned that if replacements are announced close to the sunset date, we won't have sufficient time to update our integration and test thoroughly before the existing endpoints are removed.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not a problem; it's understandable, considering how significant these endpoints are in the context of your use case. I did receive confirmation directly from the engineering team yesterday that a replacement would be released prior to the deprecation date for this reason, as these endpoints are widely used by our customers.
Today, it has been shared with me that the replacement release will be happening this month (we don't have an exact date but this is expected to be sometime next week).
Please rest assured that we would not deprecate such a major endpoint without a suitable replacement in its place or a transition time to move to this new endpoint.
Please let me know if I can provide further clarification on anything else.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
I see that two new API endpoints have been released, but there doesn't seem to be a replacement for the GET /repositories endpoint.
I understand that support for cross-workspace APIs has ended, but I'm wondering if there's an API endpoint that can tell me which repositories a user is a collaborator on (i.e., they have direct access to the repository but not the workspace itself)?
Previously, the repositories endpoint helped us make this distinction. We need this information to determine which workspaces contain repositories the user collaborates on.
Thanks again for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.