active_session
Creates, updates, deletes, gets or lists an active_session resource.
Overview
| Name | active_session |
| Type | Resource |
| Id | cloudflare.realtime_kit.active_session |
Fields
The following fields are returned by SELECT queries:
- list
Active Session Success response
| Name | Datatype | Description |
|---|---|---|
data | object | |
success | boolean |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | meeting_id, account_id, app_id | Returns details of an ongoing active session for the given meeting ID. | |
kick | exec | account_id, app_id, meeting_id, participant_ids, custom_participant_ids | Kicks one or more participants from an active session using user ID or custom participant ID. | |
kick_all | exec | account_id, app_id, meeting_id | Kicks all participants from an active session for the given meeting ID. | |
mute | exec | account_id, app_id, meeting_id, participant_ids, custom_participant_ids | Mutes one or more participants from an active session using user ID or custom participant ID. | |
mute_all | exec | account_id, app_id, meeting_id, allow_unmute | Mutes all participants of an active session for the given meeting ID. | |
create_poll | exec | account_id, app_id, meeting_id, question, options | Creates a new poll in an active session for the given meeting ID. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
app_id | string | The Access application ID. |
meeting_id | string | The Realtime Kit meeting ID. |
SELECT examples
- list
Returns details of an ongoing active session for the given meeting ID.
SELECT
data,
success
FROM cloudflare.realtime_kit.active_session
WHERE meeting_id = '{{ meeting_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND app_id = '{{ app_id }}' -- required
;
Lifecycle Methods
- kick
- kick_all
- mute
- mute_all
- create_poll
Kicks one or more participants from an active session using user ID or custom participant ID.
EXEC cloudflare.realtime_kit.active_session.kick
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required,
@meeting_id='{{ meeting_id }}' --required
@@json=
'{
"custom_participant_ids": "{{ custom_participant_ids }}",
"participant_ids": "{{ participant_ids }}"
}'
;
Kicks all participants from an active session for the given meeting ID.
EXEC cloudflare.realtime_kit.active_session.kick_all
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required,
@meeting_id='{{ meeting_id }}' --required
;
Mutes one or more participants from an active session using user ID or custom participant ID.
EXEC cloudflare.realtime_kit.active_session.mute
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required,
@meeting_id='{{ meeting_id }}' --required
@@json=
'{
"custom_participant_ids": "{{ custom_participant_ids }}",
"participant_ids": "{{ participant_ids }}"
}'
;
Mutes all participants of an active session for the given meeting ID.
EXEC cloudflare.realtime_kit.active_session.mute_all
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required,
@meeting_id='{{ meeting_id }}' --required
@@json=
'{
"allow_unmute": {{ allow_unmute }}
}'
;
Creates a new poll in an active session for the given meeting ID.
EXEC cloudflare.realtime_kit.active_session.create_poll
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required,
@meeting_id='{{ meeting_id }}' --required
@@json=
'{
"anonymous": {{ anonymous }},
"hide_votes": {{ hide_votes }},
"options": "{{ options }}",
"question": "{{ question }}"
}'
;