RoomKit
  • iOS : Objective-C
  • Android
  • Web
  • Flutter
  • Introduction
  • Demo app
  • Sample codes
  • Client SDKs
    • SDK downloads
    • Release notes
  • Getting started
    • Integration
    • Start a room
  • Guides
    • Customize room parameters
    • Customize the room UI
    • Listen for room callbacks
    • Screen rotation support
    • Screen sharing
    • Manage rooms with Education Cloud Service
    • Use server event callbacks
  • Server APIs
  • Error codes
  • Documentation
  • RoomKit
  • Server APIs
  • RoomKit Server APIs
  • Room statistics
  • Get room's user entry and exit records

Get room's user entry and exit records

Last updated:2022-02-25 17:04

1 Description

Gets the user entry and exit records of a room.

2 Request method and endpoint

  • Request method: POST

  • Request endpoint:

    Service environment Rate limit Endpoint
    Production 1 request/second https://roomkit-api.zego.im/statistic/v2/room/get_logio_records
  • Transmission protocol: HTTPS

3 Request parameters

Parameter Type Required Example Description
secret_id Int64 Yes 12580 The Secret ID assigned to your project by ZEGO.
access_token String Yes "CIE7hNPK6Y55DeUJBSDrInP" The server access token obtained via the get_access_token request.
pid Int64 Yes 1200 The Product ID assigned to your project by ZEGO.
room_id String Yes "123456789" Room ID.
uid Int64 No 1 If specified, return records for this User ID only.
begin_timestamp Int64 Yes 1616489840 Query start time, in seconds.
end_timestamp Int64 Yes 1616490214 Query end time, in seconds.
Default value: the current time.

The query time period cannot exceed 72 hours.

4 Sample request

{
    "secret_id": 12580,
    "access_token": "access_token",
    "pid": 1200,
    "room_id":"123",
    "begin_timestamp":1590666065,
    "end_timestmap":1590666065
}

5 Response parameters

Parameter Type Example Description
ret Object - The returned status of the request.
ret.code Int 0 The returned code.
ret.message String "succeed" The returned message.
data Object - The returned data of the request.
data.count Int64 6 The number of data items in the array data.records.
data.records Array of Object [] Array of user entry and exit records.
data.records[0].username String "name" User name.
data.records[0].uid Int64 1 User ID.
data.records[0].role Int64 1 User's role in the room, defined in the table below.
data.records[0].login_time Int64 1616489840 User's login time, in seconds.
data.records[0].logout_time Int64 1616489840 User's logout time corresponding to the above login time, in seconds. If the user is still in the room (i.e., there is no corresponding logout time), this field will be 0.

User role definition:

Role value Role description
1 Host
2 Attendee
4 Assistant
8 Company Administrator

6 Sample response

{
    "ret": {
        "code": 0,
        "message": "succeed"
    },
    "data": {
        "count": 2,
        "records": [
            {
                "username": "a",
                "uid": 123,
                "role": 1,
                "login_time": 1616489840,
                "logout_time": 1616490029
            },
            {
                "username": "a",
                "uid": 123,
                "role": 1,
                "login_time": 1616490077,
                "logout_time": 1616490214
            }
        ]
    }
}
Page Directory