r80 api notes
From cpwiki.net
Contents |
examples
logging in
login and redirect session info to a file for reuse
# mgmt_cli login user admin > id.txt
search existing object
search objects by IP
# mgmt_cli -s id.txt show objects filter "10.0.0.0" ip-only true --format json | jq '.objects[] | {name: .name, subnet: .subnet4, mask: ."mask-length4"}'
links
parsing json return output [phttps://stedolan.github.io/jq/ jq]