In the response above, you can already see the list of available spaces (“Conference breakout,” “Main Hall,” and “Food Court”) and their respective presets. Each space and Preset is referenced by a unique identifier (UUID).
For this example, let’s examine the “Main Hall”. Its ID is 1d32edb0-4a56-4571-a6c5-49050ca06d51.
…
"1d32edb0-4a56-4571-a6c5-49050ca06d51": {
"name": "Main Hall",
"presets": {
"23d6cd0e-5b53-460b-9202-b152538850c0": {
"name": "Preset 2 for Main Hall"
},
"51fa103c-44bb-4ccd-96f7-4c0c2d90c34f": {
"name": "Preset 3 for Main Hall"
},
"9d2514db-0cf6-4cdf-86fc-362f16e3e6d7": {
"name": "Preset 1 for Main Hall"
}
},
"active_preset_id": "23d6cd0e-5b53-460b-9202-b152538850c0",
"active_environmental_conditions_id": null,
"environmental_conditions": {
"temperature_celsius": 20,
"atmospheric_pressure_pascal": 101325,
"humidity_percentage": 50
}
},
…
It has three available presets, and the currently active preset is Preset 2 for Main Hall.
Changing the active preset
We will use the PATCH /spaces/{space-id} method for this operation. We will change the active preset to Preset 1 for Main Hall. The method takes a request body with the following format:
cURL is a program available on Windows 10 and above, MacOS, and Linux OS. It provides a simple way to interact with HTTP endpoints and test API requests. Whenever you use one of the API Methods in the interactive documentation, it will display the corresponding request as a cURL command. This makes it easy to copy, paste, and iterate the request.