Get a list of redundant special case rules

Return a list of Redundant Special Case rules for a specified device if it has no children. For a specified parent device, get the list of Redundant Special Case rules for each of its children.

This method is found in the AFA/Policy_Optimization spec in the swagger.

For information about consolidated rules, see POLICY OPTIMIZATION page.

Note: This method can be used only for reports in A32.10 and above.

Resource Name: /api/v1/rules/specialCase/{deviceTreeName}

Request Method: GET

Request Parameters:

Element

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.

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.
reportID
optional
string The name of the report. When field left blank, uses latest report.

Response Parameters:

The structure of the response is as follows:

Parameters

Type

Description

deviceTreeName string Device name
reportID
string Report ID
SpecialCaseRuleList array of objects  
rule
'Rule' object The rule

specialCaseRule

'Rule' object

The rule's associated redundant special case rule

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized

Request examples

curl -X GET "https://[machine IP]/ms-policy-optimizations/api/v1/rules/specialCase/ForOneArm1?pageNumber=0&pageSize=50&reportId=afa-1333" -H "accept: */*"

Response examples

Copy
{
  "content": [
    {
      "deviceTreeName": "Kabab",
      "reportId": "afa-38",
      "specialCaseRulesList": [
        {
          "rule": {
            "deviceId": 101,
            "ruleId": "0A9FCA6D-94C8-4CD5-AEAD-1BA174419F83",
            "ruleNum": "6",
            "source": [
              {
                "canonizedName": "Net10_20",
                "invalidNamedObject": true
              },
              {
                "canonizedName": "Net192.168",
                "invalidNamedObject": true
              }
            ],
            "isNegateSource": false,
            "destination": [
              {
                "canonizedName": "Any",
                "invalidNamedObject": true
              }
            ],
            "isNegateDestination": false,
            "service": [
              {
                "canonizedName": "Any",
                "invalidNamedObject": true
              }
            ],
            "isNegateService": false,
            "action": "Accept",
            "comment": [
              ""
            ],
            "enable": "Enabled",
            "log": "Log",
            "link": "rule_0A9FCA6D-94C8-4CD5-AEAD-1BA174419F83",
            "documentation": {
              "documentation": ""
            },
            "additionalData": {
              "layer type": [
                {
                  "value": "Ordered"
                }
              ],
              "global": [
                {
                  "value": "middle"
                }
              ],
              "content": [
                {
                  "value": "Any"
                }
              ],
              "rule position": [
                {
                  "value": "6"
                }
              ],
              "layer name": [
                {
                  "value": "Standard_Clone_Clone Network"
                }
              ],
              "parent rule uid": [
                {
                  "value": ""
                }
              ],
              "original rule uid": [
                {
                  "value": "0A9FCA6D-94C8-4CD5-AEAD-1BA174419F83"
                }
              ],
              "is last rule": [
                {
                  "value": "false"
                }
              ],
              "ordered layer index": [
                {
                  "value": "1"
                }
              ],
              "is parent rule": [
                {
                  "value": "false"
                }
              ],
              "layer uid": [
                {
                  "value": "e6341254-061b-43e5-a73f-5c51aeac82c8"
                }
              ],
              "install": [
                {
                  "value": "Policy Targets"
                }
              ],
              "layer identifier": [
                {
                  "value": "e6341254-061b-43e5-a73f-5c51aeac82c8"
                }
              ],
              "vpn": [
                {
                  "value": "Any"
                }
              ],
              "name": [
                {
                  "value": "Chen"
                }
              ],
              "time": [
                {
                  "value": "Any"
                }
              ],
              "section_header": [
                {
                  "value": ""
                }
              ]
            },
            "isValidUserSourceModel": true
          },
          "specialCaseRule": {
            "deviceId": 101,
            "ruleId": "2C3FADD4-749E-49C8-8D08-626459C6919E",
            "ruleNum": "5",
            "source": [
              {
                "canonizedName": "afa_10.20.14.30",
                "invalidNamedObject": true
              }
            ],
            "isNegateSource": false,
            "destination": [
              {
                "canonizedName": "afa_10.178.12.111",
                "invalidNamedObject": true
              }
            ],
            "isNegateDestination": false,
            "service": [
              {
                "canonizedName": "Any",
                "invalidNamedObject": true
              }
            ],
            "isNegateService": false,
            "action": "Accept",
            "comment": [
              ""
            ],
            "enable": "Enabled",
            "log": "Log",
            "link": "rule_2C3FADD4-749E-49C8-8D08-626459C6919E",
            "documentation": {
              "documentation": ""
            },
            "additionalData": {
              "layer type": [
                {
                  "value": "Ordered"
                }
              ],
              "global": [
                {
                  "value": "middle"
                }
              ],
              "content": [
                {
                  "value": "Any"
                }
              ],
              "rule position": [
                {
                  "value": "5"
                }
              ],
              "layer name": [
                {
                  "value": "Standard_Clone_Clone Network"
                }
              ],
              "parent rule uid": [
                {
                  "value": ""
                }
              ],
              "original rule uid": [
                {
                  "value": "2C3FADD4-749E-49C8-8D08-626459C6919E"
                }
              ],
              "is last rule": [
                {
                  "value": "false"
                }
              ],
              "ordered layer index": [
                {
                  "value": "1"
                }
              ],
              "is parent rule": [
                {
                  "value": "false"
                }
              ],
              "layer uid": [
                {
                  "value": "e6341254-061b-43e5-a73f-5c51aeac82c8"
                }
              ],
              "layer identifier": [
                {
                  "value": "e6341254-061b-43e5-a73f-5c51aeac82c8"
                }
              ],
              "vpn": [
                {
                  "value": "Any"
                }
              ],
              "install": [
                {
                  "value": "Policy Targets"
                }
              ],
              "name": [
                {
                  "value": "tali_test_rule3"
                }
              ],
              "time": [
                {
                  "value": "Any"
                }
              ],
              "section_header": [
                {
                  "value": ""
                }
              ]
            },
            "isValidUserSourceModel": true
          }
        }
      ]
    },
    {
      "deviceTreeName": "10_20_7_194",
      "reportId": "afa-39",
      "specialCaseRulesList": [
        {
          "rule": {
            "deviceId": 1751,
            "ruleId": "0x5e1d74ac",
            "ruleNum": "vpn-inside_access_in(22)",
            "source": [
              {
                "canonizedName": "remote-vpn-gil-lans",
                "invalidNamedObject": true
              }
            ],
            "isNegateSource": false,
            "users": [
              {
                "display": "any"
              }
            ],
            "destination": [
              {
                "canonizedName": "any",
                "invalidNamedObject": true
              }
            ],
            "isNegateDestination": false,
            "service": [
              {
                "canonizedName": "ip",
                "invalidNamedObject": true
              }
            ],
            "isNegateService": false,
            "action": "permit",
            "comment": [
              ""
            ],
            "enable": "enabled",
            "log": "",
            "link": "line_1338",
            "documentation": {
              "documentation": ""
            },
            "additionalData": {
              "line": [
                {
                  "value": "access-list vpn-inside_access_in extended permit ip object-group remote-vpn-gil-lans any"
                }
              ],
              "rule": [
                {
                  "value": "acl(1338)"
                }
              ],
              "acl": [
                {
                  "value": "vpn-inside_access_in"
                }
              ],
              "interface": [
                {
                  "value": "vpn_inside"
                }
              ],
              "name": [
                {
                  "value": "vpn-inside_access_in(22)"
                }
              ],
              "linenum": [
                {
                  "value": "1338"
                }
              ],
              "time": [
                {
                  "value": ""
                }
              ],
              "user": [
                {
                  "value": "any"
                }
              ]
            },
            "isValidUserSourceModel": true
          },
          "specialCaseRule": {
            "deviceId": 1751,
            "ruleId": "0x0d37de5c",
            "ruleNum": "vpn-inside_access_in(21)",
            "source": [
              {
                "canonizedName": "146.46.26.0/25",
                "invalidNamedObject": true
              }
            ],
            "isNegateSource": false,
            "users": [
              {
                "display": "any"
              }
            ],
            "destination": [
              {
                "canonizedName": "gnss-servers",
                "invalidNamedObject": true
              }
            ],
            "isNegateDestination": false,
            "service": [
              {
                "canonizedName": "tcp/2101",
                "invalidNamedObject": true
              }
            ],
            "isNegateService": false,
            "action": "permit",
            "comment": [
              ""
            ],
            "enable": "enabled",
            "log": "",
            "link": "line_1337",
            "documentation": {
              "documentation": ""
            },
            "additionalData": {
              "line": [
                {
                  "value": "access-list vpn-inside_access_in extended permit tcp 146.46.26.0 255.255.255.128 object-group gnss-servers eq 2101"
                }
              ],
              "rule": [
                {
                  "value": "acl(1337)"
                }
              ],
              "acl": [
                {
                  "value": "vpn-inside_access_in"
                }
              ],
              "interface": [
                {
                  "value": "vpn_inside"
                }
              ],
              "name": [
                {
                  "value": "vpn-inside_access_in(21)"
                }
              ],
              "linenum": [
                {
                  "value": "1337"
                }
              ],
              "time": [
                {
                  "value": ""
                }
              ],
              "user": [
                {
                  "value": "any"
                }
              ]
            },
            "isValidUserSourceModel": true
          }
        }
      ]
    }
  ],
  "pageable": {
    "sort": {
      "sorted": true,
      "unsorted": false,
      "empty": false
    },
    "pageSize": 50,
    "pageNumber": 0,
    "offset": 0,
    "paged": true,
    "unpaged": false
  },
  "totalPages": 1,
  "totalElements": 2,
  "last": true,
  "number": 0,
  "size": 50,
  "numberOfElements": 2,
  "sort": {
    "sorted": true,
    "unsorted": false,
    "empty": false
  },
  "first": true,
  "empty": false
}