TypeScript
import { Orchata } from '@orchata/sdk'; const client = new Orchata({ apiKey: 'oai_your_api_key' }); const { document } = await client.documents.get('doc_123', 'space_123');
{ "document": { "id": "<string>", "orgId": "<string>", "spaceId": "<string>", "filename": "<string>", "mimeType": "<string>", "fileSize": "<string>", "storageUrl": "<string>", "status": "<string>", "errorMessage": "<string>", "embeddingModel": "<string>", "metadata": "<string>", "createdAt": "2023-12-25", "updatedAt": "2023-12-25" } }
Retrieve a single document by ID
"document_123"
The ID of the space containing the documents
"space_123"
Successfully retrieved document
Show child attributes