Events & ExportEvent trend

Event trend

Event volume trend for the location. Provide an explicit start_date/end_date, or use days to derive a rolling window ending today. Day buckets are cut in UTC unless you pass tz.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/events/trend?location_id=example_string&start_date=2024-12-25&end_date=2024-12-25&days=14&tz=America%2FDenver" \
  -H "Content-Type: application/json" \
  -H "X-Location-Id: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": [
    {}
  ],
  "rows": 42
}
GET
/events/trend
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.
query
location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

query
start_datestring

Window start date (YYYY-MM-DD). Defaults to days before today.

Format: date
query
end_datestring

Window end date (YYYY-MM-DD).

Format: date
query
daysinteger

Rolling window size in days, used when start_date is omitted. Default 14, min 1, max 365.

Min: 1 • Max: 365
query
tzstring

IANA timezone the day buckets are cut in, e.g. America/Denver. Defaults to UTC. Pass the end user's zone when the numbers are about their business days — in UTC, a viewer in the Americas gets a day that starts mid-evening and a newest bucket that is a fragment. An unknown or malformed name is rejected with 400.

header
X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys on the event routes. Ignored for secret (sk_) keys, which resolve their own location, and not used by /export.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

start_datestring

Window start date (YYYY-MM-DD). Defaults to days before today.

end_datestring

Window end date (YYYY-MM-DD).

daysinteger

Rolling window size in days, used when start_date is omitted. Default 14, min 1, max 365.

tzstring

IANA timezone the day buckets are cut in, e.g. America/Denver. Defaults to UTC. Pass the end user's zone when the numbers are about their business days — in UTC, a viewer in the Americas gets a day that starts mid-evening and a newest bucket that is a fragment. An unknown or malformed name is rejected with 400.

Example:
America/Denver

Headers

X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys on the event routes. Ignored for secret (sk_) keys, which resolve their own location, and not used by /export.

Responses

successboolean
dataobject[]
rowsinteger

Number of rows returned.