DataFlex / Zoom API / Update location settings
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vReq
Handle hoReq
Variant vJsonFormData1
Handle hoJsonFormData1
Variant vJsonFormData2
Handle hoJsonFormData2
Variant vResp
Handle hoResp
Variant vSbResponseBody
Handle hoSbResponseBody
Handle hoJResp
Integer iRespStatusCode
String sTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Get Create (RefClass(cComChilkatHttpRequest)) To hoReq
If (Not(IsComObjectCreated(hoReq))) Begin
Send CreateComObject of hoReq
End
Set ComHttpVerb Of hoReq To "PATCH"
Set ComPath Of hoReq To "/v2/rooms/locations/:locationId/settings?setting_type=meeting"
Set ComContentType Of hoReq To "multipart/form-data"
Get Create (RefClass(cComChilkatJsonObject)) To hoJsonFormData1
If (Not(IsComObjectCreated(hoJsonFormData1))) Begin
Send CreateComObject of hoJsonFormData1
End
Get ComUpdateBool Of hoJsonFormData1 "upcoming_meeting_alert" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "show_alert_before_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "start_airplay_mirroring" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "start_airplay_manually" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "weekly_system_restart" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "display_meeting_list" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "display_top_banner" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "display_feedback_survey" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "auto_accept_incoming_call_and_fecc" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "hide_self_view" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "lock_speaker_volume_control" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "start_hdmi_content_share_manualy" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "auto_direct_sharing" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "voice_commands" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "transform_meeting_to_private" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "hide_id_for_private_meeting" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "auto_start_scheduled_meeting" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "auto_stop_scheduled_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "audio_device_daily_auto_test" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "support_join_3rd_party_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "encrypt_shared_screen_content" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "allow_multiple_content_sharing" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "show_non_video_participants" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "show_call_history_in_room" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "show_contact_list_on_controller" True To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "count_attendees_number_in_room" False To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "send_whiteboard_to_internal_contact_only" True To iSuccess
Get pvComObject of hoJsonFormData1 to vJsonFormData1
Get ComAddStringForUpload2 Of hoReq "zoom_rooms" "" vJsonFormData1 "utf-8" "application/json" To iSuccess
Get Create (RefClass(cComChilkatJsonObject)) To hoJsonFormData2
If (Not(IsComObjectCreated(hoJsonFormData2))) Begin
Send CreateComObject of hoJsonFormData2
End
Get ComUpdateBool Of hoJsonFormData2 "upcoming_meeting_alert" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "show_alert_before_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "start_airplay_mirroring" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "start_airplay_manually" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "weekly_system_restart" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "display_meeting_list" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "display_top_banner" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "display_feedback_survey" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "auto_accept_incoming_call_and_fecc" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "hide_self_view" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "lock_speaker_volume_control" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "start_hdmi_content_share_manualy" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "auto_direct_sharing" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "voice_commands" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "transform_meeting_to_private" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "hide_id_for_private_meeting" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "auto_start_scheduled_meeting" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "auto_stop_scheduled_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "audio_device_daily_auto_test" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "support_join_3rd_party_meeting" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "encrypt_shared_screen_content" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "allow_multiple_content_sharing" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "show_non_video_participants" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "show_call_history_in_room" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "show_contact_list_on_controller" True To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "count_attendees_number_in_room" False To iSuccess
Get ComUpdateBool Of hoJsonFormData2 "send_whiteboard_to_internal_contact_only" True To iSuccess
Get pvComObject of hoJsonFormData2 to vJsonFormData2
Get ComAddStringForUpload2 Of hoReq "meeting_security" "" vJsonFormData2 "utf-8" "application/json" To iSuccess
Send ComAddHeader To hoReq "Authorization" "Bearer <access_token>"
Get pvComObject of hoReq to vReq
Get ComSynchronousRequest Of hoHttp "api.zoom.us" 443 True vReq To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
Send CreateComObject of hoSbResponseBody
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess
Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
If (Not(IsComObjectCreated(hoJResp))) Begin
Send CreateComObject of hoJResp
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
Set ComEmitCompact Of hoJResp To False
Showln "Response Body:"
Get ComEmit Of hoJResp To sTemp1
Showln sTemp1
Get ComStatusCode Of hoResp To iRespStatusCode
Showln "Response Status Code = " iRespStatusCode
If (iRespStatusCode >= 400) Begin
Showln "Response Header:"
Get ComHeader Of hoResp To sTemp1
Showln sTemp1
Showln "Failed."
Send Destroy of hoResp
Procedure_Return
End
Send Destroy of hoResp
End_Procedure
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'zoom_rooms={"upcoming_meeting_alert":false,"show_alert_before_meeting":true,"start_airplay_mirroring":true,"start_airplay_manually":true,"weekly_system_restart":true,"display_meeting_list":false,"display_top_banner":false,"display_feedback_survey":false,"auto_accept_incoming_call_and_fecc":true,"hide_self_view":true,"lock_speaker_volume_control":true,"start_hdmi_content_share_manualy":true,"auto_direct_sharing":false,"voice_commands":true,"transform_meeting_to_private":false,"hide_id_for_private_meeting":false,"auto_start_scheduled_meeting":false,"auto_stop_scheduled_meeting":true,"audio_device_daily_auto_test":true,"support_join_3rd_party_meeting":true,"encrypt_shared_screen_content":false,"allow_multiple_content_sharing":false,"show_non_video_participants":false,"show_call_history_in_room":false,"show_contact_list_on_controller":true,"count_attendees_number_in_room":false,"send_whiteboard_to_internal_contact_only":true}'
--form 'meeting_security={"upcoming_meeting_alert":false,"show_alert_before_meeting":true,"start_airplay_mirroring":true,"start_airplay_manually":true,"weekly_system_restart":true,"display_meeting_list":false,"display_top_banner":false,"display_feedback_survey":false,"auto_accept_incoming_call_and_fecc":true,"hide_self_view":true,"lock_speaker_volume_control":true,"start_hdmi_content_share_manualy":true,"auto_direct_sharing":false,"voice_commands":true,"transform_meeting_to_private":false,"hide_id_for_private_meeting":false,"auto_start_scheduled_meeting":false,"auto_stop_scheduled_meeting":true,"audio_device_daily_auto_test":true,"support_join_3rd_party_meeting":true,"encrypt_shared_screen_content":false,"allow_multiple_content_sharing":false,"show_non_video_participants":false,"show_call_history_in_room":false,"show_contact_list_on_controller":true,"count_attendees_number_in_room":false,"send_whiteboard_to_internal_contact_only":true}{"end_to_end_encrypted_meetings":true,"encryption_type":"enhanced_encryption"}'
https://api.zoom.us/v2/rooms/locations/:locationId/settings?setting_type=meeting
Postman Collection Item JSON
{
"name": "Update location settings",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":false,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":true,\"display_meeting_list\":false,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_accept_incoming_call_and_fecc\":true,\"hide_self_view\":true,\"lock_speaker_volume_control\":true,\"start_hdmi_content_share_manualy\":true,\"auto_direct_sharing\":false,\"voice_commands\":true,\"transform_meeting_to_private\":false,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":false,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":true,\"support_join_3rd_party_meeting\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":false,\"show_non_video_participants\":false,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":false,\"send_whiteboard_to_internal_contact_only\":true}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"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 update.<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."
}
],
"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": "Update information on either meeting or alert settings applied to Zoom Rooms located in a specific location. To update **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter. Similarly, to update **Meeting Settings**, specify `meeting` 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:write:admin`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status Code:** `204` **No Content**<br>\nLocation settings updated successfully.",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":false,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":true,\"display_meeting_list\":false,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_accept_incoming_call_and_fecc\":true,\"hide_self_view\":true,\"lock_speaker_volume_control\":true,\"start_hdmi_content_share_manualy\":true,\"auto_direct_sharing\":false,\"voice_commands\":true,\"transform_meeting_to_private\":false,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":false,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":true,\"support_join_3rd_party_meeting\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":false,\"show_non_video_participants\":false,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":false,\"send_whiteboard_to_internal_contact_only\":true}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"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": "No Content",
"code": 204,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"name": "**HTTP Status Code:** `400` **Bad Request**<br><br>\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess restricted.",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":false,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":true,\"display_meeting_list\":false,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_accept_incoming_call_and_fecc\":true,\"hide_self_view\":true,\"lock_speaker_volume_control\":true,\"start_hdmi_content_share_manualy\":true,\"auto_direct_sharing\":false,\"voice_commands\":true,\"transform_meeting_to_private\":false,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":false,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":true,\"support_join_3rd_party_meeting\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":false,\"show_non_video_participants\":false,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":false,\"send_whiteboard_to_internal_contact_only\":true}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"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><br>\n**Error Code:** `4801`<br>\nLocation not found: {locationId}",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":false,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":true,\"display_meeting_list\":false,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_accept_incoming_call_and_fecc\":true,\"hide_self_view\":true,\"lock_speaker_volume_control\":true,\"start_hdmi_content_share_manualy\":true,\"auto_direct_sharing\":false,\"voice_commands\":true,\"transform_meeting_to_private\":false,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":false,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":true,\"support_join_3rd_party_meeting\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":false,\"show_non_video_participants\":false,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":false,\"send_whiteboard_to_internal_contact_only\":true}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"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": ""
}
]
}