Sessions API
Overview
Returns a paginated list of viewer playout sessions (HTTP-ABR or SRT) for a tenant, one record per session: what was watched, where (country/region), for how long, and on what platform.
This is the API behind the Sessions tab of the Analytics & Reporting app.
Endpoint
POST
https://appsvc.svc.eluv.io/casa/main/:tid/sessions
Authentication: tenant admin (or content admin) bearer token.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
start_ts | integer | No | Start time, unix seconds. Default: 1 month ago |
end_ts | integer | No | End time, unix seconds. Default: now |
limit | integer | No | Max results to return (paging) |
offset | integer | No | Result offset (paging) |
srt | boolean | No | If true, query SRT (live) sessions |
Request Body
{
"filters": {
"<column>": ["<value1>", "<value2>"]
},
"order_by": "view_start DESC"
}
| Field | Description |
|---|---|
filters | Restrict results: OR within a field, AND across fields |
exclude_filters | Leave out matching results, in the same form as filters |
order_by | Field to order by. Default view_start DESC |
Filter keys are column names from Session Fields. Send {} for no filters.
Range keys
duration_secs, watched_secs, pct_watched and total_bytes filter by range instead of exact match, using
"N-M" (for example "filters": {"watched_secs": ["60-300"]}), OR'd across several ranges.
CSV
Send Accept: text/csv instead of Accept: application/json to get CSV. Without limit, CSV returns every
matching row.
Example Request
curl -X POST "https://appsvc.svc.eluv.io/casa/main/<tenantId>/sessions?limit=50&offset=0" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"filters": {
"object_id": ["iq__abc123..."]
},
"order_by": "view_start DESC"
}'
Example Response
{
"sessions": [
{
"uuid": "sess_abc123",
"session_id": "sess_abc123",
"tenant": "<tenantId>",
"view_start": 1765832948,
"view_end": 1765834748,
"view_time": "2026-05-15T18:29:08Z",
"auth_identity": "0xabc123...",
"auth_addr": "0xabc123...",
"client_country": "US",
"client_region": "CA",
"client_city": "Los Angeles",
"platform": "Roku",
"os": "Roku OS",
"product": "Roku",
"user_agent": "Roku/DVP-...",
"ip_title_id": "TVOD-001",
"title": "Example Title",
"object_id": "iq__abc123...",
"library_id": "ilib_def456...",
"duration_secs": 5400,
"watched_secs": 1800,
"pct_watched": 33
}
],
"paging": {
"offset": 0,
"limit": 50,
"total": 214,
"start_ts": 1763240948,
"end_ts": 1765832948,
"is_srt": false
}
}
Session Fields
| Field | Type | Description |
|---|---|---|
uuid | string | Session identifier |
session_id | string | May be empty for older non-SRT sessions |
tenant | string | Tenant ID |
view_start | int64 | Unix timestamp, session start |
view_end | int64 | Unix timestamp, session end |
view_time | timestamp | Formatted version of view_start, for display/debugging |
auth_identity | string | Authenticated identity for the session |
auth_addr | string | Wallet address associated with the session |
auth_email | string | Email associated with the session, if available |
client_ip | string | Client IP address |
client_location | string | Free-text geolocation string |
client_city | string | Client city (geolocation) |
client_country | string | Client country (geolocation) |
client_region | string | Client region/state (geolocation) |
client_latitude | float | Client latitude, if resolved |
client_longitude | float | Client longitude, if resolved |
product | string | Client product |
platform | string | Hardware platform, extracted from user agent |
user_agent | string | Raw client user agent string |
os | string | OS name/version, extracted from user agent |
referer | string | HTTP referer |
id | string | Content object version hash |
object_id | string | Content object's Fabric ID (iq__...) |
ip_title_id | string | Title ID from the object's public metadata |
title | string | Object's display title |
library_id | string | Fabric library ID containing the object |
offering | string | Playout offering used |
duration_secs | int64 | Total content duration, in seconds |
watched_secs | int64 | Seconds actually watched during the session |
pct_watched | int64 | watched_secs / duration_secs, as a percentage |
total_bytes | int64 | Bytes delivered during the session |
extras | string | Free-form JSON with additional client-reported data, if any |
created | int64 | Unix timestamp |
For the NFTs and billing IDs behind each session, use Enriched Sessions.