Create a Tulip Table aggregation
  • 04 Mar 2025
  • 2 Minutes to read
  • Contributors

Create a Tulip Table aggregation


Article summary

Post
/tables/{tableId}/aggregations

Creates a new Tulip Table aggregation in the specified Table. 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 creating a new Tulip Table aggregation.

object
tableId
string Required
Exampleg56RCoZCtzv7borvp
field
string Required
Exampleumiyk_durability_test_duration
fn
string Required
Examplesum
label
string Required
ExampleTotal Durability Test Duration
Responses
200

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

object

A table aggregation for a Tulip Table.

Example{ "id": "aq21mSKC1rbO87TjC", "createdAt": "2019-02-08T20:16:31Z", "updatedAt": "2019-02-08T20:16:31Z", "tableId": "g56RCoZCtzv7borvp", "label": "Average Durability Test Duration", "fn": "sum", "field": "umiyk_durability_test_duration" }
id
Exampleg56RCoZCtzv7borvp
createdAt
createdBy
Exampleg56RCoZCtzv7borvp
updatedAt
updatedBy
Exampleg56RCoZCtzv7borvp
tableId
string

The table that this aggregation belongs to.

label
string

The name of this aggregation.

fn
string

The function used in this aggregation.

field
string

The table column that this aggregation runs on.

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

Was this article helpful?