Skip to main content
POST
Add an input column to a query

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

documentId
string
required

Published document identifier.

Example:

"abc123"

draftId
string
required

The draft workbook identifier to add the input column to.

Example:

"def456"

queryKey
string
required

Record key of the query, as it appears in queryPresentations.data.

Pattern: ^[1-9][0-9]*$
Example:

"1"

Body

application/json
columnName
string
required

The column's name. Lowercase letters, digits, and underscores; anything else is converted. Its values live in the view input_<columnName>.

Required string length: 1 - 60
Pattern: [a-zA-Z0-9]
Example:

"review_status"

dataType
enum<string>
required

The type of value each cell holds.

Available options:
text,
number,
boolean
editMode
enum<string>

How values can be edited once the document is published.

  • draft - Column values can only be edited when in a draft
  • published - Column values can only be edited when viewing the published document.

Defaults to published on an app draft, draft otherwise.

Available options:
draft,
published
keyColumnFieldNames
string[]

Fully-qualified field names that identify a row, taken from the query.

The fully-qualified names (view.field) of fields that uniquely identify a row, taken from the query. If set, every row must have a value for each key column.

Omit to use the primary key of the views used in the query. Access filters on the query's topic are always added, if applicable.

Minimum string length: 1
Example:
auditMetadata
boolean
default:false

Whether to track who last edited each value and when, in two extra columns written to the warehouse.

Response

The column was created and added to the tile's query. The response names the field the tile and an app use for it.

columnName
string
required

The column's name as stored.

Example:

"review_status"

dataType
enum<string>
required
Available options:
text,
number,
boolean
draftIdentifier
string
required

Identifier of the draft the column was added to.

editMode
enum<string>
required
Available options:
draft,
published
fieldName
string
required

The fully-qualified field of the column in the query, input_<columnName>.<columnName>.

Example:

"input_review_status.review_status"

identifier
string
required

Published document identifier.

keyColumnFieldNames
string[]
required

The fully-qualified fields the values are keyed on, including any access filter the server added.

Example:
viewName
string
required

The view the column's values live in.

Example:

"input_review_status"