- Print
Run an aggregate function (e.g. average, mode) on a table's field.
Requires tables:read
API scope.
Attempting to run a numeric aggregate function e.g. sum on a non-numeric field type will generate a 422 error response. Mode is the only non-numeric function.
The id of a Tulip Table.
The field to aggregate on. An invalid field name for the specified table will result in a 404 error.
Aggregate function names are case insentitive. An invalid function type will result in a 400 error.
The maximum number of table records to evaluate.
Sort records to determine which are used in the aggregation. Sort priority is determined by the order or options, i.e. sort by the first option, them by the second, etc. If ommitted, there is no guarantee as to which records are selected. A sortBy value that is not one of the table's field will generate a 422 error. Options for sortDir are "asc" and "desc".
Example: [{"sortBy": "superAwesomeField", "sortDir": "asc"}, {"sortBy": "lessAwesomeField", "sortDir": "desc"}]
An optional array of filter expressions to filter the Table records by. Each filter is an object specifying the field
(name of a table column), functionType
(comparison function), and arg
(the value to compare to).
The field may be the name of a table column (including id
) or one of these special values:
_createdAt
_updatedAt
The valid function types are:
equal
notEqual
blank
notBlank
greaterThanOrEqual
lessThanOrEqual
greaterThan
lessThan
contains
notContains
startsWith
notStartsWith
endsWith
notEndsWith
isIn
The function argument is not required for blank
and notBlank
.
How the filters in the filter
parameter are combined. all
means that every filter must match a record in order for the record to be included. any
means at least one filter must match a record in order for the record to be included.
The count of Tulip Table records was retrieved successfully.
The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.
The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.
The provided authentication info was rejected. The response will provide additional details.
The requested database entry was not found.
The request was syntactically sound, but could not be processed due to a logical problem.
The server encountered an unexpected error.