...
Code Block | ||
---|---|---|
| ||
/interface/print ?type=ether ?type=vlan ?#|! |
For example, lets combine 'query' and 'proplist', to return '.id' , 'address' , and 'interface' properties for all dynamic records and records with the network 192.168.111.111
Code Block | ||||
---|---|---|---|---|
| ||||
$ curl -k -u admin: -X POST https://10.155.101.214/rest/ip/address/print \
--data '{"_proplist": [".id","address","interface"], "_query": ["network=192.168.111.111","dynamic=true","#|"]}'\
-H "content-type: application/json"
[{".id":"*8","address":"10.155.101.214/24","interface":"sfp12"},
{".id":"*A","address":"192.168.111.111/32","interface":"dummy"}] |
Timeout
If the command runs indefinitely, it will timeout and the connection will be closed with an error. To avoid timeout errors, add a parameter that would sufficiently limit the command execution time. For example, to limit the number of pings, add count parameter:
...