Get NAT rules information
Get NAT rules information for a specified device or group of devices.
Resource Name:
Request Method: GET
Request Query Parameters:
Element |
Type |
Description |
---|---|---|
entityTreeName Mandatory |
string |
Tree name of the entity. Note: To get the device tree name, use the 'GET /devices' method from the Devices Setup Resource Group in the 'AlgoSec_Firewall_Analyzer' spec |
pageNumber optional |
Integer | The page number to include in the response. Default value : 0 (Value 0 means first page). |
pageSize optional |
Integer | The number of results to include on each page in the response. Default value : 50 (NAT rules) |
Request example
{ "entityTreeName": "myEntity", "pageNumber": 0, "pageSize": 50 }
cURL Request
curl -X GET "http://api.example.com/api/v1/rule/natRulesInfo?entityTreeName=myEntity&pageNumber=0&pageSize=50" -H "accept: */*"
Response parameter
Name |
Type |
Description |
---|---|---|
natRulesPerDevice | array | The NAT rules for the device. |
deviceName | string | The name of the device. |
natRules | Array | The NAT rules for the device. |
action | String | The action for the NAT rule. |
additionalProperties | list of strings | List of Additional properties (for example, Source host map on checkpoint devices) |
dstHost | String | The destination host for the NAT rule. |
inIf | String |
Direction of the rule:
|
isImplicit | String |
Indicates whether the NAT rule is implicit.
|
ruleId | String | The ID of the NAT rule. |
service | String | The service for the NAT rule. |
srcHost | String | The source host for the NAT rule. |
totalPages | Integer | Total number of pages |
pageNumber | Integer | Page number |
pageSize | Integer | Number of rows on a page |
description | string | The description of the failure. |
error | string | The error message. |
fieldErrors | array | The field errors. |
error | string | The error message. |
field | string | The field name. |
Response:
Code |
Description |
---|---|
200 |
Operation completed successfully |
400 |
Validation error |
401 |
Unauthorized - User session expired |
Response examples 200 Successful
{ "natRulesPerDevice": [ { "deviceName": "device1", "natRules": [ { "action": "allow", "additionalProperties": {}, "dstHost": "host1", "inIf": "eth0", "isImplicit": "true", "ruleId": "23", "service": "http", "srcHost": "host2" } ] } ], "pageNumber": 0, "pageSize": 50, "totalElements": 1, "totalPages": 1 }
Response examples 400 Validation Error
{ "apiFailure": { "description": "The request is invalid", "error": "BAD_REQUEST", "fieldErrors": [ { "error": "Entity tree name cannot be empty.", "field": "entityTreeName" } ] }, "cause": {} }