Counts the number of records in a Tulip Table, optionally filtered by the query parameters.
Will return an exact count for Tulip Tables that have had less than 50,000 records created, otherwise returns an approximate count.
Requires the tables:read API key scope.
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.
The id of a Tulip Table.
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). For example:
[
{"field": "field1", "functionType": "equal", "arg": "hello"},
{"field": "field2", "functionType": "notBlank"},
{"field": "field3", "functionType": "isIn", "arg": ["a", "b", "c"]}
]
The field may be the name of a table column (including id) or one of these special values:
_createdAt(datetime)_updatedAt(datetime)
Linked record columns (table links) cannot be used as filter fields.
The valid function types are:
| Functions | arg |
|---|---|
equal, notEqual |
Single value |
blank, notBlank |
None |
greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual |
Single value |
isIn, notIsIn |
JSON arrayfield may not be a datetime |
contains, notContains, startsWith, notStartsWith, endsWith, notEndsWith |
Single valuefield must be a text column |
Format by column type
The required format of arg depends on the field column's type:
| Column type | arg format |
Example |
|---|---|---|
text, id |
JSON string | "hello" |
| integer | JSON number1 | 123 |
| number | JSON number or decimal string "[-]xx[.yyy]" |
456.7 or "456.7" |
| boolean | JSON boolean or equivalent string | true or "true" |
| datetime | ISO 8601 string or Unix timestamp (integer seconds since epoch) | "2024-01-15T10:30:00Z" or 1736936400 |
| duration | JSON number (seconds) | 300 (for 5 minutes) |
| color | JSON object with integer fields r, g, b (0–255) and float field a (0–1) |
{"r": 255, "g": 128, "b": 0, "a": 1.0} |
| imageUrl, fileUrl | JSON string (the URL) | "https://example.com/photo.jpg" |
| user, machine, station | JSON string (resource ID) | "abc123xyz" |
1: For isIn and notIsIn only, the list may contain either JSON numbers or JSON strings: [1, "2"]. This is supported for historical reasons and backwards compatibility.
How the filters in the filters parameter are combined.
allmeans that every filter must match a record in order for the record to be included.anymeans at least one filter must match a record in order for the record to be included.
A limit for how many records should be returned in the response. If specified, at most the count will be this value. No default cannot be more than 50000. If there are more than 50000 records, an approximate count will be returned.
The index of the record to start at. This parameter is usually used for pagination.
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.
