Skip to main content
POST
/
api
/
v1
/
rules
/
evaluate-rules:preview
EvaluateRulesPreview
curl --request POST \
  --url https://your-sift-api-url.com/api/v1/rules/evaluate-rules:preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "run": {
    "id": "<string>",
    "clientKey": "<string>"
  },
  "runTimeRange": {
    "run": {
      "id": "<string>",
      "clientKey": "<string>"
    },
    "startTime": "2023-11-07T05:31:56Z",
    "endTime": "2023-11-07T05:31:56Z"
  },
  "rules": {
    "rules": {
      "ids": {
        "ids": [
          "<string>"
        ]
      },
      "clientKeys": {
        "clientKeys": [
          "<string>"
        ]
      }
    }
  },
  "ruleVersions": {
    "ruleVersionIds": [
      "<string>"
    ]
  },
  "reportTemplate": {
    "reportTemplate": {
      "id": "<string>",
      "clientKey": "<string>"
    }
  },
  "ruleConfigs": {
    "configs": [
      {
        "ruleId": "<string>",
        "name": "<string>",
        "description": "<string>",
        "assetId": "<string>",
        "isEnabled": true,
        "conditions": [
          {
            "ruleConditionId": "<string>",
            "expression": {
              "singleChannelComparison": {
                "channelComponent": "<string>",
                "channelName": "<string>",
                "comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
                "double": 123,
                "string": "<string>",
                "lastValue": {}
              },
              "calculatedChannel": {
                "channelReferences": {},
                "expression": "<string>",
                "functionDependencies": [
                  {
                    "userDefinedFunctionVersionId": "<string>"
                  }
                ]
              }
            },
            "actions": [
              {
                "ruleActionId": "<string>",
                "actionType": "ACTION_KIND_UNSPECIFIED",
                "configuration": {
                  "notification": {
                    "recipientUserIds": [
                      "<any>"
                    ]
                  },
                  "annotation": {
                    "tagIds": [
                      "<any>"
                    ],
                    "annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
                    "assignedToUserId": "<string>",
                    "metadata": [
                      "<any>"
                    ]
                  }
                }
              }
            ]
          }
        ],
        "organizationId": "<string>",
        "versionNotes": "<string>",
        "clientKey": "<string>",
        "assetConfiguration": {
          "assetIds": [
            "<string>"
          ],
          "tagIds": [
            "<string>"
          ]
        },
        "contextualChannels": {
          "channels": [
            {
              "name": "<string>",
              "component": "<string>"
            }
          ]
        },
        "isExternal": true,
        "metadata": [
          {
            "key": {
              "name": "<string>",
              "type": "METADATA_KEY_TYPE_UNSPECIFIED",
              "archivedDate": "2023-11-07T05:31:56Z"
            },
            "stringValue": "<string>",
            "numberValue": 123,
            "booleanValue": true,
            "archivedDate": "2023-11-07T05:31:56Z"
          }
        ]
      }
    ]
  },
  "organizationId": "<string>"
}'
{
  "createdAnnotationCount": 123,
  "dryRunAnnotations": [
    {
      "conditionId": "<string>",
      "name": "<string>",
      "startTime": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z",
      "conditionVersionId": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
run
object
runTimeRange
object
rules
object
ruleVersions
object
reportTemplate
object
ruleConfigs
object
organizationId
string

Response

A successful response.

createdAnnotationCount
integer
required
dryRunAnnotations
object[]