Get network objects by Device
Gets network objects based on the specified device tree name. It allows you to search for objects and provides various filtering options.
Resource name: /api/v1/networkObject/search/{deviceTreeName}/objects
Request Method: GET
Request parameters:
Parameter | Data Type | Description |
---|---|---|
deviceTreeName mandatory |
string |
Tree name of the device. (To get the entity name for a device or group, see Device names in the ASMS APIs |
excludeObjectTypes | boolean |
Determines whether to exclude internal object types from the search.
|
hierarchyMode | string |
For Panorama and Juniper Space: The mode of hierarchy to consider during the object search. Available options:
|
objectNames | array of strings | A list of object names to search for. |
objectTypes | string |
The type of objects to search for. Available options include:
|
cURL example:
curl -X GET "https://<localhost>/api/v1/networkObject/search/deviceTree1/objects?excludeObjectTypes=true&hierarchyMode=HYBRID&objectNames[]=peacock&objectNames[]=parrot&objectTypes=device" -H
Status codes:
Code | Description |
---|---|
200 | OK - The request was successful. |
400 | Bad Request |
403 | Forbidden |
Response parameters:
Parameter | Data Type | Description |
---|---|---|
canonizedName | string | The canonized name (friendly name - special characters are removed) of the network object. |
ipType | string | The type of IP address. Possible values are: 'Null', IPv4, IPv6, mixed. |
ipaddresses | array of strings | The IP addresses associated with the network object. |
members | array of strings | The members associated with the network object. |
name | string | The name of the network object. |
objectInternalType | string | The internal type of the network object. Possible values are: Device, Cisco_Inline, Cisco_Names, Cisco_Interface, Cisco_Ranged_Name, Cisco_tcp_udp, external_epg, CheckPoint_network, internal_default, Cisco_all_tcp_udp, Cisco_tcp_udp is_old_syntax=yes, Cisco_all_tcp_udp_icmp, Cisco_range_port, F5_LTM_Device, F5_LTM_Dynamic, stretched_epg, shadow_epg, outer_epg, esg, outer_esg, identity, predefined, NAT, Dynamic, URL_Category. |
originalName | string | The original name (name from the device) of the network object. |
Response example (success 200):
[ { "canonizedName": "Object 1", "ipType": "IPv4", "ipaddresses": [ "192.168.1.1", "192.168.1.2" ], "members": [ "Member 1", "Member 2" ], "name": "Object 1", "objectInternalType": "Device", "originalName": "Object 1" }, { "canonizedName": "Object 2", "ipType": "IPv6", "ipaddresses": [ "2001:0db8:85a3:0000:0000:8a2e:0370:7334" ], "members": [ "Member 3" ], "name": "Object 2", "objectInternalType": "Cisco_Inline", "originalName": "Object 2" } ]
Response example (failure 400):
{ "message": "Bad Request - Invalid parameters." }