> ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # List aggregations of a Tulip Table > Lists the aggregations for a Tulip Table. The optional `field` and `fn` query parameters filter the results. When both are supplied they are combined with AND: only aggregations matching the given field *and* using the given function are returned. Omitting a parameter (or passing it empty) leaves that dimension unfiltered. Requires the `table-queries:read` API key scope. ## OpenAPI ````json GET /tables/{tableId}/aggregations { "openapi": "3.0.3", "info": { "title": "Tulip API", "description": "The Tulip API gives you programmatic access to your Tulip data.\n\n### Query Parameters\n\nSome Tulip API endpoints take parameters specified in the [URL query](https://en.wikipedia.org/wiki/Query_string). In the Tulip API, the URL query is expected to be a list of key-value pairs, with pairs separated by `&`, keys and values separated by `=`, and keys and values being [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding). Keys are parsed as strings, values *must* be present for each key, and values are parsed as JSON. Simple string values may be specified as-is instead of being JSON-encoded. A query parameter may be specified multiple times, but only the final value will be used. Examples (shown without percent encoding for readability):\n\n * `a=1&b=true&c=\"hello\"` would parse a parameter `a` as the number 1, `b` as the boolean `true`, and `c` as the string `hello`\n * `a=foo&b=\"foo\"` would parse a parameter `a` as the string `foo` and `b` as the string `foo`\n * `data={\"points\":[{\"x\":3,\"y\":4},{\"x\":2,\"y\":-9}]}` would parse a parameter `data` as an object with a single field `points` containing an array with two elements: an object with `x` as the number 3 and `y` as the number 4, and an object with `x` as the number 2 and `y` as the number -9\n * `a=foo&a=bar` would parse a parameter `a` as the string `bar`\n", "termsOfService": "https://tulip.co/tos/", "contact": { "name": "Tulip Interfaces", "url": "https://tulip.co/contact-us/", "email": "sales@tulip.co" }, "version": "3.0" }, "servers": [ { "url": "http://localhost:8088/api/v3", "description": "Cypress Tulip API Server" } ], "paths": { "/tables/{tableId}/aggregations": { "parameters": [ { "$ref": "#/components/parameters/tableId" } ], "get": { "summary": "List aggregations of a Tulip Table", "description": "Lists the aggregations for a Tulip Table.\n\nThe optional `field` and `fn` query parameters filter the results. When both are\nsupplied they are combined with AND: only aggregations matching the given field\n*and* using the given function are returned. Omitting a parameter (or passing it\nempty) leaves that dimension unfiltered.\n\nRequires the `table-queries:read` API key scope.\n", "operationId": "listTableAggregations", "x-tulip-visibility": "public", "tags": [ "Tulip Tables" ], "parameters": [ { "name": "field", "in": "query", "required": false, "description": "Optionally filter the results to aggregations on the given Table field.\n", "schema": { "type": "string", "example": "abcde_example_field" } }, { "name": "fn", "in": "query", "required": false, "description": "Optionally filter the results to aggregations using the given aggregation function.\n", "schema": { "type": "string", "example": "sum" } } ], "security": [ { "apiKey": [ "table-queries:read" ] } ], "responses": { "200": { "description": "The list of Tulip Table aggregations was retrieved successfully.\n", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TulipTableAggregation" } } } } }, "400": { "$ref": "#/components/responses/badRequestError" }, "401": { "$ref": "#/components/responses/authenticationRequiredError" }, "403": { "$ref": "#/components/responses/authenticationFailedError" }, "404": { "$ref": "#/components/responses/notFoundError" }, "422": { "$ref": "#/components/responses/badRequestError" }, "500": { "$ref": "#/components/responses/internalServerError" } } } } }, "components": { "parameters": { "tableId": { "name": "tableId", "description": "The id of a Tulip Table.\n", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ObjectId" } } }, "schemas": { "TulipTableAggregation": { "x-tulip-visibility": "public", "description": "A table aggregation for a Tulip Table.\n", "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" }, "allOf": [ { "$ref": "#/components/schemas/CRUDModel" }, { "type": "object", "properties": { "tableId": { "description": "The table that this aggregation belongs to.\n", "type": "string" }, "label": { "description": "The name of this aggregation.\n", "type": "string" }, "fn": { "description": "The function used in this aggregation.\n", "type": "string" }, "field": { "description": "The table column that this aggregation runs on.\n", "type": "string" } }, "required": [ "tableId", "label", "fn", "field" ] } ] }, "ObjectId": { "$ref": "#/components/schemas/RandomId" }, "CRUDModel": { "x-tulip-visibility": "public", "type": "object", "properties": { "id": { "allOf": [ { "$ref": "#/components/schemas/ObjectId" }, { "description": "The unique identifier of this object.\n" } ] }, "createdAt": { "allOf": [ { "$ref": "#/components/schemas/DateTime" }, { "description": "The time this object was created.\n" } ] }, "createdBy": { "allOf": [ { "$ref": "#/components/schemas/ObjectId" }, { "description": "The id of the user who created this model.\n" } ] }, "updatedAt": { "allOf": [ { "$ref": "#/components/schemas/DateTime" }, { "description": "The time this object was last updated.\n" } ] }, "updatedBy": { "allOf": [ { "$ref": "#/components/schemas/ObjectId" }, { "description": "The id of the user who last updated this model.\n" } ] } }, "required": [ "id" ] }, "ApiError": { "x-tulip-visibility": "public", "type": "object", "properties": { "errorCode": { "type": "string" }, "errorUniqueID": { "$ref": "#/components/schemas/RandomSecret" }, "details": { "type": "string" } }, "required": [ "errorCode", "details" ] }, "RandomId": { "x-tulip-visibility": "public", "example": "g56RCoZCtzv7borvp", "type": "string", "pattern": "^[a-zA-Z0-9_]+$" }, "DateTime": { "x-tulip-visibility": "public", "description": "A date-time string as defined by [RFC 3339 ยง5.6](https://tools.ietf.org/html/rfc3339#section-5.6).\n", "type": "string", "format": "date-time" }, "RandomSecret": { "x-tulip-visibility": "public", "example": "aq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y", "type": "string", "pattern": "^[a-zA-Z0-9+/]+$" } }, "responses": { "badRequestError": { "description": "The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "authenticationRequiredError": { "description": "The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.\n", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "properties": { "errorCode": { "enum": [ "AuthenticationRequired" ] } } } ] } } } }, "authenticationFailedError": { "description": "The provided authentication info was rejected. The response will provide additional details.\n", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "properties": { "errorCode": { "enum": [ "AuthenticationFailed" ] } } } ] } } } }, "notFoundError": { "description": "The requested database entry was not found.\n", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "properties": { "errorCode": { "enum": [ "NoSuchDatabaseEntry" ] } } } ] } } } }, "internalServerError": { "description": "The server encountered an unexpected error.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } }, "securitySchemes": { "apiKey": { "type": "http", "scheme": "basic", "description": "Access to the Tulip API requires the use of [HTTP Basic Authentication](https://datatracker.ietf.org/doc/html/rfc7617) using the credentials of an active [Tulip API Token](https://support.tulip.co/docs/set-up-a-tulip-api). All requests require the `Authorization` HTTP header with the `Basic` scheme to provide API credentials unless otherwise noted.\n\nAPI 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.\n" } } } } ````