Update a Tulip Table

Prev Next
Put
/tables/{tableId}

Updates a Tulip Table's metadata and schema. If the update is successful, the Table's updatedAt will be set to the current time and updatedBy will be set to your user id.

Requires the tables:write API key scope.

Security
HTTP
Type basic

Access to the Tulip API requires the use of HTTP Basic Authentication using the credentials of an active Tulip API Token. All requests require the Authorization HTTP header with the Basic scheme to provide API credentials unless otherwise noted.

API tokens can be configured with a set of scopes which determine what parts of the API that specific token has access to. Security best practices dictate that API credentials be given the minimum set of capabilities required to fulfill their intended purpose. For example, an API token created for use in an integration that is only designed to use the Tables API should probably only be given the tables:read and tables:write scopes. In this way you can minimize risk in the event that API credentials are compromised. API endpoints will document what API token scopes are required to access that endpoint in their descriptions. If a request is made to an endpoint with an API token which does not have the required scopes, the response will be an authorization error.

Path parameters
tableId
stringRequired

The id of a Tulip Table.

Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
Body parameters

The spec for updating a Tulip Table. The spec must include all existing columns of the Table, including the id column. The data type of existing columns cannot be changed. If you wish to change a column's type, hide the existing column and make a new column with the desired type.

Expand All
object
label
string Required

The display label for this Table.

Min length1
Max length255
description
string Required

A long-form description for this Table.

deleted
boolean

Whether the Table should be hidden from the Tulip Tables UI. If not specified, the Table's deleted status is unchanged.

columns
Array of object

The updated columns of the Table. All existing columns must be mentioned, including the id column.

Max length100
object
name
string Required

The name of the column. Must start with a letter and contain only letters, numbers, and underscores. Must be unique to this Table.

Min length1
Max length50
Pattern^[a-zA-Z][a-zA-Z0-9_]+$
label
string Required

The display label for this column.

Min length1
Max length255
description
string Required

A long-form description for this column.

dataType
object (TypedObjectType) Required

The type of a value in Tulip.

type
string Required
Valid values[ "boolean", "string", "float", "integer", "interval", "timestamp", "imageUrl", "user", "color" ]
ExampleimageUrl
hidden
boolean Required

Whether the column should be hidden in the Tulip Tables UI. The id column cannot be hidden.

unique
boolean Required

Whether the values in the column must be unique. This property cannot be changed on existing columns.

Responses
200

The Tulip Table was updated successfully. The details of the updated Table are returned in the response.

Expand All
object
Example{ "id": "gthSX9t3tY2cJfBWe", "label": "Bike", "description": "A Bicycle", "createdAt": "2019-01-15T17:30:01.244Z", "createdBy": "N24uug8iXSTWR39rB", "updatedAt": "2019-01-15T17:31:20.002Z", "updatedBy": "N24uug8iXSTWR39rB", "columns": [ { "name": "id", "label": "ID", "description": "", "dataType": { "type": "string" }, "hidden": false, "unique": true }, { "name": "ahvbb_model_number", "label": "Model Number", "description": "", "dataType": { "type": "string" }, "hidden": false, "unique": false }, { "name": "auznd_color", "label": "Color", "description": "", "dataType": { "type": "string" }, "hidden": false, "unique": false }, { "name": "irrip_completed", "label": "Completed", "description": "", "dataType": { "type": "boolean" }, "hidden": false, "unique": false }, { "name": "umiyk_durability_test_duration", "label": "Durability Test Duration", "description": "", "dataType": { "type": "interval" }, "hidden": false, "unique": false } ] }
id
Exampleg56RCoZCtzv7borvp
createdAt
createdBy
Exampleg56RCoZCtzv7borvp
updatedAt
updatedBy
Exampleg56RCoZCtzv7borvp
deletedAt
string (date-time)
deletedBy
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
label
string

The display label for this Table.

description
string

A long-form description for this Table.

columns
Array of object (TulipTableColumn)
object
Example{ "name": "ahvbb_model_number", "label": "Model Number", "description": "", "dataType": { "type": "string" }, "hidden": false, "unique": false }
name
string

The internal id of this column.

Pattern^[a-zA-Z][a-zA-Z0-9_]*$
label
string

The display label for this column.

description
string

A long-form description for this column.

dataType
object (TypedObjectType)

The type of a value in Tulip.

type
string
Valid values[ "boolean", "string", "float", "integer", "interval", "timestamp", "imageUrl", "user", "color" ]
ExampleimageUrl
hidden
boolean

Whether this column is hidden from the UI or not.

unique
boolean

Whether values in this column are required to be unique or not.

400

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
401

The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
403

The provided authentication info was rejected. The response will provide additional details.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
404

The requested database entry was not found.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
422

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
500

The server encountered an unexpected error.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string