Hi. When i call search code API using next url:
https://api.bitbucket.org/2.0/workspaces/SomeUsername/search/code?search_query=%22find-this%22
I get response with error:
{"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"}}
As suggested in error message I navigate to https://bitbucket.org/search to turn on search. But error still persists when using api from url above.
Hi and welcome to the community!
Are you trying to search via API on your own workspace?
The ID was visible in the URL you posted here because it was only changed in the display text (I have just edited).
For the part SomeUsername it looks like you were using your workspace's name instead of the workspace's ID. If you meant to search your own workspace, you will need to use its ID instead (and not the name).
You can find the ID on your browser's address bar if you open this workspace on your browser
https://bitbucket.org/workspace-id/workspace/overview/
You can also see it in the Workspace settings (from the cog menu on the top right corner, when you have opened this workspace's page on Bitbucket's website).
Could you give it a try and let me know if this works?
Kind regards,
Theodora
Yes @Theodora Boudale , you are right. Now I figured that im using workspace name instead id, that was problem. Thanks for help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.