delphiAx / Zoom API / Update a Zoom Room profile
Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
req: TChilkatHttpRequest;
jsonFormData1: TChilkatJsonObject;
resp: IChilkatHttpResponse;
sbResponseBody: TChilkatStringBuilder;
jResp: TChilkatJsonObject;
respStatusCode: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := TChilkatHttp.Create(Self);
req := TChilkatHttpRequest.Create(Self);
req.HttpVerb := 'PATCH';
req.Path := '/v2/rooms/:roomId';
req.ContentType := 'multipart/form-data';
jsonFormData1 := TChilkatJsonObject.Create(Self);
jsonFormData1.UpdateString('name','ut in');
jsonFormData1.UpdateString('support_email','YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv');
jsonFormData1.UpdateString('support_phone','minim ut sunt');
jsonFormData1.UpdateString('room_passcode','cons');
jsonFormData1.UpdateBool('required_code_to_ext',0);
jsonFormData1.UpdateBool('hide_room_in_contacts',0);
req.AddStringForUpload2('basic','',jsonFormData1.ControlInterface,'utf-8','application/json');
req.AddHeader('Authorization','Bearer <access_token>');
resp := http.SynchronousRequest('api.zoom.us',443,1,req.ControlInterface);
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
sbResponseBody := TChilkatStringBuilder.Create(Self);
resp.GetBodySb(sbResponseBody.ControlInterface);
jResp := TChilkatJsonObject.Create(Self);
jResp.LoadSb(sbResponseBody.ControlInterface);
jResp.EmitCompact := 0;
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(jResp.Emit());
respStatusCode := resp.StatusCode;
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(resp.Header);
Memo1.Lines.Add('Failed.');
Exit;
end;
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'basic={"name":"ut in","support_email":"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv","support_phone":"minim ut sunt","room_passcode":"cons","required_code_to_ext":false,"hide_room_in_contacts":false}'
https://api.zoom.us/v2/rooms/:roomId
Postman Collection Item JSON
{
"name": "Update a Zoom Room profile",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
},
"description": "Update basic information on a specific Zoom Room in a Zoom account.<br>\n\n**Prerequisites:**<br>\n* Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<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>\nRoom Profile information updated successfully.\n",
"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\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"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.<br><br>\n\n",
"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\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"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:** `1012`<br>\nRoom not found:{roomId}\n",
"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\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}