Getting the active policy of a specific virtual server on a specific device.

Overview

Describes how you use the REST API to get the active policy of a specific virtual server on a specific device.

Prerequisites

  • Device configuration discovered and imported to Web Application Security.
  • The name and partition of the virtual server should be known.

Description

Describes how you use the REST API to get the active policy of a specific virtual server on a specific device.

Perform the REST API actions in the following order:

  1. Perform a GET operation to determine the selfLink of a device.
  2. Perform a GET operation to determine the active policy of the virtual server.

REST API actions.

2. Perform a GET operation to determine the active policy of the virtual server.

Perform a GET operation to determine the active policy of the virtual server, filtering the results using the deviceReference that was retrieved in step #1 and by the virtual server properties.

GET: https://<BIG-IQ>/mgmt/cm/asm/working-config/virtual-servers?$select=selfLink,name,fullPath&$filter=deviceReference/link eq 'https://localhost/mgmt/shared/resolver/device-groups/cm-asm-allAsmDevices/devices/c1444144-11e7-47e6-8e91-eaa913826a7f' and name eq 'Virtual_1' and partition eq 'Common'

The following is the JSON response from the GET operation:

{
    "selfLink": "https://localhost/mgmt/cm/asm/working-config/virtual-servers",
    "totalItems": 1,
    "items": [
        {
            "name": "Virtual_1",
            "selfLink": "https://localhost/mgmt/cm/asm/working-config/virtual-servers/fc4cb3cf-b2d8-378a-8a64-07a27e60316c"
        }
    ],
    "generation": 8,
    "kind": "cm:asm:working-config:virtual-servers:asmvirtualservercollectionstate",
    "lastUpdateMicros": 1479388471928975
}

API References

  • Listing virtual servers with a Web Application Security policy associated with them