Skip to main content
POST
Create grid table

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string
required

Name for the new table, shown across Summation.

Required string length: 1 - 255
kind
enum<string>
default:calc

What kind of table to create. calc (the default) builds a calculation table from a SELECT query. data builds an empty appendable data table from a column schema, ready for row appends. Omit for the calculation behavior.

Available options:
calc,
data
query
string | null

SELECT query that defines the calculation table's columns and rows (e.g. SELECT 1 as new_total). Required for kind=calc; not allowed for kind=data.

Minimum string length: 1
columns
GridTableColumnRequest · object[]

Columns of the new data table, in order. Required for kind=data; not allowed for kind=calc. An integer s_id primary key and a _sm_created_at timestamp are added automatically and must not be listed here.

Maximum array length: 50
key_columns
string[]

Optional business-key columns, used to match rows on upsert (PUT /v1/tables/{table_id}/rows). Names must appear in columns. This is not the physical primary key, which is always the automatic s_id.

Maximum array length: 50

Response

Successful Response