Retrieve network objects in device
Searches the network objects in a device. You can specify whether to return either the object's canonized name or its original name.
Resource name: /api/v1/networkObject/search/findByOriginalOrCanonizedNamesAndDevicesMapping
Request method: POST
Request parameters:
| Parameter | Type | Description |
|---|---|---|
|
deviceName mandatory |
string |
Tree name of the device. (To get the entity name for a device or group, see Device names in the ASMS APIs |
|
objectNetworkNames mandatory |
array of strings | Array of Network object original names. To get the network object original name, use GET /networkObject/search/findByOriginalNameContaining method from the Network Objects Resource Group. |
|
returnCanonizedName mandatory |
boolean |
Determines whether to return canonized or original names.
Note : Canonized name is the same as original name except that it uses '_' instead of ' ' and other special characters. For example:
|
Request example:
{
"devicesNames": ["device1", "device2"],
"objectNetworkNames": ["object1", "object2"],
"returnCanonizedName": true
}
cUrl Example:
curl -X POST "http://<localhost>:8080/api/v1/networkObject/search/findByOriginalOrCanonizedNamesAndDevicesMapping" -H "accept: */*" -H "Content-Type: application/json" -d "{\"devicesNames\":[\"device1\",\"device2\"],\"objectNetworkNames\":[\"object1\",\"object2\"],\"returnCanonizedName\":true}"
Status codes:
| Code | Description |
|---|---|
| 200 | OK. Successful execution of the request. |
| 400 | Forbidden. The session does not have permissions. |
Response parameters:
| Parameter | Type | Description |
|---|---|---|
| object | Name of the object objectNetworkNames. | |
| deviceMap | object | Mapping of devices to their network objects. |
| Additional Properties | object | Additional Properties of the traffic object. |
| dynamicNameToValues | array of strings | Dynamic names to their respective values. |
| internalType | string (enum) | The internal type of the device or network object. |
| values | array of strings | The values of the network objects. |
| cause | object | Cause of the exception. |
| localizedMessage | string | Localized message of the throwable. |
| message | string | Message of the throwable. |
| stackTrace | array | Stack trace of the throwable. |
| classLoaderName | string | Name of the class loader. |
| className | string | Name of the class. |
| fileName | string | Name of the file. |
| lineNumber | integer | Line number in the code. |
| methodName | string | Name of the method. |
| moduleName | string | Name of the module. |
| moduleVersion | string | Version of the module. |
| nativeMethod | boolean | Indicates if it's a native method. |
| suppressed | array | Suppressed throwables. |
| empty | boolean | Indicates if the name is empty. |
| explanation | string | Explanation of the exception. |
| localizedMessage | string | Localized message of the exception. |
| message | string | Message of the exception. |
| remainingName | object | Remaining name after the exception. |
| resolvedName | object | Resolved name after the exception. |
| resolvedObj | object | Resolved object after the exception. |
| rootCause | object | Root cause of the exception. |
| stackTrace | array | Stack trace of the exception. |
| suppressed | array | Suppressed exceptions. |
Response example success 200:
{
"object1": {
"deviceMap": {
"device1": {
"dynamicNameToValues": {"www.google.com" :["8.8.8.8"]},
"internalType": "Dynamic",
"values": ["1.1.1.1", "8.8.8.8"]
},
"device2": {
"dynamicNameToValues": {},
"internalType": "Device",
"values": ["10.20.30.40", "40.30.20.10"]
}, "object2": {
"deviceMap": {
}
}
}
Response example failure 403:
{
"cause": {
"cause": {},
"localizedMessage": "No Permission",
"message": "No Permission",
"stackTrace": [],
"suppressed": []
},
"explanation": "The user does not have permission to access the requested resource.",
"localizedMessage": "No Permission",
"message": "No Permission",
"remainingName": {
"all": {},
"empty": true
},
"resolvedName": {
"all": {},
"empty": true
},
"resolvedObj": {},
"rootCause": {
"cause": {},
"localizedMessage": "No Permission",
"message": "No Permission",
"stackTrace": [],
"suppressed": []
},
"stackTrace": [],
"suppressed": []
}