Getting Started
API Reference
- GETPing Health
- GETGet Available Models
- POSTRetrieve Chunks
- POSTRetrieve Chunks Grouped
- POSTRetrieve Documents
- POSTBatch Get Documents
- POSTBatch Get Chunks
- POSTQuery Completion
- GETGet Chat History
- GETGet Available Models For Selection
- POSTAgent Query
- GETGet Usage Stats
- GETGet Recent Usage
- POSTGenerate Local Uri
- POSTGenerate Cloud Uri
- DELDelete Cloud App
- GETList Chat Conversations
- PATCHUpdate Chat Title
Documents
Folders
Workflows
model-config
Logs
Graph
Documents
Get Document
Retrieve a single document by its external identifier.
Args: document_id: External ID of the document to fetch. auth: Authentication context used to verify access rights.
Returns:
The :class:Document
metadata if found.
GET
/
documents
/
{document_id}
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const document = await client.documents.retrieve('document_id');
console.log(document.app_id);
Copy
Ask AI
{
"external_id": "<string>",
"content_type": "<string>",
"filename": "<string>",
"metadata": {},
"storage_info": {},
"storage_files": [
{
"bucket": "<string>",
"key": "<string>",
"version": 1,
"filename": "<string>",
"content_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"system_metadata": {},
"additional_metadata": {},
"chunk_ids": [
"<string>"
],
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Headers
Path Parameters
Response
200
application/json
Successful Response
Represents a document stored in the database documents collection
Was this page helpful?
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const document = await client.documents.retrieve('document_id');
console.log(document.app_id);
Copy
Ask AI
{
"external_id": "<string>",
"content_type": "<string>",
"filename": "<string>",
"metadata": {},
"storage_info": {},
"storage_files": [
{
"bucket": "<string>",
"key": "<string>",
"version": 1,
"filename": "<string>",
"content_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"system_metadata": {},
"additional_metadata": {},
"chunk_ids": [
"<string>"
],
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.