Get a list of unattached objects

Return a list of unused objects detected in the last successful report of a specific device, group or ALL_FIREWALLS. An object is identified as Unattached if it does not appear in any rule, in any policy that is managed by the current SmartCenter or CMA, and also it is not a member of any object group that appears in any such rule.

Tip: The usage calculation period is determined by the value stated in the Log_Analysis_Days_Before parameter (defined in the last analysis).​

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

For information about unused rules, see POLICY OPTIMIZATION page.

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

Resource Name: /api/v1/objects/unattached/{entityTreeName}

Request Method: GET

Request Parameters:

Element

Type

Description

entityTreeName
Mandatory

string

Tree name of the entity. Entity can be a device, group or ALL_FIREWALLS.

(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.

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized

Request examples

curl -X GET "https://[localhost]/ms-policy-optimizations/api/v1/objects/unattached/Tomato?pageNumber=0&pageSize=50" -H "accept: */*"

Response examples

Copy
 "unattached": [
    {
      "treeName": "Tomato",
      "reportId": "afa-29207",
      "unattachedObjects": [
        {
          "id": 42757,
          "name": "Range2"
        },
        {
          "id": 42759,
          "name": "Group3"
        },
        {
          "id": 42761,
          "name": "Range1"
        },
        {
          "id": 42774,
          "name": "All_Internet"
        },
        {
          "id": 42776,
          "name": "CP_RESERVED_MS"
        },
        {
          "id": 42791,
          "name": "Net1020"
        }
      ]
    }
  ],
  "unattachedContainedInGroup": [
    {
      "treeName": "Tomato",
      "reportId": "afa-29207",
      "unattachedObjects": [
        {
          "id": 42758,
          "name": "Net1010"
        },
        {
          "id": 42760,
          "name": "Group2"
        }
      ]
    }
  ],
  "unattachedGlobalObjects": [
    {
      "treeName": "Tomato",
      "reportId": "afa-29207",
      "unattachedObjects": [
        {
          "id": 42767,
          "name": "GlobalNet"
        },
        {
          "id": 42777,
          "name": "GlobalGroup"
        }
      ]
    }
  ],
  "totalPages": 1,
  "pageNumber": 0,
  "totalElements": 10,
  "pageSize": 50
}