import { AggregateEventsRequest } from "@vercel/sdk/models/aggregateeventsop.js";
let value: AggregateEventsRequest = {
projectId: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA",
by: [
"day",
"eventName",
],
since: "2024-09-01T00:00:00.000Z",
until: "2024-09-08T00:00:00.000Z",
limit: 3,
filter: "eventData/plan eq 'pro'",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
};| Field | Type | Required | Description | Example |
|---|---|---|---|---|
projectId |
string | ✔️ | The project identifier or the project name | prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA |
by |
models.QueryParamBy[] | ✔️ | Up to two dimensions used to break down results. At most one time granularity is allowed: hour, day, week, month, year. Other dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, eventName. JSON dimensions: flags, eventData. Used bare, they break down results by key, for example flags returns one group per flag name. With a key, they break down results by that key's value, for example eventData/plan. Wrap keys containing characters other than letters, digits, and underscores in single quotes, for example flags/'my-flag'. |
[ "day", "eventName" ] |
since |
models.QueryParamSince | ✔️ | Timestamp in milliseconds, or a valid Date string. Selects data from (including) this date and time. Will be adjusted according to the desired time granularity. |
2024-09-01T00:00:00.000Z |
until |
models.QueryParamUntil | ✔️ | Timestamp in milliseconds, or a valid Date string. Selects data until (including) this date. Will be adjusted according to the desired time granularity. |
2024-09-08T00:00:00.000Z |
limit |
number | ➖ | Number of distinct results, default to 10. Other results are grouped into "Others" group. | 3 |
filter |
string | ➖ | OData-compliant filter. Encode the value when sending it in a URL. Allows filtering on one or multiple dimensions. By default, filters for production environment only. Supported dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, eventName. JSON dimensions filtered by key: flags/, eventData/, for example eventData/plan eq 'pro'. Wrap keys containing characters other than letters, digits, and underscores in single quotes, for example flags/'my-flag' eq 'true'. Supported operations include eq, ne, in, and logical operators and, or, not with parentheses. Functions such as startswith are supported by the OData parser. |
eventData/plan eq 'pro' |
teamId |
string | ➖ | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l |
slug |
string | ➖ | The Team slug to perform the request on behalf of. | my-team-url-slug |