Global search programatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 10:08 AM - edited 08-07-2023 10:11 AM
Hi!
At the workspace header, there is a search box that allow us to look for a text in all notebooks in the workspace.
Is there a way via CLI or API to call the global search https://<workspace-domain>/graphql/SearchGql so the result can be analysed automaticaly with a script? I couldn`t find a way in the documentation.
Right now I'm having to download all notebooks (API) to execute the search locally. The download itself takes too long (several hours) for there are thousands of notebooks across multiple workspaces. Even if i multithread, there's a limit of 30 requests per second. I also have to account for unsupported file formats and path size limitations.
So it would be best to use Databicks indexing to make this faster.
The request itself uses cookies to get the session ID and authenticate (I think) and I don't know how to reproduce it, say, in postman.
Is there a way to use a user token instead?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 09:48 PM
We do not have an API for searching workspace objects as of now. We already have an internal ticket for this request but we don't have an ETA for preview yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 06:23 AM
if you checked in the notebooks into a git repo, the search in the git repo (or API) might save you.