Get NAT rules information (EA)
Get NAT rules information for a device.
Note: This is an Early Availability API and is not found in the swagger.
Note: This API does not support management devices, groups of devices, nor user-defined groups.
Resource Name:
Request Method: GET
Request Query Parameters:
Element |
Type |
Description |
---|---|---|
deviceName Mandatory |
string |
Device name. |
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) |
Response parameter
Name |
Type |
Description |
---|---|---|
natRules | Array | Array of NAT rules |
srcHost | String | Source host |
dstHost | String | Destination host |
service | String | Service |
action | String | Action |
ruleId | String | Rule ID |
isImplicit | String |
Rule is implicit:
|
inIf | String |
Direction of the rule:
|
additionalProperties | list of strings | List of Additional properties (for example, Source host map on checkpoint devices) |
totalPages | Integer | Total number of pages |
pageNumber | Integer | Page number |
pageSize | Integer | Number of rows on a page |
Response:
Code |
Description |
---|---|
200 |
Operation completed successfully |
400 |
Validation error |
401 |
Unauthorized - User session expired |
cURL Request
curl -k --location --request GET 'https://<machine host>/afa/api/v1/rule/getNatRulesInfo/?deviceName=<device_name>&pageNumber=0&pageSize=5' --header 'Cookie: PHPSESSID= <sessionID>;' --header 'Content-Type: application/json'
Response examples
{ "natRules": [ { "srcHost": "F5_192.168.29.5_", "dstHost": "back_Server1", "service": "*", "action": "pass", "ruleId": "080805c4-775e-4d85-b585-8052d4c497cb", "isImplicit": "0", "inIf": "IN", "additionalProperties": { "application": "*", "src_map_type": "Direct", "rule_number": "1", "src_host_map": "CKP-GW" } }, { "srcHost": "4.1.1.1", "dstHost": "back_Server1", "service": "*", "action": "pass", "ruleId": "39224556-beea-4b12-b040-fe895c872aa8", "isImplicit": "0", "inIf": "IN", "additionalProperties": { "application": "*", "src_map_type": "Direct", "rule_number": "2", "src_host_map": "CKP-GW" } }, { "srcHost": "Internal-Host", "dstHost": "*", "service": "*", "action": "pass", "ruleId": "", "isImplicit": "1", "inIf": "IN", "additionalProperties": { "application": "*", "src_map_type": "Pool", "rule_number": "3", "src_host_map": "Internal-Host__HIDE" } }, { "srcHost": "CP_default_Office_Mode_addresses_pool", "dstHost": "CP_default_Office_Mode_addresses_pool", "service": "*", "action": "pass", "ruleId": "", "isImplicit": "1", "inIf": "IN", "additionalProperties": { "application": "*", "rule_number": "4" } }, { "srcHost": "CP_default_Office_Mode_addresses_pool", "dstHost": "*", "service": "*", "action": "pass", "ruleId": "", "isImplicit": "1", "inIf": "IN", "additionalProperties": { "application": "*", "src_map_type": "Pool", "rule_number": "5", "src_host_map": "CP_default_Office_Mode_addresses_pool__HIDE" } } ], "totalPages": 1, "totalElements": 5, "pageNumber": 0, "pageSize": 5 }