Session

Introduction

Session is a single continuous call in a room. To allow users to join a 100ms video conferencing session inside your app, you first need to create a room. A single room can have multiple sessions. You will need a management token as a bearer token for your requests.

Get Session Data using API

You can query session data using API.

GETGet Session API
https://api.100ms.live/v2/sessions

This endpoint is used to get sessions.

curl --location --request GET 'https://api.100ms.live/v2/sessions?room_id=61652b404e556e35f2179759' -H 'Authorization: Bearer {{management_token}}'

Headers

NameValueRequired
Authorization
Bearer <management token>Yes

URL Parameters

NameTypeDescriptionRequired
id
stringID of the session if known.No
room_id
stringRoom ID of the session if known.No
active
boolSession is currently going on or not.No
before
timeTimestamp before(inclusive) which session is created in RFC3339 format e.g. 2022-02-09T05:53:23.375Z.No
after
timeTimestamp after(inclusive) which session is created in RFC3339 format e.g. 2022-02-09T05:53:23.375Z.No
limit
intNumber of sessions returned by response. Range 10-20No
start
stringID of the session after which to start the response. Sessions are returned in decreasing IDs or created_at timestamp.No

Response

NameTypeDescriptionRequired
limit
intNumber of sessions the API tried to find. If returned array has lesser number of results, only those number were found.No
data
arrayArray of sessions or null if no session was found.No
last
ObjectIDSessions are returned in decreasing IDs or created_at timestamp. Last represent the earliest session returned by the response.No

How to calculate session duration

You can calculate additional information from session data using given information. Redundant information like peer duration/ session duration is not provided since they can be calculated from provided response. You can calculate peer duration by subtracting joined_at timestamp from left_at for a given peer. Similarly you can calculate session duration by adding all peers' duration.

Postman Collection