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

get

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

getChunk

Next
Built with

Retrieve a specific document by ID.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of a Document.

Response

idstringRequiredformat: "uuid"
Unique ID of the Document.
filenamestringRequired
Name of the Document.
statusenumRequired
Status of the Document.
Allowed values:
tagslist of stringsRequired
Document tags.
chunking_strategyenumRequired
Strategy used to chunk the document.
Allowed values:
max_sentences_per_chunkinteger or nullRequired
Max Sentences per Chunk. Only present when chunking strategy is 'sentence', null otherwise.
split_newlinesboolean or nullRequired
Split on Newlines. Only present when chunking strategy is 'sentence', null otherwise.
overlap_sizeinteger or nullRequired
Overlap Size. Only present when chunking strategy is 'sliding', null otherwise.
chunk_sizeinteger or nullRequired
Chunk Size. Only present when chunking strategy is 'sliding', null otherwise.
number_of_chunksintegerRequired
Number of Chunks in the Document.
chunks_uristringRequired
URI path to the chunks for this document.
created_atdatetimeRequired
Document Creation Date.
updated_atdatetimeRequired
Document Update Date.

Response Example

Response
1{
2 "id": "acaa5c49-be5e-4477-bce0-48f4b23b7720",
3 "filename": "player_list.pdf",
4 "status": "in_progress",
5 "tags": [
6 "sports",
7 "football",
8 "game"
9 ],
10 "chunking_strategy": "sentence",
11 "max_sentences_per_chunk": 80,
12 "split_newlines": true,
13 "overlap_size": 10,
14 "chunk_size": 50,
15 "number_of_chunks": 2345,
16 "chunks_uri": "/api/rest/datasphere/documents/acaa5c49-be5e-4477-bce0-48f4b23b7720/chunks",
17 "created_at": "2024-05-06T12:20-12Z",
18 "updated_at": "2024-05-06T12:20-12Z"
19}

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 doc = await client.datasphere.documents.get("document-id");
10console.log(doc.name, doc.id);