Chilkat Online Tools

VB.NET / Zoom API / List Zoom Room locations

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

Dim queryParams As New Chilkat.JsonObject
queryParams.UpdateString("parent_location_id","quis officia in reprehenderit")
queryParams.UpdateString("type","quis officia in reprehenderit")
queryParams.UpdateInt("page_size",30)
queryParams.UpdateString("next_page_token","quis officia in reprehenderit")

' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"


Dim resp As Chilkat.HttpResponse = http.QuickRequestParams("GET","https://api.zoom.us/v2/rooms/locations",queryParams)
If (http.LastMethodSuccess = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Dim sbResponseBody As New Chilkat.StringBuilder
resp.GetBodySb(sbResponseBody)

Dim jResp As New Chilkat.JsonObject
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

Debug.WriteLine("Response Body:")
Debug.WriteLine(jResp.Emit())

Dim respStatusCode As Integer = resp.StatusCode
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode >= 400) Then
    Debug.WriteLine("Response Header:")
    Debug.WriteLine(resp.Header)
    Debug.WriteLine("Failed.")

    Exit Sub
End If


Curl Command

curl -G -d "parent_location_id=quis%20officia%20in%20reprehenderit"
	-d "type=quis%20officia%20in%20reprehenderit"
	-d "page_size=30"
	-d "next_page_token=quis%20officia%20in%20reprehenderit"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/rooms/locations

Postman Collection Item JSON

{
  "name": "List Zoom Room locations",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/rooms/locations?parent_location_id=quis officia in reprehenderit&type=quis officia in reprehenderit&page_size=30&next_page_token=quis officia in reprehenderit",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "rooms",
        "locations"
      ],
      "query": [
        {
          "key": "parent_location_id",
          "value": "quis officia in reprehenderit",
          "description": "A unique identifier of the parent location. For instance, if a Zoom Room is located in Floor 1 of Building A, the location of Building A will be the parent location of Floor 1. Use this parameter to filter the response by a specific location hierarchy level."
        },
        {
          "key": "type",
          "value": "quis officia in reprehenderit",
          "description": "Use this field to filter the response by the type of location. The value can be one of the following:\n`country`, `states`, `city`, `campus`, `building`, `floor`. "
        },
        {
          "key": "page_size",
          "value": "30",
          "description": "The number of records returned within a single API call."
        },
        {
          "key": "next_page_token",
          "value": "quis officia in reprehenderit",
          "description": "The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes."
        }
      ]
    },
    "description": "A Zoom account owner or a Zoom Room administrator can establish a [location hierarchy](https://support.zoom.us/hc/en-us/articles/115000342983-Zoom-Rooms-Location-Hierarchy) to help manage Zoom Rooms that are spread among a variety of locations. Use this API to list the different location types used for Zoom Rooms in an account.<br><br>\n**Prerequisites:**\n* Account owner or admin permissions.\n* Zoom Rooms Version 4.0 or higher<br><br>\n**Scopes:** `room:read:admin`<br> \n \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 locations listed successfully.\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/locations?parent_location_id=quis officia in reprehenderit&type=quis officia in reprehenderit&page_size=30&next_page_token=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "locations"
          ],
          "query": [
            {
              "key": "parent_location_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "\"{\\n  \\\"page_size\\\": 30,\\n  \\\"next_page_token\\\": \\\"\\\",\\n  \\\"locations\\\": [\\n    {\\n      \\\"id\\\": \\\"AAAAAAAAAA\\\",\\n      \\\"name\\\": \\\"Country/Region1\\\",\\n      \\\"parent_location_id\\\": \\\"I-qsfdUbbbbg\\\",\\n      \\\"type\\\": \\\"country\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"BBBBBBBB\\\",\\n      \\\"name\\\": \\\"State1\\\",\\n      \\\"parent_location_id\\\": \\\"AAAAAAAAAA\\\",\\n      \\\"type\\\": \\\"state\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"ccccddddd,\\n      \\\"name\\\": \\\"City1\\\",\\n      \\\"parent_location_id\\\": \\\"BBBBBBBB\\\",\\n      \\\"type\\\": \\\"city\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"fgaajfjfhgjgjgjg\\\",\\n      \\\"name\\\": \\\"Campus1\\\",\\n      \\\"parent_location_id\\\": \\\"ccccddddd,\\n      \\\"type\\\": \\\"campus\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"YQGK12344\\\",\\n      \\\"name\\\": \\\"Building1\\\",\\n      \\\"parent_location_id\\\": \\\"fgaajfjfhgjgjgjg\\\",\\n      \\\"type\\\": \\\"building\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"uUbbbbbbbb\\\",\\n      \\\"name\\\": \\\"Floor1\\\",\\n      \\\"parent_location_id\\\": \\\"YQGK12344\\\",\\n      \\\"type\\\": \\\"floor\\\"\\n    }\\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>\n**Error Code:** `300`<br>\nLocation type not exist.<br>\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/locations?parent_location_id=quis officia in reprehenderit&type=quis officia in reprehenderit&page_size=30&next_page_token=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "locations"
          ],
          "query": [
            {
              "key": "parent_location_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "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>\n Location not found:{parent_location_id}.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/locations?parent_location_id=quis officia in reprehenderit&type=quis officia in reprehenderit&page_size=30&next_page_token=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "locations"
          ],
          "query": [
            {
              "key": "parent_location_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}