C / Zoom API / Get location settings
Back to Collection Items
#include <C_CkHttp.h>
#include <C_CkJsonObject.h>
#include <C_CkHttpResponse.h>
#include <C_CkStringBuilder.h>
void ChilkatSample(void)
{
HCkHttp http;
BOOL success;
HCkJsonObject queryParams;
HCkHttpResponse resp;
HCkStringBuilder sbResponseBody;
HCkJsonObject jResp;
int respStatusCode;
BOOL Detect_microphone_error_alert;
BOOL Detect_bluetooth_microphone_error_alert;
BOOL Detect_speaker_error_alert;
BOOL Detect_bluetooth_speaker_error_alert;
BOOL Detect_camera_error_alert;
BOOL Audio_not_meet_usability_threshold;
BOOL Battery_low_and_not_charging;
BOOL Controller_scheduling_disconnected;
BOOL Cpu_usage_high_detected;
BOOL Network_unstable_detected;
BOOL Zoom_room_offline;
BOOL Sip_registration_failed;
BOOL Mic_speaker_camera_disconnected;
BOOL Zoom_room_display_disconnected;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttp_Create();
queryParams = CkJsonObject_Create();
CkJsonObject_UpdateString(queryParams,"setting_type","meeting");
// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,"<access_token>");
resp = CkHttp_QuickRequestParams(http,"GET","https://api.zoom.us/v2/rooms/locations/:locationId/settings",queryParams);
if (CkHttp_getLastMethodSuccess(http) == FALSE) {
printf("%s\n",CkHttp_lastErrorText(http));
CkHttp_Dispose(http);
CkJsonObject_Dispose(queryParams);
return;
}
sbResponseBody = CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);
jResp = CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,FALSE);
printf("Response Body:\n");
printf("%s\n",CkJsonObject_emit(jResp));
respStatusCode = CkHttpResponse_getStatusCode(resp);
printf("Response Status Code = %d\n",respStatusCode);
if (respStatusCode >= 400) {
printf("Response Header:\n");
printf("%s\n",CkHttpResponse_header(resp));
printf("Failed.\n");
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
CkJsonObject_Dispose(queryParams);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
return;
}
CkHttpResponse_Dispose(resp);
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "client_alert": {
// "detect_microphone_error_alert": true,
// "detect_bluetooth_microphone_error_alert": true,
// "detect_speaker_error_alert": true,
// "detect_bluetooth_speaker_error_alert": true,
// "detect_camera_error_alert": true
// },
// "notification": {
// "audio_not_meet_usability_threshold": false,
// "battery_low_and_not_charging": false,
// "controller_scheduling_disconnected": false,
// "cpu_usage_high_detected": false,
// "network_unstable_detected": false,
// "zoom_room_offline": false,
// "sip_registration_failed": false,
// "mic_speaker_camera_disconnected": false,
// "zoom_room_display_disconnected": false
// }
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
Detect_microphone_error_alert = CkJsonObject_BoolOf(jResp,"client_alert.detect_microphone_error_alert");
Detect_bluetooth_microphone_error_alert = CkJsonObject_BoolOf(jResp,"client_alert.detect_bluetooth_microphone_error_alert");
Detect_speaker_error_alert = CkJsonObject_BoolOf(jResp,"client_alert.detect_speaker_error_alert");
Detect_bluetooth_speaker_error_alert = CkJsonObject_BoolOf(jResp,"client_alert.detect_bluetooth_speaker_error_alert");
Detect_camera_error_alert = CkJsonObject_BoolOf(jResp,"client_alert.detect_camera_error_alert");
Audio_not_meet_usability_threshold = CkJsonObject_BoolOf(jResp,"notification.audio_not_meet_usability_threshold");
Battery_low_and_not_charging = CkJsonObject_BoolOf(jResp,"notification.battery_low_and_not_charging");
Controller_scheduling_disconnected = CkJsonObject_BoolOf(jResp,"notification.controller_scheduling_disconnected");
Cpu_usage_high_detected = CkJsonObject_BoolOf(jResp,"notification.cpu_usage_high_detected");
Network_unstable_detected = CkJsonObject_BoolOf(jResp,"notification.network_unstable_detected");
Zoom_room_offline = CkJsonObject_BoolOf(jResp,"notification.zoom_room_offline");
Sip_registration_failed = CkJsonObject_BoolOf(jResp,"notification.sip_registration_failed");
Mic_speaker_camera_disconnected = CkJsonObject_BoolOf(jResp,"notification.mic_speaker_camera_disconnected");
Zoom_room_display_disconnected = CkJsonObject_BoolOf(jResp,"notification.zoom_room_display_disconnected");
CkHttp_Dispose(http);
CkJsonObject_Dispose(queryParams);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
}
Curl Command
curl -G -d "setting_type=meeting"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/rooms/locations/:locationId/settings
Postman Collection Item JSON
{
"name": "Get location settings",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting",
"description": "(Required) The type of setting that you would like to retrieve.<br> `alert`: Alert Settings applied on the Zoom Rooms Account.<br>\n`meeting`: Meeting settings of the Zoom Rooms Account.<br>\n`signage`: Digital signage settings of the Zoom Rooms Account."
}
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the location type. This can be retrieved using the [List Zoom Room Location API](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) (Id property in the response)."
}
]
},
"description": "Get information on meeting or alert settings applied to Zoom Rooms located in a specific location. By default, only **Meeting Settings** are returned. To view only **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter.<br><br>\n**Prerequisites:**<br>\n* Zoom Room licenses\n* Owner or Admin privileges on the Zoom Account.<br>\n**Scopes:** `room:read:admin`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status Code:** `200` **OK**<br>\nZoom Room location settings returned successfully.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the location type. This can be retrieved using the [List Zoom Room Location API](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) (Id property in the response)."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"client_alert\": {\n \"detect_microphone_error_alert\": true,\n \"detect_bluetooth_microphone_error_alert\": true,\n \"detect_speaker_error_alert\": true,\n \"detect_bluetooth_speaker_error_alert\": true,\n \"detect_camera_error_alert\": true\n },\n \"notification\": {\n \"audio_not_meet_usability_threshold\": false,\n \"battery_low_and_not_charging\": false,\n \"controller_scheduling_disconnected\": false,\n \"cpu_usage_high_detected\": false,\n \"network_unstable_detected\": false,\n \"zoom_room_offline\": false,\n \"sip_registration_failed\": false,\n \"mic_speaker_camera_disconnected\": false,\n \"zoom_room_display_disconnected\": false\n }\n}"
},
{
"name": "**HTTP Status Code:** `400` **Bad Request**<br>\n\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess Restricted.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the location type. This can be retrieved using the [List Zoom Room Location API](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) (Id property in the response)."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404` **Not Found**<br>\n\n**Error Code:** `4801`<br>\nLocation not found: {locationId}\n\n",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the location type. This can be retrieved using the [List Zoom Room Location API](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) (Id property in the response)."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}