/insights

Get room insights

Gets a summary of insights collected for rooms.

GEThttps://api.whereby.dev/v1/insights/rooms
Query parameters
Response

Array of sorted rooms with their insights.

Body
cursorstring

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request. If there are no more results, the value returned is null.

resultsarray of object
Request
const response = await fetch('https://api.whereby.dev/v1/insights/rooms', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "cursor": "text",
  "results": [
    {
      "roomName": "/4b3bd908-cb88-11ec-9d64-0242ac120002",
      "createdAt": "2020-01-01T00:00:00.000Z",
      "endAt": "2020-01-01T01:00:00.000Z",
      "firstSessionStartedAt": "2020-01-01T00:15:00.000Z",
      "lastSessionStartedAt": "2020-01-01T00:45:00.000Z",
      "totalParticipantMinutes": 124,
      "totalRecorderMinutes": 120,
      "totalStreamerMinutes": 120,
      "totalUniqueParticipants": 4,
      "totalUniqueRecorders": 2,
      "totalUniqueStreamers": 1,
      "totalSessions": 2
    }
  ]
}

Get room session insights

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

GEThttps://api.whereby.dev/v1/insights/room-sessions
Query parameters
Response

Array of sorted sessions with their insights.

Body
cursorstring

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request. If there are no more results, the value returned is null.

resultsarray of object
Request
const response = await fetch('https://api.whereby.dev/v1/insights/room-sessions', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "cursor": "text",
  "results": [
    {
      "roomSessionId": "32ba120a-a691-4e8e-aec3-a610239271de",
      "roomName": "/4b3bd908-cb88-11ec-9d64-0242ac120002",
      "startedAt": "2020-01-01T00:00:00.000Z",
      "endedAt": "2020-01-01T01:00:00.000Z",
      "totalParticipantMinutes": 124,
      "totalRecorderMinutes": 120,
      "totalStreamerMinutes": 120,
      "totalUniqueParticipants": 4,
      "totalUniqueRecorders": 3,
      "totalUniqueStreamers": 2
    }
  ]
}

Get participants

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

GEThttps://api.whereby.dev/v1/insights/participants
Query parameters
Response

Array of sorted sessions participants with insights.

Body
cursorstring

The cursor for paginating through the results. To fetch the next page, set the cursor to the cursor returned by the previous request. If there are no more results, the value returned is null.

resultsarray of object
Request
const response = await fetch('https://api.whereby.dev/v1/insights/participants', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "cursor": "text",
  "results": [
    {
      "roomSessionId": "32ba120a-a691-4e8e-aec3-a610239271de",
      "participantId": "/4b3bd908-cb88-11ec-9d64-0242ac120002",
      "deviceId": "text",
      "userId": "32ba120a-a691-4e8e-aec3-a610239271de",
      "roleName": "granted_visited",
      "displayName": "John Doe",
      "joinedAt": "2020-01-01T00:00:00.000Z",
      "leftAt": "2020-01-01T01:00:00.000Z",
      "externalId": "text"
    }
  ]
}

Get details for a participant in a session

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

GEThttps://api.whereby.dev/v1/insights/participant
Query parameters
Response

Array of sorted sessions participants with insights.

Body
displayName*string

Display name of the participant.

userRole*string

The role of the participant.

Example: "host"
userAgent*string

User agent string of the participant.

Example: "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*string

Timestamp the participant joined the session.

sampleRateMs*number

The interval (in milliseconds) the samples are collected in.

Example: 2000
samples*object

Data object arrays with network data. packetLossSend, packetLossRecv, bitrateSend and bitrateRecv.

Request
const response = await fetch('https://api.whereby.dev/v1/insights/participant', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "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
  }
]

Last updated