VayuDocumentationIntegrationsAPI ReferenceChange Log
SupportGet started now
Api referenceEndpointsEvents

Aggregate events (v2)

Aggregate events by meters and time grouping via the events-service.

POST
/v2/events/aggregation

Authorization

BearerAuthorizer
AuthorizationBearer <token>

In: header

Request Body

application/json

Configuration for aggregating events by meters and time grouping.

TypeScript Definitions

Use the request body type in TypeScript.

customerId*string
customerIdPattern?string
period*
meters*array<>
groupBy*string
fillDates?boolean

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v2/events/aggregation" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string",    "period": {      "startTime": "string",      "endTime": "string"    },    "meters": [      {        "key": "string",        "eventName": "string"      }    ],    "groupBy": "event"  }'
{  "dataPoints": [    {      "group": "string",      "values": {        "property1": 0,        "property2": 0      }    }  ],  "period": {    "startTime": "string",    "endTime": "string"  },  "groupBy": "event"}
{  "type": "invalid_request_error",  "code": "string",  "message": "string",  "param": "string",  "params": [    {      "param": "string",      "message": "string"    }  ]}
{  "type": "authentication_error",  "code": "authentication_failed",  "message": "string"}
{  "type": "rate_limit_error",  "code": "rate_limit_exceeded",  "message": "string"}
{  "type": "api_error",  "code": "internal_error",  "message": "string"}