Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
Request to have user code search endpoint return results even if one of the workspaces does not have code search enabled.
The following user code search api command is for a user who is part of two workspaces. One workspace has code search enabled and one workspace does not have code search enabled.
curl -u xxxxxx:xxxxxxx "https://api.bitbucket.org/2.0/users/USERNAME/search/code?search_query=database" {"type": "error", "error": {"message": "Search is not enabled for the requested account", "detail": "Navigate to https://bitbucket.org/search to turn it on", "data": {"key": "SEARCH_NOT_ENABLED"}}, "data": {"key": "SEARCH_NOT_ENABLED"}}
If the workspace code search API is used on the individual workspace, the results are returned as expected, however, a user would have to run this command against every workspace they have permission to.
It is desired that the user code search API would return the results that have enabled workspaces instead of always failing until all workspaces a user is a part of have code search enabled. This would then benefit users to use fewer API calls (then needing to user workspace code search endpoint) and in some use cases avoid rate limitations.