Skip to main content
POST
/
analytics
/
records
Aggregate records by ObjectType. Supports sum/avg/min/max/count on JSONB fields, group_by, time bucketing (day/week/month/quarter/year), and filters.
curl --request POST \
  --url https://api.supersonic.cv/analytics/records \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "object_type": "<string>",
  "metrics": [
    {
      "field": "<string>",
      "agg": "count"
    }
  ],
  "filters": {},
  "group_by": "<string>",
  "time_field": "<string>",
  "time_range": {
    "from": "<string>",
    "to": "<string>"
  },
  "time_bucket": "day"
}
'
{}

Authorizations

Authorization
string
header
required

API key: supersonic_live_...

Body

application/json
object_type
string
required

ObjectType slug to aggregate

metrics
object[]
required

Aggregation metrics

filters
object

Field filters (field__op: value)

group_by
string

Field slug to group by

time_field
string

Date field slug for time filtering

time_range
object
time_bucket
enum<string>
Available options:
day,
week,
month,
quarter,
year

Response

Success

The response is of type object.