post https://{accountName}.{environment}.com.br/api/policy-engine/evaluate
This endpoint consults all policies and checks the ones that satisfy the request body’s conditions.
Request body has the following properties:
Attribute | Type | Description |
---|---|---|
resource | string | Location of the data used on the policy |
context | object | Conditions that the Policy needs to satisfy |
Request body example:
{
"resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert",
"context" : {
"brandId": "2000001",
"discountPercentage": "91.00"
}
}
Response body has the following properties:
Attribute | Type | Description |
---|---|---|
id | string | Action ID |
metadata | object | Metadata object from the current action |
Response body example:
[
{
"id": "SendSlackMessage",
"metadata": {
"channel": "C01NJFF35R6",
"relatedUsers": [
"URUNDC2NB"
],
"alertDescription": "Avoid selling products from Berenice with a discount greater than 70%."
}
}
]