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

getChunk

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

list

Next
Built with

Retrieve a specific chunk from a document.

Path parameters

documentIdstringRequiredformat: "uuid"
Unique ID of the parent Document.
chunkIdstringRequiredformat: "uuid"
Unique ID of a Chunk.

Response

idstringRequiredformat: "uuid"
Unique ID of the chunk.
datasphere_document_idstringRequiredformat: "uuid"
Unique ID of the chunk's datasphere document.
project_idstringRequiredformat: "uuid"
Unique ID of the project.
statusenumRequired
Status of the chunk.
Allowed values:
tagslist of stringsRequired
The tags of the document associated with the chunk.
contentstringRequired
Content of the chunk.
created_atdatetimeRequired
Chunk Creation Date.
updated_atdatetimeRequired
Chunk Update Date.

Response Example

Response
1{
2 "id": "acaa5c49-be5e-4477-bce0-48f4b23b7720",
3 "datasphere_document_id": "acaa5c49-be5e-4477-bce0-48f4b23b7720",
4 "project_id": "d369a402-7b43-4512-8735-9d5e1f387814",
5 "status": "completed",
6 "tags": [
7 "sports",
8 "football",
9 "game"
10 ],
11 "content": "This is the content from the original document that was chunked.",
12 "created_at": "2024-05-06T12:20-12Z",
13 "updated_at": "2024-05-06T12:20-12Z"
14}

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