POST /zones/{zone_id}/waiting_rooms/preview
Creates a waiting room page preview. Upload a custom waiting room page for preview. You will receive a preview URL in the form http://waitingrooms.dev/preview/<uuid>
. You can use the following query parameters to change the state of the preview:
force_queue
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website (also known as queueAll).queue_is_full
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment.queueing_method
: The queueing method currently used by the waiting room.- fifo indicates a FIFO queue.
- random indicates a Random queue.
- passthrough indicates a Passthrough queue. Keep in mind that the waiting room page will only be displayed if
force_queue=true
orevent=prequeueing
— for other cases the request will pass through to the origin. For our preview, this will be a fake origin website returning "Welcome". - reject indicates a Reject queue.
event
: Used to preview a waiting room event.- none indicates no event is occurring.
- prequeueing indicates that an event is prequeueing (between
prequeue_start_time
andevent_start_time
). - started indicates that an event has started (between
event_start_time
andevent_end_time
).
shuffle_at_event_start
: Boolean indicating if the event will shuffle users in the prequeue when it starts. This can only be set to true if an event is active (event
is not none).
For example, you can make a request to http://waitingrooms.dev/preview/<uuid>?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true
6. waitTime
: Non-zero, positive integer indicating the estimated wait time in minutes. The default value is 10 minutes.
For example, you can make a request to http://waitingrooms.dev/preview/<uuid>?waitTime=50
to configure the estimated wait time as 50 minutes.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
Name | Type | Required | Description |
---|---|---|---|
zone_id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
custom_html |
String | Yes |
Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
To view the full list of variables, look at the |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.