Получение списка Edges
Запрос:
{ "jsonrpc": "2.0", "method": "edge-list", "id": "d11b3898-3ae7-11ec-9e10-abc57ed49235" }
Ответ:
{ "id" : "d11b3898-3ae7-11ec-9e10-abc57ed49235", "jsonrpc" : "2.0", "result" : { "code" : 1, "data" : { "d57aede6-3ae4-11ec-b428-a6817c1fefc2" : { "modified" : 1635751506, "ports" : { "101" : { "address" : "10.78.27.27", "ifname" : 1329, "ratelimit_mbits": 512 }, "161" : { "address" : "192.168.1.1", "ifname" : 1330, "ratelimit_mbits": null }, "162" : { "address" : "192.168.2.1", "ifname" : 1331, "ratelimit_mbits": null } } } } } }
Ответ по-умолчанию является словарём с ключём по идентификатору сети, что может быть неудобно для Edge, имеющего несколько портов из одной сети. В таком случае предусмотрен альтернативный вариант ответа со словарём по идентификатору порта:
Запрос:
{ "jsonrpc": "2.0", "method": "edge-list", "id": "43a0a0f0-5f5f-11ed-8ccd-1d2cafb91e77", "params": { "port_based": 1 } }
Ответ:
{ "id": "43a0a0f0-5f5f-11ed-8ccd-1d2cafb91e77", "jsonrpc": "2.0", "result": { "code": 1, "data": { "19b598bc-3a62-11ed-908c-9669add6c48b": { "deploy_ts": 1666612956, "modified": 1663842854, "oper_progress": 100, "oper_status": 3, "oper_ts": 1666612927, "ports": { "1988": { "address": "10.78.27.18", "ifname": 1988, "network_id": 101, "port_id": 1988, "ratelimit_mbits": 656, "slot": 5 } } }, "32f1b594-af71-11ec-b0be-fb3527393d6c": { "deploy_ts": 1667462844, "modified": 1648566127, "oper_progress": 100, "oper_status": 3, "oper_ts": 1667462821, "ports": { "1662": { "address": "10.78.27.120", "ifname": 1662, "network_id": 101, "port_id": 1662, "ratelimit_mbits": 444, "slot": 5 }, "1663": { "address": "10.100.200.32", "ifname": 1663, "network_id": 102, "port_id": 1663, "ratelimit_mbits": null, "slot": 6 } } }, "3c2f29dc-a514-11ec-add7-4cf432155ec3": { "deploy_ts": null, "modified": 1647426688, "oper_progress": 100, "oper_status": 3, "oper_ts": 1666164409, "ports": { "1612": { "address": "0.9.1.7", "ifname": 1612, "network_id": 10, "port_id": 1612, "ratelimit_mbits": null, "slot": 5 } } }, "489dcc8c-5f36-11ed-9c00-049baed6c48b": { "deploy_ts": 1667892254, "modified": 1667892227, "oper_progress": 100, "oper_status": 1, "oper_ts": 1667892549, "ports": { "2147": { "address": "10.78.27.236", "ifname": 2147, "network_id": 101, "port_id": 2147, "ratelimit_mbits": null, "slot": 5 }, "2150": { "address": "10.78.27.238", "ifname": 2150, "network_id": 101, "port_id": 2150, "ratelimit_mbits": null, "slot": 8 } } }, "56765234-bb03-11ec-9af8-86859b02e7cd": { "deploy_ts": null, "modified": 1649838356, "oper_progress": 100, "oper_status": 3, "oper_ts": 1662020406, "ports": { "1691": { "address": "10.78.27.128", "ifname": 1691, "network_id": 101, "port_id": 1691, "ratelimit_mbits": null, "slot": 5 }, "1692": { "address": "10.100.200.34", "ifname": 1692, "network_id": 102, "port_id": 1692, "ratelimit_mbits": null, "slot": 6 } } }, "649eab30-5ac3-11ed-a5bf-8adcaed6c48b": { "deploy_ts": 1667403104, "modified": 1667403078, "oper_progress": 100, "oper_status": 1, "oper_ts": 1667891453, "ports": { "2123": { "address": "10.78.27.197", "ifname": 2123, "network_id": 101, "port_id": 2123, "ratelimit_mbits": null, "slot": 5 }, "2144": { "address": "10.20.30.1", "ifname": 2144, "network_id": 213, "port_id": 2144, "ratelimit_mbits": null, "slot": 6 }, "2145": { "address": "10.10.10.3", "ifname": 2145, "network_id": 199, "port_id": 2145, "ratelimit_mbits": null, "slot": 7 } } }, "67e97070-5aac-11ed-a5bf-8adcaed6c48b": { "deploy_ts": 1667393232, "modified": 1667393205, "oper_progress": 100, "oper_status": 1, "oper_ts": 1667393329, "ports": { "2099": { "address": "10.78.27.3", "ifname": 2099, "network_id": 156, "port_id": 2099, "ratelimit_mbits": null, "slot": 5 }, "2100": { "address": "10.78.27.195", "ifname": 2100, "network_id": 101, "port_id": 2100, "ratelimit_mbits": null, "slot": 6 }, "2101": { "address": "10.78.27.4", "ifname": 2101, "network_id": 156, "port_id": 2101, "ratelimit_mbits": null, "slot": 7 }, "2102": { "address": "10.0.0.6", "ifname": 2102, "network_id": 136, "port_id": 2102, "ratelimit_mbits": null, "slot": 8 } } }, "70ad8b32-a513-11ec-add7-4cf432155ec3": { "deploy_ts": null, "modified": 1647426346, "oper_progress": 100, "oper_status": 11, "oper_ts": 1660849005, "ports": { "1610": { "address": "0.9.1.5", "ifname": 1610, "network_id": 10, "port_id": 1610, "ratelimit_mbits": null, "slot": 5 } } }, "72422058-af67-11ec-b0be-fb3527393d6c": { "deploy_ts": 1666164428, "modified": 1648561938, "oper_progress": 100, "oper_status": 3, "oper_ts": 1666164406, "ports": { "1657": { "address": "10.78.27.118", "ifname": 1657, "network_id": 101, "port_id": 1657, "ratelimit_mbits": null, "slot": 5 } } }, "8bca92d6-5ac4-11ed-a5bf-8adcaed6c48b": { "deploy_ts": 1667403599, "modified": 1667403573, "oper_progress": 100, "oper_status": 3, "oper_ts": 1667403574, "ports": { "2125": { "address": "10.78.27.198", "ifname": 2125, "network_id": 101, "port_id": 2125, "ratelimit_mbits": null, "slot": 5 } } }, "9d31e006-5b46-11ed-a5bf-8adcaed6c48b": { "deploy_ts": 1667459463, "modified": 1667459437, "oper_progress": 100, "oper_status": 3, "oper_ts": 1667459438, "ports": { "2137": { "address": "10.78.27.203", "ifname": 2137, "network_id": 101, "port_id": 2137, "ratelimit_mbits": null, "slot": 5 } } }, "a416890c-13fd-11ed-a0e2-f6efab4ed898": { "deploy_ts": null, "modified": 1659621562, "oper_progress": 100, "oper_status": 3, "oper_ts": 1662018998, "ports": { "1900": { "address": "10.10.10.1", "ifname": 1900, "network_id": 199, "port_id": 1900, "ratelimit_mbits": null, "slot": 5 }, "1901": { "address": "10.78.27.231", "ifname": 1901, "network_id": 101, "port_id": 1901, "ratelimit_mbits": null, "slot": 6 } } }, "a6af994e-a515-11ec-add7-4cf432155ec3": { "deploy_ts": null, "modified": 1647427296, "oper_progress": 100, "oper_status": 3, "oper_ts": 1662020406, "ports": { "1626": { "address": "172.16.17.3", "ifname": 1626, "network_id": 148, "port_id": 1626, "ratelimit_mbits": null, "slot": 5 } } }, "cef7b62a-b73a-11ec-af40-233c7114e0ab": { "deploy_ts": null, "modified": 1649422376, "oper_progress": 100, "oper_status": 3, "oper_ts": 1662020406, "ports": { "1675": { "address": "10.78.27.126", "ifname": 1675, "network_id": 101, "port_id": 1675, "ratelimit_mbits": 0, "slot": 5 }, "1676": { "address": "172.17.17.1", "ifname": 1676, "network_id": 172, "port_id": 1676, "ratelimit_mbits": null, "slot": 6 }, "1677": { "address": "10.100.200.1", "ifname": 1677, "network_id": 173, "port_id": 1677, "ratelimit_mbits": null, "slot": 7 } } }, "ee46e364-a3cd-11ec-add7-4cf432155ec3": { "deploy_ts": 1666164447, "modified": 1647286541, "oper_progress": 100, "oper_status": 3, "oper_ts": 1666164416, "ports": { "1596": { "address": "10.78.27.64", "ifname": 1596, "network_id": 101, "port_id": 1596, "ratelimit_mbits": 500, "slot": 5 }, "1597": { "address": "10.120.200.1", "ifname": 1597, "network_id": 168, "port_id": 1597, "ratelimit_mbits": null, "slot": 6 } } } } } }