Using json_path to filter an attribute of an element

You can use the json_path query parameter to return only the specified attribute of an element.

Example: The following command:

GET http://localhost:8082/7.1/elements/alias/1672?json_path=.name

Returns only the name attribute of the element:

[
  "$ SMTP_SERVERS"
],

Example: The following command:

GET http://localhost:8082/7.1/elements/single_fw/1649?json_path=$.physicalInterfaces..physical_interface[?(@.interface_id == 0)]

Returns only the physical interface with interface ID 0:

[
  {
"aggregate_mode": "none",
"arp_entry": [],
"cvi_mode": "none",
"dhcp_server_on_interface": {
"default_lease_time": 7200,
"dhcp_range_per_node": [],
},
"duplicate_address_detection": true,
...