Chilkat Online Tools

TCL / Zoom API / Update a H.323/SIP device

Back to Collection Items

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

set req [new_CkHttpRequest]

CkHttpRequest_put_HttpVerb $req "PATCH"
CkHttpRequest_put_Path $req "/v2/h323/devices/:deviceId"
CkHttpRequest_put_ContentType $req "multipart/form-data"
CkHttpRequest_AddParam $req "lab" ""

CkHttpRequest_AddParam $req "protocol" "labH.323"

CkHttpRequest_AddParam $req "ip" "labH.323irure ea voluptate eiusmod amet"

CkHttpRequest_AddParam $req "encryption" "labH.323irure ea voluptate eiusmod ametyes"

CkHttpRequest_AddHeader $req "Authorization" "Bearer <access_token>"

# resp is a CkHttpResponse
set resp [CkHttp_SynchronousRequest $http "api.zoom.us" 443 1 $req]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkHttpRequest $req
    exit
}

set respStatusCode [CkHttpResponse_get_StatusCode $resp]
puts "Response Status Code = $respStatusCode"
if {$respStatusCode != 204} then {
    puts "Response Header:"
    puts [CkHttpResponse_header $resp]
    puts "Response Body:"
    puts [CkHttpResponse_bodyStr $resp]
    puts "Failed."
    delete_CkHttpResponse $resp

    delete_CkHttp $http
    delete_CkHttpRequest $req
    exit
}

delete_CkHttpResponse $resp

puts "Success."

delete_CkHttp $http
delete_CkHttpRequest $req

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'name=lab'
	--form 'protocol=labH.323'
	--form 'ip=labH.323irure ea voluptate eiusmod amet'
	--form 'encryption=labH.323irure ea voluptate eiusmod ametyes'
https://api.zoom.us/v2/h323/devices/:deviceId

Postman Collection Item JSON

{
  "name": "Update a H.323/SIP device",
  "request": {
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "name",
          "value": "lab",
          "description": "(Required) Device name.",
          "type": "text"
        },
        {
          "key": "protocol",
          "value": "H.323",
          "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
          "type": "text"
        },
        {
          "key": "ip",
          "value": "irure ea voluptate eiusmod amet",
          "description": "(Required) Device IP.",
          "type": "text"
        },
        {
          "key": "encryption",
          "value": "yes",
          "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/h323/devices/:deviceId",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "h323",
        "devices",
        ":deviceId"
      ],
      "variable": [
        {
          "key": "deviceId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The device ID."
        }
      ]
    },
    "description": "A H.323 or SIP device can make a video call to a [Room Connector](https://support.zoom.us/hc/en-us/articles/201363273-Getting-Started-With-H-323-SIP-Room-Connector) to join a Zoom cloud meeting. A Room Connector can also call out to a H.323 or SIP device to join a Zoom cloud meeting. Use this API to edit information of a H.323/SIP device from your Zoom account.<br><br>\n**Scopes:** `h323:write:admin`<br>\n <br>\n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204`<br>\nH.323/SIP device updated.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices/:deviceId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices",
            ":deviceId"
          ],
          "variable": [
            {
              "key": "deviceId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The device ID."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**Error Code:** `300`<br>\nH.323 Device does not exist: {deviceId}.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices/:deviceId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices",
            ":deviceId"
          ],
          "variable": [
            {
              "key": "deviceId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The device ID."
            }
          ]
        }
      },
      "status": "Multiple Choices",
      "code": 300,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `2020`<br>\nH.323 device's display name:{displayName} is already in use.\n",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices/:deviceId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices",
            ":deviceId"
          ],
          "variable": [
            {
              "key": "deviceId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The device ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}