Get All Data
Retrieve all processed data for a model or deployment in a simplified, flattened format.
/api/v1/deployments/{deploymentId}/all-dataRetrieve all processed data for a model or deployment in a simplified, flattened JSON format. Data is organized by filename with normalized column names, making it ideal for bulk export, analytics, and integration with external systems.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The model or deployment, returned when listing a project's deployments. |
include | string | query | No | Comma-separated list of optional enrichments. The allowed value is metadata. |
Request
const response = await fetch(
`https://app.limai.io/api/v1/deployments/${deploymentId}/all-data?include=metadata`,
{
headers: { "Authorization": `Bearer ${API_TOKEN}` }
}
)
const allData = await response.json()
for (const [filename, fileData] of Object.entries(allData)) {
const records = Array.isArray(fileData) ? fileData : [fileData]
for (const record of records) {
console.log(filename, record)
}
}Response
Data is organized by filename. Single-row documents return an object; multi-row documents return an array. Nested tables appear as direct properties.
Multi-Row Example
{
"invoice_001.pdf": [
{
"invoice_number": "INV-001",
"total_amount": "1000.00",
"line_items": [
{
"item_description": "Software License",
"quantity": "1",
"unit_price": "800.00"
}
]
},
{
"invoice_number": "INV-002",
"total_amount": "500.00"
}
],
"invoice_002.pdf": {
"invoice_number": "INV-003",
"total_amount": "750.00"
}
}Empty Response
Returns an empty object {} when no data exists for the model or deployment.
Metadata
include=metadata adds a reserved _meta key to every top-level row object — the object returned for a single-row file, and each array element for a multi-row file. Rows of nested tables carry no _meta.
{
"invoice_001.pdf": [
{
"invoice_number": "INV-001",
"total_amount": "1000.00",
"_meta": {
"documentId": "cmm3k1q9x0001",
"fileName": "invoice_001.pdf",
"submittedAt": "2026-09-01T10:12:33.000Z",
"submittedBy": {
"id": "usr_8a2f",
"name": "Jane Doe",
"email": "jane@acme.com"
},
"extractedAt": "2026-09-01T10:14:02.000Z"
}
},
{
"invoice_number": "INV-002",
"total_amount": "500.00",
"_meta": {
"documentId": "cmm3k1q9x0001",
"fileName": "invoice_001.pdf",
"submittedAt": "2026-09-01T10:12:33.000Z",
"submittedBy": {
"id": "usr_8a2f",
"name": "Jane Doe",
"email": "jane@acme.com"
},
"extractedAt": "2026-09-01T10:14:02.000Z"
}
}
],
"broker-quote-2026-09.pdf": {
"broker": "Acme Brokerage",
"premium": "2400.00",
"_meta": {
"documentId": "cmm3k7r2v0007",
"fileName": "broker-quote-2026-09.pdf",
"submittedAt": "2026-09-02T08:41:10.000Z",
"submittedBy": null,
"extractedAt": null
}
}
}Fields of _meta:
| Field | Description |
|---|---|
documentId | The file's ID. |
fileName | The uploaded file name. |
submittedAt | When the file was uploaded, shown as "Date Added" in the grid. |
submittedBy | The user who uploaded the document, as { id, name, email }. null when the uploader is unknown. |
extractedAt | When the latest extraction run completed. null when no run has completed. |
_meta never collides with a schema column: column keys are normalized with leading underscores stripped, so no column can produce a key beginning with an underscore.
An unrecognized include value returns a 400:
{
"error": "Invalid include option. Allowed values: metadata"
}Backwards compatibility
Without include, the response shape is exactly the one documented under Response.
Column Name Normalization
All column and table names are automatically normalized in the response:
- Convert to lowercase
- Replace spaces and slashes with underscores
- Remove special characters (keep letters, numbers, underscores)
- Collapse multiple underscores into one
- Remove leading/trailing underscores
| Original Name | Normalized |
|---|---|
Invoice Number | invoice_number |
Total Amount ($) | total_amount |
Client's Email | clients_email |
Date/Time | date_time |
If multiple columns normalize to the same name, the API returns a 400 error with details about the conflicting columns. Rename one column in the platform to resolve the conflict.