Create a Tulip Table
  • 01 Oct 2024
  • 3 Minutes to read
  • Contributors

Create a Tulip Table


Article summary

Post
/tables

Creates a new Tulip Table.

Requires the tables:write API key scope.

Security
HTTP
Type basic

A Tulip API key is required to use the Tulip API. API key authentication uses HTTP Basic Authentication as defined by RFC 7617. HTTP Basic Authentication uses a generic username/password scheme to authenticate. For Tulip API requests, the password should be the API key's associated secret. The username should have the format {type}.{version}_{id}, where {type} is the API key type, {version} is the type's version number, and {id} is the id of the key. Tulip API keys currently are one of two types:

  • apikey.2 - user API keys provisioned by creating a Tulip API Token. The key id is the token id.
  • onetime.1 - temporary API keys provisioned using the /auth/temporary endpoint or using the One-Time API Key page. These keys are only valid for 30 seconds after provisioning.

Once you have determined the username and password you need to use, the Authorization header should be set to the value Basic {credentials}, where {credentials} is the base64-encoded value of the string {username}:{password}. See RFC 7617 for more details of this encoding.

Body parameters

The spec for creating a Tulip Table.

Expand All
object
label
string Required

The display label for the Table.

Min length1
Max length255
description
string Required

A long-form description for the Table.

columns
Array of object
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. The name id is reserved and cannot be specified when creating a Tulip Table.

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

The display label for the column.

Min length1
Max length255
description
string Required

A long-form description for the 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.

unique
boolean Required

Whether the values in the column must be unique. This property must always be false for columns except id.

Valid values[ "False" ]
Responses
201

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

Headers
Location
stringRequired
A relative URL at which the details of the created Table can be fetched.
Expand All
object
Example{ "id": "gthSX9t3tY2cJfBWe", "label": "Bike", "description": "A Bicycle", "createdAt": "2019-01-15T05:30:01Z", "createdBy": "N24uug8iXSTWR39rB", "updatedAt": "2019-01-15T05:31:20Z", "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
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
createdAt
string (date-time)
createdBy
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
updatedAt
string (date-time)
updatedBy
string
Pattern^[a-zA-Z0-9_]+$
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
errorCode
Valid values[ "AuthenticationRequired" ]
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
errorCode
Valid values[ "AuthenticationFailed" ]
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

Was this article helpful?