Grist Octri Preview
GET/docs/{docId}/download/table-schema

Get a table's schema

Retrieves a table's schema in JSON format. Use tableId to identify the table, and set header to choose whether headers use column IDs or human-readable labels.

3 parameters
docIdstringrequired
The document's UUID.
tableIdstringrequired
The normalized name of the table whose schema to retrieve.
headerstringoptional
The header format: `colId` for normalized column IDs or `label` for more human-friendly labels.
Allowed:colIdlabel

1 status code
200Returns a JSON table-schema object containing the required `name`, `title`, and `schema` fields, along with CSV dialect and format metadata.
dialectstringoptional
The CSV dialect descriptor.
encodingstringoptional
Allowed:utf-8
formatstringoptional
Allowed:csv
mediatypestringoptional
Allowed:text/csv
namestringrequired
The ID (technical name) of the table
pathstringoptional
The URL to download the CSV
schemastringrequired
A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.
titlestringrequired
The human readable name of the table

Error handling

The docId path parameter must be a UUID, and the tableId query parameter must name a table using its normalized name. The header query parameter must be colId or label when supplied.