Generate View Aggregation Data

Hand off to an LLM

Generate aggregation results for a view.

Executes each aggregation declared on the view against the transformations rows produced by the named functions inside the supplied timeWindow, applying the view's filters. Supported aggregation functions: count, count_distinct, sum, average, min, max. Grouped aggregations return up to 200 groups per aggregation; non-grouped aggregations return a single group with an empty groupName.

As with table-data, the functions field is required.

POST
/v3/views/aggregation-data
x-api-key<token>

Authenticate using API Key in request header

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.bem.ai/v3/views/aggregation-data" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "columns": [      {        "name": "string",        "valueSchemaPath": [          "string"        ],        "displayOrderIndex": 0      }    ],    "filters": [      {        "columnName": "string",        "filterType": "equals_string"      }    ],    "aggregations": [      {        "name": "string",        "function": "count"      }    ],    "functions": [      {}    ],    "timeWindow": {      "start": "2019-08-24T14:15:22Z",      "end": "2019-08-24T14:15:22Z"    }  }'
{
  "aggregations": [
    {
      "name": "string",
      "groups": [
        {
          "groupName": "string",
          "value": 0.1
        }
      ]
    }
  ]
}
{
  "message": "string",
  "code": 0,
  "details": {}
}