Retrieve a specific session
Retrieves the details of a specific session. 100ms provides options to retrieve details of a session with their ID.
GEThttps://api.100ms.live/v2/sessions/<session_id>
curl --location --request GET 'https://api.100ms.live/v2/sessions/<session_id>' \ --header 'Authorization: Bearer <management_token>'
RESPONSE
Status: 200 OK
{ "id": "63172c2d3e3d9fdb008322e1", "room_id": "627ce5b8f2e4e30487862adb", "customer_id": "627cdddff2e4e30487862ad1", "active": false, "peers": { "2d873b0a-c2c9-41dc-ac72-c6ea9b2f2cc3": { "id": "2d873b0a-c2c9-41dc-ac72-c6ea9b2f2cc3", "session_id": "63172c2d3e3d9fdb008322e1", "name": "Nixon K", "role": "backstage", "user_id": "Batch1-student", "joined_at": "2022-09-06T11:17:01.816Z", "left_at": "2022-09-06T11:17:03.643Z" } }, "created_at": "2022-09-06T11:17:01.817Z", "updated_at": "2022-09-06T11:17:03.65Z" }
Arguments
Name | Type | Description | Required |
---|---|---|---|
session_id — path param | string | Unique identifier of the session you wish to fetch details for. Example: 63172c2d3e3d9fdb008322e1 | Yes |
How to calculate session duration
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.
Please check Build attendance example to see how you can use this API to get the attendance data of a particular session.
Have a suggestion? Recommend changes ->