EvaluateRulesPreview
curl --request POST \
--url https://api.siftstack.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"
},
"organizationId": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/rules/evaluate-rules:preview"
payload = {
"run": {
"id": "<string>",
"clientKey": "<string>"
},
"runTimeRange": {
"run": {
"id": "<string>",
"clientKey": "<string>"
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"organizationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/rules/evaluate-rules:preview"
payload := strings.NewReader("{\n \"run\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<string>\"\n },\n \"runTimeRange\": {\n \"run\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<string>\"\n },\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\"\n },\n \"organizationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"createdAnnotationCount": 123,
"dryRunAnnotations": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"conditionId": "<string>",
"name": "<string>",
"conditionVersionId": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}RuleEvaluationService
EvaluateRulesPreview
Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.
POST
/
api
/
v1
/
rules
/
evaluate-rules:preview
EvaluateRulesPreview
curl --request POST \
--url https://api.siftstack.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"
},
"organizationId": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/rules/evaluate-rules:preview"
payload = {
"run": {
"id": "<string>",
"clientKey": "<string>"
},
"runTimeRange": {
"run": {
"id": "<string>",
"clientKey": "<string>"
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"organizationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/rules/evaluate-rules:preview"
payload := strings.NewReader("{\n \"run\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<string>\"\n },\n \"runTimeRange\": {\n \"run\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<string>\"\n },\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\"\n },\n \"organizationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"createdAnnotationCount": 123,
"dryRunAnnotations": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"conditionId": "<string>",
"name": "<string>",
"conditionVersionId": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I