Tenants - Gateways
The Tenant's Gateways endpoint allows users to search gateways available to the authorized tenant, sorted alphabetically based on the name of Gateway.
Argument | Description |
---|---|
tenant_id boolean | (required) The unique identifier of the Tenant object to be retrieved |
reverse boolean | (optional) Results order can be reversed by adding the ?reverse=true parameter |
GET /1/tenants/{tenant_id}/gateways
Host: https://api.cogniac.io
Example: List Tenant's Gateways
curl -X GET https://api.cogniac.io/1/tenants/current/gateways \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"
import requests
my_headers = {"Authorization":"Bearer abcdefg.hijklmnop.qrstuvwxyz"}
resp = requests.get("https://api.cogniac.io/1/tenants/current/gateways",
headers=my_headers)
{
"data": [
{
"gateway_id": "Ajr2t45p",
"location": "cogniac-hq",
"poll_interval": 20,
"name": "test gateway ",
"description": "test gateway at cogniac",
"created_at": 1463179215.124683,
"modified_at": 1463179215.124683,
"tenant_id": "rt06diepwc3i",
"created_by": "[email protected]",
"ip_address": "127.0.0.1",
"mac_address": "7993a639543a",
"serial_number": "ZX0C9EE0-E021-82D3-BB0A-3437F681E41E",
"current_status" : {"platform": {"gpu": {"mem_used": 20,
"temperature": "78",
"utilization" : "3"},
"sys_mem":{"available": 11773067264,
"total": 16735567872,
"percent_used": 29.7,
"free": 10092732416},
"disk": {"total": 100933414912,
"percent": 21.9,
"free": 74787176448,
"used": 20995424256},
"cpu": {"idle": 46.9,
"user": 45.8,
"system": 7.1},
"network":{"bytes_tx": 20400476948,
"bytes_rx": 560034409582,
"errors": 0, "drops": 0}},
"timestamp" : 1490979881.0626523,
"cameras":{"X8RGSUBm": {"rxframes": 885,
"url": "rtsp://localhost:554",
"queue_full": 0, "nospace": 0,
"last_rxframe": 1488505554,
"badframes": 4}},
"cloud_connectivity": True,
"local_disk_cache": {"free": 84823769088,
"percent": 11.4,
"total": 100933414912,
"used": 10958831616},
"image_cache": {"total": 100933414912,
"percent": 21.9,
"free": 74776092672,
"used": 21006508032}},
"previous_status" : {"platform": {"gpu": {"mem_used": 20,
"temperature": "75",
"utilization" : "3"},
"sys_mem": {"available": 11773067264,
"total": 16735567872,
"percent_used": 22.7,
"free": 10092732416},
"disk": {"total": 100933414912,
"percent": 21.9,
"free": 74787176418,
"used": 20995424256},
"cpu": {"idle": 46.9,
"user": 45.8,
"system": 7.1},
"network":{"bytes_tx": 20400476908,
"bytes_rx": 560034409182,
"errors": 0, "drops": 0}},
"timestamp" : 1490979871.0626523,
"cameras":{"X8RGSUBm": {"rxframes": 705,
"url": "rtsp://localhost:554",
"queue_full": 0, "nospace": 0,
"last_rxframe": 1488505554,
"badframes": 4}},
"cloud_connectivity": True,
"local_disk_cache": {"free": 84823769088,
"percent": 11.4,
"total": 100933414912,
"used": 10958831616},
"image_cache": {"total": 100933414912,
"percent": 21.9,
"free": 74776092672,
"used": 21006508032}}
},
{
//Next Gateway object Object ...
}
]
}
Updated over 6 years ago