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": [
{
"name": "<string>",
"description": "<string>",
"conditions": [
{
"expression": {
"singleChannelComparison": {
"channelComponent": "<string>",
"channelName": "<string>",
"comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
"double": 123,
"string": "<string>",
"lastValue": {}
},
"calculatedChannel": {
"channelReferences": {},
"expression": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
}
},
"actions": [
{
"actionType": "ACTION_KIND_UNSPECIFIED",
"configuration": {
"notification": {
"recipientUserIds": [
"<string>"
]
},
"annotation": {
"tagIds": [
"<string>"
],
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"assignedToUserId": "<string>",
"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"
}
]
}
},
"ruleActionId": "<string>"
}
],
"ruleConditionId": "<string>"
}
],
"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"
}
],
"ruleId": "<string>",
"assetId": "<string>",
"isEnabled": true,
"organizationId": "<string>",
"versionNotes": "<string>",
"clientKey": "<string>",
"assetConfiguration": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
},
"contextualChannels": {
"channels": [
{
"name": "<string>",
"component": "<string>"
}
]
},
"isExternal": true
}
]
},
"organizationId": "<string>"
}
'{
"createdAnnotationCount": 123,
"dryRunAnnotations": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"conditionId": "<string>",
"name": "<string>",
"conditionVersionId": "<string>"
}
]
}Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.
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": [
{
"name": "<string>",
"description": "<string>",
"conditions": [
{
"expression": {
"singleChannelComparison": {
"channelComponent": "<string>",
"channelName": "<string>",
"comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
"double": 123,
"string": "<string>",
"lastValue": {}
},
"calculatedChannel": {
"channelReferences": {},
"expression": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
}
},
"actions": [
{
"actionType": "ACTION_KIND_UNSPECIFIED",
"configuration": {
"notification": {
"recipientUserIds": [
"<string>"
]
},
"annotation": {
"tagIds": [
"<string>"
],
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"assignedToUserId": "<string>",
"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"
}
]
}
},
"ruleActionId": "<string>"
}
],
"ruleConditionId": "<string>"
}
],
"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"
}
],
"ruleId": "<string>",
"assetId": "<string>",
"isEnabled": true,
"organizationId": "<string>",
"versionNotes": "<string>",
"clientKey": "<string>",
"assetConfiguration": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
},
"contextualChannels": {
"channels": [
{
"name": "<string>",
"component": "<string>"
}
]
},
"isExternal": true
}
]
},
"organizationId": "<string>"
}
'{
"createdAnnotationCount": 123,
"dryRunAnnotations": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"conditionId": "<string>",
"name": "<string>",
"conditionVersionId": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deprecated - use CalculatedChannelConfig.
Show child attributes
CONDITION_COMPARATOR_UNSPECIFIED, LESS_THAN, LESS_THAN_OR_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, EQUAL, NOT_EQUAL Show child attributes
Show child attributes
This will be ignored in requests and will be generated automatically.
Show child attributes
Show child attributes
ACTION_KIND_UNSPECIFIED, NOTIFICATION, ANNOTATION, WEBHOOK Show child attributes
Show child attributes
ANNOTATION_TYPE_UNSPECIFIED, ANNOTATION_TYPE_DATA_REVIEW, ANNOTATION_TYPE_PHASE Show child attributes
Show child attributes
Metadata key type.
METADATA_KEY_TYPE_UNSPECIFIED, METADATA_KEY_TYPE_STRING, METADATA_KEY_TYPE_NUMBER, METADATA_KEY_TYPE_BOOLEAN Show child attributes
Show child attributes
Metadata key type.
METADATA_KEY_TYPE_UNSPECIFIED, METADATA_KEY_TYPE_STRING, METADATA_KEY_TYPE_NUMBER, METADATA_KEY_TYPE_BOOLEAN Deprecated - use asset_configuration instead.
Deprecated - use DeleteRule instead.
A successful response.
Was this page helpful?