Ruby / Zoom API / List Zoom Room locations
Back to Collection Items
require 'chilkat'
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = Chilkat::CkHttp.new()
queryParams = Chilkat::CkJsonObject.new()
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.put_AuthToken("<access_token>")
# resp is a CkHttpResponse
resp = http.QuickRequestParams("GET","https://api.zoom.us/v2/rooms/locations",queryParams)
if (http.get_LastMethodSuccess() == false)
print http.lastErrorText() + "\n";
exit
end
sbResponseBody = Chilkat::CkStringBuilder.new()
resp.GetBodySb(sbResponseBody)
jResp = Chilkat::CkJsonObject.new()
jResp.LoadSb(sbResponseBody)
jResp.put_EmitCompact(false)
print "Response Body:" + "\n";
print jResp.emit() + "\n";
respStatusCode = resp.get_StatusCode()
print "Response Status Code = " + respStatusCode.to_s() + "\n";
if (respStatusCode >= 400)
print "Response Header:" + "\n";
print resp.header() + "\n";
print "Failed." + "\n";
exit
end
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": ""
}
]
}