Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23140

Request to have user code search endpoint return results even if one of the workspaces does not have code search enabled.

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            312cd631cf2e Jeffrey Neneman (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: