Skip to navigation

Search documents

View as MarkdownOpen in Claude

Finds passages in the project’s Datasphere knowledge store that are semantically relevant to a query. Use the results as grounded context for an AI application; use List documents to browse the source documents instead.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: DataSphere.

Learn more about API scopes.

Authentication

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Request

This endpoint expects an object.
query_stringstringRequired
Search term.
tagslist of stringsOptional
Document tags.
document_idstringOptionalformat: "uuid"
Unique ID of a Document.
distancedoubleOptional0-78.3836717690617
Specifies how closely related the query is to the document. Low distance means high relevance and similarity. High distance means low relevance and similarity.
countintegerOptional>=1Defaults to 5
Specifies number of returned Chunks.
languagestringOptionalDefaults to en
Language of the Document.
pos_to_expandlist of stringsOptionalDefaults to ["NOUN","VERB","ADJ","ADV"]
Part of Speech considered for expansion or analysis.
max_synonymsintegerOptional>=1Defaults to 10
Maximum number of synonyms to consider.

Response

The request has succeeded.
chunkslist of objects
A list of search result chunks.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error