For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
      • POSTCreate document
      • DELDelete document
      • GETGet document
      • GETList documents
      • POSTSearch documents
      • PATCHUpdate document
  • Logs
  • Messaging
  • Phone Number Management
  • Platform
  • Resource Management
LogoLogoSignalWire Docs
Log inSign up
Support
DatasphereDocuments

Search documents

|View as Markdown|Open in Claude|
POST
https://{your_space_name}.signalwire.com/api/datasphere/documents/search
POST
/api/datasphere/documents/search
$curl -X POST https://{your_space_name}.signalwire.com/api/datasphere/documents/search \
> -H "Content-Type: application/json" \
> -u "<project_id>:<api_token>" \
> -d '{
> "query_string": "Most paid athlete"
>}'
1{
2 "chunks": [
3 {
4 "text": "Cristiano Ronaldo is the highest-paid football player in the world in 2024",
5 "document_id": "acaa5c49-be5e-4477-bce0-48f4b23b7720"
6 }
7 ]
8}

Search Datasphere Documents.

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.

Was this page helpful?
Previous

Update document

Next
Built with

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

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)