DataFlex / Zoom API / Update Zoom Room location profile
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vReq
Handle hoReq
Variant vJsonFormData1
Handle hoJsonFormData1
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"
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 ComUpdateString Of hoJsonFormData1 "name" "nulla ex" To iSuccess
Get ComUpdateString Of hoJsonFormData1 '"description "' "tempor aute esse" To iSuccess
Get ComUpdateString Of hoJsonFormData1 "timezone" "ullamco adipisicing" To iSuccess
Get ComUpdateString Of hoJsonFormData1 "address" "elit dolor laborum" To iSuccess
Get ComUpdateString Of hoJsonFormData1 "support_email" "rjaufhdQp@rmDcNdJjULbWbatHJEWThNonzYiPKxO.qq" To iSuccess
Get ComUpdateString Of hoJsonFormData1 "support_phone" "aliqua ut Excepteur ullamco" To iSuccess
Get ComUpdateString Of hoJsonFormData1 "room_passcode" "reprehende" To iSuccess
Get ComUpdateBool Of hoJsonFormData1 "required_code_to_ext" False To iSuccess
Get pvComObject of hoJsonFormData1 to vJsonFormData1
Get ComAddStringForUpload2 Of hoReq "basic" "" vJsonFormData1 "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 'basic={"name":"nulla ex","description ":"tempor aute esse","timezone":"ullamco adipisicing","address":"elit dolor laborum","support_email":"rjaufhdQp@rmDcNdJjULbWbatHJEWThNonzYiPKxO.qq","support_phone":"aliqua ut Excepteur ullamco","room_passcode":"reprehende","required_code_to_ext":false}'
https://api.zoom.us/v2/rooms/locations/:locationId
Postman Collection Item JSON
{
"name": "Update Zoom Room location profile",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"nulla ex\",\"description \":\"tempor aute esse\",\"timezone\":\"ullamco adipisicing\",\"address\":\"elit dolor laborum\",\"support_email\":\"rjaufhdQp@rmDcNdJjULbWbatHJEWThNonzYiPKxO.qq\",\"support_phone\":\"aliqua ut Excepteur ullamco\",\"room_passcode\":\"reprehende\",\"required_code_to_ext\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId"
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of the location. This can be retrieved from the [List Zoom Room Locations](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) API."
}
]
},
"description": "Each location type of the [Zoom Rooms location hierarchy](https://support.zoom.us/hc/en-us/articles/115000342983-Zoom-Rooms-Location-Hierarchy) has a profile page that includes information such as name of the location, address, support email, etc. Use this API to update information about a specific Zoom Rooms location type such as information about the city where the Zoom Rooms is located.\n\n**Prerequisite:**<br>\n* Account owner or admin permission\n* Zoom Rooms version 4.0 or higher<br>\n**Scopes:** `room:write:admin`<br> \n\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "Untitled Example",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"nulla ex\",\"description \":\"tempor aute esse\",\"timezone\":\"ullamco adipisicing\",\"address\":\"elit dolor laborum\",\"support_email\":\"rjaufhdQp@rmDcNdJjULbWbatHJEWThNonzYiPKxO.qq\",\"support_phone\":\"aliqua ut Excepteur ullamco\",\"room_passcode\":\"reprehende\",\"required_code_to_ext\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/locations/:locationId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
"locations",
":locationId"
],
"variable": [
{
"key": "locationId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of the location. This can be retrieved from the [List Zoom Room Locations](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/listzrlocations) API."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
}
]
}