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
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
        • create
        • delete
        • deleteChunk
        • get
        • getChunk
        • list
        • listChunks
        • search
        • update
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientDatasphere

search

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

update

Next
Built with

Perform a semantic search across all documents in the Datasphere.

Request

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

chunkslist of objectsRequired
A list of search result chunks.

Response Example

Response
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}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const results = await client.datasphere.documents.search({
10 query_string: "How do I reset my password?",
11 count: 5,
12});
13for (const chunk of results.data ?? []) {
14 console.log(chunk.text, "score:", chunk.score);
15}