Manual Chapter : Importing the Declarative Policy

Applies To:

  • BIG-IP ASM

    21.0.0, 17.5.1, 17.5.0, 17.1.3, 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.6, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0

Importing the Declarative Policy

  1. Import the policy.

    Send a POST request to https://<your-BIG-IP>/mgmt/tm/asm/tasks/import-policy.

    Use following body:

    {
        "fileReference":{
            "link":"http:// <your-remote-repository-address>/root/waf/raw/master/../policy.json"
        },
        "policy":{
            "fullPath":"/Common/policy"
        }
    }
  2. Validate the imported policy.

    Send a GET request to https://<your-BIG-IP>//mgmt/tm/asm/tasks/import-policy.

    The policy is imported successfully if the response contain status code 200 with "status": "COMPLETED".

  3. Apply the imported policy.

    Send a POST request to https://<your-BIG-IP>///mgmt/tm/asm/tasks/apply-policy.

    Use following body:

    {
        "policy":{
            "fullPath":"/Common/policy"
        }
    }