presets
Creates, updates, deletes, gets or lists a presets resource.
Overview
| Name | presets |
| Type | Resource |
| Id | cloudflare.realtime_kit.presets |
Fields
The following fields are returned by SELECT queries:
- get
- list
Success response
| Name | Datatype | Description |
|---|---|---|
data | object | Data returned by the operation (title: Preset) |
success | boolean | Success status of the operation |
Example response
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the preset |
name | string | Name of the preset |
created_at | string (date-time) | Timestamp this preset was created at |
updated_at | string (date-time) | Timestamp this preset was last updated |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, app_id, preset_id | Fetches details of a preset using the provided preset ID | |
list | select | account_id, app_id | per_page, page_no | Fetches all the presets belonging to an App. |
create | insert | account_id, app_id, name, config, ui | Creates a preset belonging to the current App | |
update | update | account_id, app_id, preset_id | Update a preset by the provided preset ID | |
delete | delete | account_id, app_id, preset_id | Deletes a preset using the provided preset 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. |
preset_id | string | ID of the preset to fetch |
page_no | number | The page number from which you want your page search results to be displayed. |
per_page | number | Number of results per page |
SELECT examples
- get
- list
Fetches details of a preset using the provided preset ID
SELECT
data,
success
FROM cloudflare.realtime_kit.presets
WHERE account_id = '{{ account_id }}' -- required
AND app_id = '{{ app_id }}' -- required
AND preset_id = '{{ preset_id }}' -- required
;
Fetches all the presets belonging to an App.
SELECT
id,
name,
created_at,
updated_at
FROM cloudflare.realtime_kit.presets
WHERE account_id = '{{ account_id }}' -- required
AND app_id = '{{ app_id }}' -- required
AND per_page = '{{ per_page }}'
AND page_no = '{{ page_no }}'
;
INSERT examples
- create
- Manifest
Creates a preset belonging to the current App
INSERT INTO cloudflare.realtime_kit.presets (
config,
name,
permissions,
ui,
account_id,
app_id
)
SELECT
'{{ config }}' /* required */,
'{{ name }}' /* required */,
'{{ permissions }}',
'{{ ui }}' /* required */,
'{{ account_id }}',
'{{ app_id }}'
RETURNING
data,
success
;
# Description fields are for documentation purposes
- name: presets
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the presets resource.
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the presets resource.
- name: config
value:
max_screenshare_count: {{ max_screenshare_count }}
max_video_streams:
desktop: {{ desktop }}
mobile: {{ mobile }}
media:
audio:
enable_high_bitrate: {{ enable_high_bitrate }}
enable_stereo: {{ enable_stereo }}
screenshare:
frame_rate: {{ frame_rate }}
quality: "{{ quality }}"
video:
frame_rate: {{ frame_rate }}
quality: "{{ quality }}"
view_type: "{{ view_type }}"
- name: name
value: "{{ name }}"
description: |
Name of the preset
- name: permissions
value:
accept_waiting_requests: {{ accept_waiting_requests }}
can_accept_production_requests: {{ can_accept_production_requests }}
can_change_participant_permissions: {{ can_change_participant_permissions }}
can_edit_display_name: {{ can_edit_display_name }}
can_livestream: {{ can_livestream }}
can_record: {{ can_record }}
can_spotlight: {{ can_spotlight }}
chat:
private:
can_receive: {{ can_receive }}
can_send: {{ can_send }}
files: {{ files }}
text: {{ text }}
public:
can_send: {{ can_send }}
files: {{ files }}
text: {{ text }}
connected_meetings:
can_alter_connected_meetings: {{ can_alter_connected_meetings }}
can_switch_connected_meetings: {{ can_switch_connected_meetings }}
can_switch_to_parent_meeting: {{ can_switch_to_parent_meeting }}
disable_participant_audio: {{ disable_participant_audio }}
disable_participant_screensharing: {{ disable_participant_screensharing }}
disable_participant_video: {{ disable_participant_video }}
hidden_participant: {{ hidden_participant }}
is_recorder: {{ is_recorder }}
kick_participant: {{ kick_participant }}
media:
audio:
can_produce: "{{ can_produce }}"
screenshare:
can_produce: "{{ can_produce }}"
video:
can_produce: "{{ can_produce }}"
pin_participant: {{ pin_participant }}
plugins:
can_close: {{ can_close }}
can_edit_config: {{ can_edit_config }}
can_start: {{ can_start }}
config: "{{ config }}"
polls:
can_create: {{ can_create }}
can_view: {{ can_view }}
can_vote: {{ can_vote }}
recorder_type: "{{ recorder_type }}"
show_participant_list: {{ show_participant_list }}
waiting_room_type: "{{ waiting_room_type }}"
- name: ui
value:
config_diff: "{{ config_diff }}"
design_tokens:
border_radius: "{{ border_radius }}"
border_width: "{{ border_width }}"
colors:
background:
600: "{{ 600 }}"
700: "{{ 700 }}"
800: "{{ 800 }}"
900: "{{ 900 }}"
1000: "{{ 1000 }}"
brand:
300: "{{ 300 }}"
400: "{{ 400 }}"
500: "{{ 500 }}"
600: "{{ 600 }}"
700: "{{ 700 }}"
danger: "{{ danger }}"
success: "{{ success }}"
text: "{{ text }}"
text_on_brand: "{{ text_on_brand }}"
video_bg: "{{ video_bg }}"
warning: "{{ warning }}"
logo: "{{ logo }}"
spacing_base: {{ spacing_base }}
theme: "{{ theme }}"
UPDATE examples
- update
Update a preset by the provided preset ID
UPDATE cloudflare.realtime_kit.presets
SET
config = '{{ config }}',
name = '{{ name }}',
permissions = '{{ permissions }}',
ui = '{{ ui }}'
WHERE
account_id = '{{ account_id }}' --required
AND app_id = '{{ app_id }}' --required
AND preset_id = '{{ preset_id }}' --required
RETURNING
data,
success;
DELETE examples
- delete
Deletes a preset using the provided preset ID
DELETE FROM cloudflare.realtime_kit.presets
WHERE account_id = '{{ account_id }}' --required
AND app_id = '{{ app_id }}' --required
AND preset_id = '{{ preset_id }}' --required
;