Working with USPs

In a USP (Unified Security Policy) you can define the requirements that you want to use to govern the resources and traffic on your network. The requirements defined in the Unified Security Policy provide continuous compliance and any violations of those requirements are shown in the Violations browser

The USP APIs let you query information about the USPs in your system, for example you could retrieve a list of all USPs that were modified recently or a list of USPs that include a specific security zone.

USP API Examples

Date USPs Were Last Changed

The following example retrieves a list of all USPs and the date that they were last changed:

{
  usps {
    values {
      name
      changed
    }
  }
}

Output

{
  "data": {
    "usps": {
      "values": [
        {
          "name": "USP 1",
          "changed": "2019-12-15T10:34:11Z"
        },
        {
          "name": "USP 2",
          "changed": "2019-12-03T10:10:37Z"
        },
        {
          "name": "USP 3",
          "changed": "2019-11-25T10:38:02Z"
        },
        {
          "name": "USP 4",
          "changed": "2019-11-25T10:38:27Z"
        }
      ]
    }
  }
}

USPs With a Specific Zone

The following example retrieves a list of all USPs that include the security zone MyZone.

{
  usps(filter: "zones.name = 'MyZone'") {
    values {
      name
      securityZones {
        name
      }
    }
  }
}

Output

{
  "data": {
    "usps": {
      "values": [
        {
          "name": "Corporate Matrix",
          "securityZones": [
            {
              "name": "Amsterdam_SiteA"
            },
            {
              "name": "Amsterdam_Ext"
            },
            {
              "name": "MyZone"
            }
          ]
        },
        {
          "name": "Sample best practise ",
          "securityZones": [
            {
              "name": "AWS_DB"
            },
            {
              "name": "AWS_Private"
            },
            {
              "name": "MyZone"
            }
          ]
        }
      ]
    }
  }
}