In the JSON of an access rulebase, a rule's source, service and action fields contain only long UIDs like 97aeb369-9aea-11d5-bd16-0090272ccb30. How do you find out what they mean?
Look each UID up in the objects-dictionary that the same response contains: it lists every referenced object (host, network, service, action, "Any") once, with its name and type.
With use_object_dictionary: true, the API keeps the rule list compact: each rule only references objects by UID, and every object that any rule uses is described once in objects-dictionary. Reading a rule is a join:
- Take the UID from the rule, for example in
service. - Find the entry with that
uidinobjects-dictionary. - Its
nameandtypeare what SmartConsole shows in that cell.
Some UIDs come up again and again, such as the built-in Any object and the actions Accept and Drop. A rule's other fields are readable directly: name, rule-number, enabled, source-negate, track (logging), and with show_hits the hits counter.
To make sense of a large response, fold away objects-dictionary first and read the first entry under rulebase (sections contain their rules), then compare it with the same row in SmartConsole's Security Policies view. A JSON formatter or viewer that collapses nested objects makes this much easier.
* Rules point to objects by UID; the dictionary turns the UIDs back into names. *
Go deeper:
cp_mgmt_access_rule_facts module (Ansible docs) —
use_object_dictionary,details_leveland the return structure.JSON (Wikipedia) — objects, arrays and nesting, for reading large responses.