curl --request POST \
--url https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"focus": {
"client_refs": [
"<string>"
],
"rule_ids": [
"<string>"
],
"rule_set_ids": [
"<string>"
]
}
}
'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis"
payload = { "focus": {
"client_refs": ["<string>"],
"rule_ids": ["<string>"],
"rule_set_ids": ["<string>"]
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
focus: {client_refs: ['<string>'], rule_ids: ['<string>'], rule_set_ids: ['<string>']}
})
};
fetch('https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'focus' => [
'client_refs' => [
'<string>'
],
'rule_ids' => [
'<string>'
],
'rule_set_ids' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis"
payload := strings.NewReader("{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"active_rule_count": 123,
"base_rule_configuration_version": 123,
"configuration_hash": "<string>",
"finding_count": 123,
"findings": [
{
"code": "<string>",
"confidence": "<string>",
"message": "<string>",
"paths": [
{
"client_ref": "<string>",
"path": "<string>",
"rule_id": "<string>"
}
],
"remediation": "<string>",
"rule_sets": [
{
"client_ref": "<string>",
"id": "<string>",
"key": "<string>",
"order": 123
}
],
"rules": [
{
"client_ref": "<string>",
"id": "<string>",
"name": "<string>",
"order": 123,
"rule_set_client_ref": "<string>",
"rule_set_id": "<string>",
"rule_set_order": 123
}
],
"runtime_semantics": "<string>",
"severity": "<string>"
}
],
"grounding": {
"observed_event_shapes_analyzed": true,
"static_event_references_analyzed": true
},
"limits": {
"max_comparisons": 123,
"max_effects": 123,
"max_findings": 123,
"max_rules": 123
},
"program_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rule_count": 123,
"source": "current",
"truncated": true
}{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "forbidden",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Insufficient permissions for this action"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "unsupported_media_type",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Content-Type must be application/json"
}{
"code": "unprocessable",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Business rule violation"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Analyze a rule configuration
Deterministically analyze a coherent current rule configuration, or a complete proposed configuration in the preview request shape. Findings are advisory and include stable codes, severity, confidence, execution positions, expression/action paths, runtime semantics, and remediation.
curl --request POST \
--url https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"focus": {
"client_refs": [
"<string>"
],
"rule_ids": [
"<string>"
],
"rule_set_ids": [
"<string>"
]
}
}
'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis"
payload = { "focus": {
"client_refs": ["<string>"],
"rule_ids": ["<string>"],
"rule_set_ids": ["<string>"]
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
focus: {client_refs: ['<string>'], rule_ids: ['<string>'], rule_set_ids: ['<string>']}
})
};
fetch('https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'focus' => [
'client_refs' => [
'<string>'
],
'rule_ids' => [
'<string>'
],
'rule_set_ids' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis"
payload := strings.NewReader("{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/rule-configuration/analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"focus\": {\n \"client_refs\": [\n \"<string>\"\n ],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"rule_set_ids\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"active_rule_count": 123,
"base_rule_configuration_version": 123,
"configuration_hash": "<string>",
"finding_count": 123,
"findings": [
{
"code": "<string>",
"confidence": "<string>",
"message": "<string>",
"paths": [
{
"client_ref": "<string>",
"path": "<string>",
"rule_id": "<string>"
}
],
"remediation": "<string>",
"rule_sets": [
{
"client_ref": "<string>",
"id": "<string>",
"key": "<string>",
"order": 123
}
],
"rules": [
{
"client_ref": "<string>",
"id": "<string>",
"name": "<string>",
"order": 123,
"rule_set_client_ref": "<string>",
"rule_set_id": "<string>",
"rule_set_order": 123
}
],
"runtime_semantics": "<string>",
"severity": "<string>"
}
],
"grounding": {
"observed_event_shapes_analyzed": true,
"static_event_references_analyzed": true
},
"limits": {
"max_comparisons": 123,
"max_effects": 123,
"max_findings": 123,
"max_rules": 123
},
"program_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rule_count": 123,
"source": "current",
"truncated": true
}{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "forbidden",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Insufficient permissions for this action"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "unsupported_media_type",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Content-Type must be application/json"
}{
"code": "unprocessable",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Business rule violation"
}{
"code": "internal_error",
"message": "An internal error occurred"
}{} to analyze the current revision. To analyze a draft, pass proposed_configuration in the same shape as configuration preview. The analysis validates the draft. It does not create a preview or change the live version.
Each finding includes a stable code, severity, confidence, the implicated rules or rule_sets, expression or action path, runtime_semantics, and remediation. The response also returns grounding and limits. Findings are advisory. They do not mean two conditions will match the same event.
See Check a draft.Authorizations
API key passed in the X-API-Key header.
Path Parameters
Program ID
Body
Current ({}) or proposed configuration analysis request
Response
OK
ACTIVE rules participating in runtime interaction analysis.
Coherent current revision on which the analysis is based.
Stable SHA-256 hash of the analyzed current configuration or normalized proposal.
Number of findings returned.
Deterministically ordered advisory findings.
Show child attributes
Show child attributes
Grounding capabilities applied by this analysis.
Show child attributes
Show child attributes
Complexity and response limits applied by the server.
Show child attributes
Show child attributes
Program whose configuration was analyzed.
Total ACTIVE and SUSPENDED rules in the analyzed configuration.
Configuration source: current or proposed.
current, proposed True when deterministic response capping omitted later findings.