Policy

Get Policy List

Retrieves a list of all policies in the account and general information of each policy.

get/api/policy-engine/policies

Headers

Content-Typestring required

Describes the type of the content being sent

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand

Response

idstring

Policy ID

namestring

Policy Name

descriptionstring

Policy description. This description is only for internal use of identification

Example response

[
  {
    "id": "pa_test_001",
    "name": "TestAlarmBerenice",
    "description": "TesteMarcosPromotionsAlert",
    "statements": [
      {
        "effect": "Allow",
        "actions": [
          {
            "id": "SendSlackMessage",
            "metadata": {
              "channel": "C01NJFF35R6",
              "relatedUsers": [
                "URUNDC2NB"
              ],
              "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%."
            }
          }
        ],
        "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert",
        "condition": {
          "conditions": [
            {
              "conditions": [],
              "operation": "stringEquals",
              "key": "brandId",
              "values": [
                "2000001"
              ]
            },
            {
              "conditions": [],
              "operation": "numericGreaterThan",
              "key": "discountPercentage",
              "values": [
                "70.00"
              ]
            }
          ],
          "operation": "and"
        }
      }
    ]
  }
]

Changes