SQL Server / Zoom API / Get location settings
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @queryParams int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'setting_type', 'meeting'
-- Adds the "Authorization: Bearer <access_token>" header.
EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.zoom.us/v2/rooms/locations/:locationId/settings', @queryParams
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
RETURN
END
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @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
DECLARE @Detect_microphone_error_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Detect_microphone_error_alert OUT, 'client_alert.detect_microphone_error_alert'
DECLARE @Detect_bluetooth_microphone_error_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Detect_bluetooth_microphone_error_alert OUT, 'client_alert.detect_bluetooth_microphone_error_alert'
DECLARE @Detect_speaker_error_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Detect_speaker_error_alert OUT, 'client_alert.detect_speaker_error_alert'
DECLARE @Detect_bluetooth_speaker_error_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Detect_bluetooth_speaker_error_alert OUT, 'client_alert.detect_bluetooth_speaker_error_alert'
DECLARE @Detect_camera_error_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Detect_camera_error_alert OUT, 'client_alert.detect_camera_error_alert'
DECLARE @Audio_not_meet_usability_threshold int
EXEC sp_OAMethod @jResp, 'BoolOf', @Audio_not_meet_usability_threshold OUT, 'notification.audio_not_meet_usability_threshold'
DECLARE @Battery_low_and_not_charging int
EXEC sp_OAMethod @jResp, 'BoolOf', @Battery_low_and_not_charging OUT, 'notification.battery_low_and_not_charging'
DECLARE @Controller_scheduling_disconnected int
EXEC sp_OAMethod @jResp, 'BoolOf', @Controller_scheduling_disconnected OUT, 'notification.controller_scheduling_disconnected'
DECLARE @Cpu_usage_high_detected int
EXEC sp_OAMethod @jResp, 'BoolOf', @Cpu_usage_high_detected OUT, 'notification.cpu_usage_high_detected'
DECLARE @Network_unstable_detected int
EXEC sp_OAMethod @jResp, 'BoolOf', @Network_unstable_detected OUT, 'notification.network_unstable_detected'
DECLARE @Zoom_room_offline int
EXEC sp_OAMethod @jResp, 'BoolOf', @Zoom_room_offline OUT, 'notification.zoom_room_offline'
DECLARE @Sip_registration_failed int
EXEC sp_OAMethod @jResp, 'BoolOf', @Sip_registration_failed OUT, 'notification.sip_registration_failed'
DECLARE @Mic_speaker_camera_disconnected int
EXEC sp_OAMethod @jResp, 'BoolOf', @Mic_speaker_camera_disconnected OUT, 'notification.mic_speaker_camera_disconnected'
DECLARE @Zoom_room_display_disconnected int
EXEC sp_OAMethod @jResp, 'BoolOf', @Zoom_room_display_disconnected OUT, 'notification.zoom_room_display_disconnected'
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
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": ""
}
]
}