/insights

Get room insights

get

Gets a summary of insights collected for rooms.

Query parameters
sortByanyOptional

Sort results by a field.

Example: totalSessions:asc
cursoranyOptional

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request.

Example: 8f4031bfc7640c5f267b11b6fe0c2507
limitinteger · min: 1 · max: 100Optional

Limit the number of results.

Default: 10Example: 30
Responses
200
Array of sorted rooms with their insights.
application/json
get
GET /v1/insights/rooms HTTP/1.1
Host: api.whereby.dev
Accept: */*
{
  "cursor": "text",
  "results": [
    {
      "roomName": "/room-prefix-793e9ec1-c686-423d-9043-9b7a10c553fd",
      "createdAt": "2025-01-01T00:00:00.000Z",
      "endAt": "2025-01-01T01:00:00.000Z",
      "firstSessionStartedAt": "2025-01-01T00:15:00.000Z",
      "lastSessionStartedAt": "2025-01-01T00:45:00.000Z",
      "totalParticipantMinutes": 124,
      "totalRecorderMinutes": 120,
      "totalStreamerMinutes": 120,
      "totalUniqueParticipants": 4,
      "totalUniqueRecorders": 2,
      "totalUniqueStreamers": 1,
      "totalSessions": 2
    }
  ]
}

Get room session insights

get

Gets a summary of usage for each session of a given room.

Query parameters
roomNameanyRequired

Room name.

Example: /room-prefix-793e9ec1-c686-423d-9043-9b7a10c553fd
roomSessionIdanyOptional

Room session identifier.

Example: e2f29530-46ec-4cee-8b27-e565cb5bb2e9
sortByanyOptional

Sort results by a field.

Example: totalUniqueParticipants:asc
cursoranyOptional

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request.

Example: 8f4031bfc7640c5f267b11b6fe0c2507
limitinteger · min: 1 · max: 100Optional

Limit the number of results.

Default: 10Example: 30
Responses
200
Array of sorted sessions with their insights.
application/json
get
GET /v1/insights/room-sessions HTTP/1.1
Host: api.whereby.dev
Accept: */*
{
  "cursor": "text",
  "results": [
    {
      "roomSessionId": "e2f29530-46ec-4cee-8b27-e565cb5bb2e9",
      "roomName": "/room-prefix-793e9ec1-c686-423d-9043-9b7a10c553fd",
      "startedAt": "2025-01-01T00:00:00.000Z",
      "endedAt": "2025-01-01T01:00:00.000Z",
      "totalParticipantMinutes": 124,
      "totalRecorderMinutes": 120,
      "totalStreamerMinutes": 120,
      "totalUniqueParticipants": 4,
      "totalUniqueRecorders": 3,
      "totalUniqueStreamers": 2
    }
  ]
}

Get participants

get

Gets a list of participants, by either a given session id or external id.

Query parameters
roomSessionIdanyRequired

session ID. Either roomSessionId or externalId is required.

Example: e2f29530-46ec-4cee-8b27-e565cb5bb2e9
externalIdanyOptional

an externalId that was originally passed in query params by the participant when joining. Either roomSessionId or externalId is required.

sortByanyOptional

Sort results by a field. Accepted values are joinedAt and leftAt. Accepted sort values are asc and desc.

Example: joinedAt:asc
cursoranyOptional

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request.

Example: 8f4031bfc7640c5f267b11b6fe0c2507
limitinteger · min: 1 · max: 100Optional

Limit the number of results.

Default: 10Example: 30
Responses
200
Array of sorted sessions participants with insights.
application/json
get
GET /v1/insights/participants HTTP/1.1
Host: api.whereby.dev
Accept: */*
{
  "cursor": "text",
  "results": [
    {
      "roomSessionId": "e2f29530-46ec-4cee-8b27-e565cb5bb2e9",
      "participantId": "/4b3bd908-cb88-11ec-9d64-0242ac120002",
      "deviceId": "text",
      "userId": "32ba120a-a691-4e8e-aec3-a610239271de",
      "roleName": "granted_visited",
      "displayName": "John Doe",
      "joinedAt": "2025-01-01T00:00:00.000Z",
      "leftAt": "2025-01-01T01:00:00.000Z",
      "externalId": "text"
    }
  ]
}

Get details for a participant in a session

get

Returns session data such as user agent, bandwidth and packet loss for the participant.

Query parameters
roomSessionIdanyRequired

session ID.

Example: e2f29530-46ec-4cee-8b27-e565cb5bb2e9
participantIdanyRequired

participant ID.

Example: 32ba120a-a691-4e8e-aec3-a610239271de
Responses
200
Array of sorted sessions participants with insights.
application/json
get
GET /v1/insights/participant HTTP/1.1
Host: api.whereby.dev
Accept: */*
[
  {
    "displayName": "text",
    "userRole": "host",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
    "timeStamp": "text",
    "sampleRateMs": 2000,
    "samples": {}
  }
]

Last updated

Was this helpful?