List Documents
GET
/workspaces/{slug}/schemas/{schemaKey}/documents Returns documents scoped by schema and environment.
Path Parameters
slug string required schemaKey string required Query Parameters
env "production" | "staging" | "development" Environment slug. Defaults to production.
page integer pageSize integer curl -X GET \
-H "x-api-key: dsk_your_api_key" \
https://api.tracore.io/workspaces/my-workspace/schemas/invoice/documents?env=production import { TracoreClient } from '@tracore/sdk';
const client = new TracoreClient({ apiKey: 'dsk_your_api_key' });
const { data, total } = await client.documents.list('my-workspace', 'invoice');
console.log(data); 200 Response
{
"total": 1,
"page": 1,
"pageSize": 20,
"data": [
{
"id": "ws_abc123",
"name": "My Workspace",
"content": "Invoice #1234...",
"mimeType": "application/pdf",
"fileSize": 102400,
"originalFilename": "invoice-2024.pdf",
"status": "received",
"extractedData": {
"key": "value"
},
"createdAt": "2024-03-15T10:30:00Z",
"updatedAt": "2024-03-15T10:30:00Z"
}
]
}