package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/rules/evaluate-rules"
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 \"allApplicableRules\": true,\n \"organizationId\": \"<string>\",\n \"reportName\": \"<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))
}