Metrics API overview
WebSocket protocol — message envelope, response framing, and the HTTP gateway alternative.
The Metrics API delivers analytics — footfall, dwell, occupancy, transactions, heatmaps, demographics. It uses a single authenticated WebSocket connection that serves many sequential queries.
Base URL: wss://ws.auravision.ai
Prefer a single HTTPS request? The HTTP gateway exposes the same data over a request/response interface —
POSTa body that mirrors the WebSocket message shape, receive the consolidated response. Same JWT bearer auth as the Core API. Contact your account manager for the gateway endpoint.
Looking for organisation, location, or recording lookups over the same WebSocket? See Reference data — the WS analogue of the Core REST resource endpoints.
Conventions
- IDs are 24-character hexadecimal strings (MongoDB ObjectIDs). Top-level resources expose them as
id; embedded objects as_id. - Dates in metric body params (
start,end) require full ISO 8601 with timezone, e.g.2024-04-14T10:00:00.000Z. Date-only strings are rejected. - Response framing — every message is a pipe-delimited frame
{id}|{partNum}|{totalParts}|{JSON}. See Receive format. - null vs zero —
nullmeans no data exists for the period (outside opening hours, or a rate is undefined).0means data was collected and the count was zero. Do not coercenullto0.
All metrics
Traffic
| Metric | Route | Description |
|---|---|---|
| Entries | metric/entries | Footfall — people entering the location |
| Passers-by | metric/passers-by | People who walked past without entering |
| Capture rate | metric/capture-rate | Entries ÷ passers-by |
Occupancy & Dwell
| Metric | Route | Description |
|---|---|---|
| Dwell time | metric/average-dwell-time | Location-wide average dwell |
| Average occupancy | metric/average-occupancy | Location-wide average occupancy |
| Max occupancy | metric/max-occupancy | Location-wide peak occupancy |
Lines
| Metric | Route | Description |
|---|---|---|
| Line taxonomy | detail/list (line_context) | Enumerate line definitions configured on your locations |
| Line entries | metric/internal/line-entries | Entries across a named zone line |
| Line passers-by | metric/internal/line-passers-by | Pass-bys at a named zone line |
| Line capture rate | metric/internal/capture-rate | Entries ÷ passers-by at a named zone |
| Line entries per visitor | metric/internal/line-crossings-per-location-entrant | Line entries per location entrant |
| Location movement | metric/internal/line-crossings | Within-location movement across a line |
Areas
| Metric | Route | Description |
|---|---|---|
| Area taxonomy | detail/list (area_context) | Enumerate area definitions configured on your locations |
| Area entries | metric/area/data | Total entries into a defined zone |
| Area total dwell | metric/area/data | Total dwell time accumulated in a zone |
| Area average dwell | metric/area/data | Mean dwell time per area entry |
| Area average occupancy | metric/area/average-occupancy | Average occupancy of a defined zone |
| Area max occupancy | metric/area/max-occupancy | Peak occupancy of a defined zone |
| Area utilisation | metric/area/utilisation | % of time the area was occupied |
| Area dwell per visitor | metric/area/dwell-per-location-entrant | Area dwell ÷ location entrants |
| Area entries per visitor | metric/area/entries-per-location-entrant | Area entries ÷ location entrants |
Sales
| Metric | Route | Description |
|---|---|---|
| Transactions | metric/transactions/data | Transaction count |
| Volume | metric/transactions/data | Total transaction value |
| Units | metric/transactions/data | Total units sold |
| Average transaction value | metric/transactions/data | Mean value of each transaction |
| Units per transaction | metric/transactions/data | Units sold per transaction |
| Conversion rate | metric/transactions/conversion-rate | Transactions ÷ location entrants |
Heatmaps & Thumbnails
| Metric | Route | Description |
|---|---|---|
| Heatmaps | detail/list (heatmap) | Path / linger / entry / exit / interaction heatmaps |
| Thumbnails | detail/list (thumbnail) | Camera thumbnails |
| Thumbnails with overlays | detail/list (thumbnails-with-statelems) | Thumbnails with lines/areas overlaid |
Uptime
| Metric | Route | Description |
|---|---|---|
| Historic uptime | metric/uptime | Historic uptime over a date range |
| Realtime uptime | status/uptime | Real-time device status |
Exports
| Metric | Route | Description |
|---|---|---|
| CSV generator | external-service/csv-generator | Generate a CSV from one or more metric queries |
Authentication
Present the JWT once at connection time as a ?token=<your_token> query parameter on the WebSocket URL — connect to wss://ws.auravision.ai?token=<your_token>. Do not include it on individual messages. See Authentication for the token flow.
Send format
{
"action": "metric",
"data": {
"id": "your-client-request-id",
"route": "entries",
"body": { }
}
}
| Field | Description |
|---|---|
action | metric | detail | status | external-service |
data.id | Any client-chosen string — echoed back with the response for request/response matching |
data.route | The specific metric or query type — see endpoint pages |
data.body | Route-specific parameters (entities, dates, facets, etc.) |
Receive format
{id}|{partNum}|{totalParts}|{JSON}
Each frame is a pipe-delimited string. The first three segments are the request id (echoed back), the part number, and the total part count. The remainder of the line is the JSON payload.
- Single-part responses use
0|0as a sentinel — the entire JSON is in this one frame. Example:req-001|0|0|{"segments":[...],"summary":{...}} - Multi-part responses are 1-indexed up to
totalParts. Buffer parts byidand concatenate the JSON segments once you’ve receivedpartNum === totalParts. Example:req-001|1|3|{...}→req-001|2|3|{...}→req-001|3|3|{...}
Large datasets
For very large responses (above ~260,000 segments), the segments field of the assembled JSON will be a signed download URL rather than inline JSON. Fetch it with a standard GET. The file is CSV: the first row contains column names; downstream rows are data, with unit-type hints encoded alongside the column values where coercion between numeric and string is needed. Refer to the column ordering you supplied in the request (or the default ordering for inline segments) to interpret the file.
Common request body fields
These apply to most metric routes. Endpoint pages document only fields specific to their routes.
| Field | Required | Description |
|---|---|---|
start / end | Yes | ISO 8601 timestamps |
entities | Yes | Array of location, organisation, or recording IDs (matching entityType) |
entityType | Yes | "location", "organisation", or "recording". Recording-level applies to detail, status, and the uptime metric route. Other metric routes accept "location" or "organisation" only. |
facets | Yes | What to include — see below |
aggregationPeriod | Yes | Time granularity — see below |
roles | Conditional | customer staff customer-customer customer-staff staff-staff. Required when breakdownByDimensions includes role. |
genders | Conditional | male female. Required when breakdownByDimensions includes gender. |
ages | Conditional | 0_15 16_24 25_34 35_44 45_54 55_64 65_100. Required when breakdownByDimensions includes age. |
breakdownByDimensions | No | Split data by: entity taxonomy age gender role |
insideRecordingTimes | No | true to restrict to opening hours only. Default is false (all hours). |
facets options
| Facet | Description |
|---|---|
segments | Time-series data points |
summary | Totals and averages across the full period |
aggregates | Day-of-week or hour-of-day roll-ups |
thumbnails | Camera thumbnails associated with the data |
thumbnails-with-statelems | Thumbnails with overlaid stat-element coordinates |
estimates | Imputed values during camera downtime — supported only on Traffic > Entries under strict conditions |
Aggregation period options
The aggregationPeriod field accepts one of these values:
| Period | Bucket shape |
|---|---|
15min | 15-minute buckets |
hour | Hourly buckets |
day | Daily buckets |
week_iso | ISO weeks (Monday start) |
week_us | US weeks (Sunday start) |
month | Calendar months |
quarter | Calendar quarters |
year | Calendar years |
hourofday | All data collapsed into 24 hour-of-day buckets |
dayofweek | All data collapsed into 7 day-of-week buckets |
dayofweek-hourofday | A 168-bucket grid combining day-of-week × hour-of-day |
Querying in-progress periods
Querying an in-progress monthly, weekly, quarterly, or yearly period returns data accumulated so far — it is not empty. Each period is represented by its start date. If your query’s start date is after the beginning of the current period, that period will not appear in results.
Example: Querying
2026-03-17to2026-04-15at monthly granularity returns April data only — not March. The March period starts on2026-03-01, which falls before your query range. To include March, set the start date to2026-03-01or earlier.
Where to go next
- Entries — start with footfall
- Line entries — entries across zone lines
- Area entries — area-based engagement
- Transactions — POS metrics