curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/flywheel/demote-noisy' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"dry_run": false,
"min_noise_ratio": 7.5,
"min_sample": 1,
"window_secs": 1
}'
{
"demoted": [
{
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string",
"rule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"dry_run": false,
"evaluated": 1,
"flagged_curated": [
{
"auto_demotable": true,
"cited_count": 1,
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string"
}
]
}
Noise-based rule demotion — the pruning counterpart of evidence-based
promotion. Disables mined flywheel:* rules that fire on decisions without ever being relevant (high noise ratio over a minimum sample)…
POST
/
api
/
v1
/
flywheel
/
demote-noisy
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/flywheel/demote-noisy' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"dry_run": false,
"min_noise_ratio": 7.5,
"min_sample": 1,
"window_secs": 1
}'
{
"demoted": [
{
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string",
"rule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"dry_run": false,
"evaluated": 1,
"flagged_curated": [
{
"auto_demotable": true,
"cited_count": 1,
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string"
}
]
}
promotion. Disables mined
flywheel:* rules that fire on decisions
without ever being relevant (high noise ratio over a minimum sample);
curated policy is flagged for an operator but never auto-disabled.
Required scope: write
Request body
DemoteNoisyRequest
boolean
Preview only: report what WOULD be demoted without disabling anything.
number (double)
Minimum noise ratio to qualify (default 0.9) — mostly noise.
integer
Minimum total observations (cited + noise) before a rule is eligible (default 10) — never demote on thin evidence.
integer (int64)
Analytics window in seconds (default 7d, cap 30d).
Response
DemoteNoisyResponse
DemotedRule[]
required
boolean
required
integer
required
Rules that met the threshold (auto + curated).
DemotionCandidate[]
required
Curated/user rules that met the noise threshold but were NOT touched — an operator must review these; the system never auto-disables policy.
Status codes
| Code | Meaning |
|---|---|
200 | Demotion result |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/flywheel/demote-noisy' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"dry_run": false,
"min_noise_ratio": 7.5,
"min_sample": 1,
"window_secs": 1
}'
{
"demoted": [
{
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string",
"rule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"dry_run": false,
"evaluated": 1,
"flagged_curated": [
{
"auto_demotable": true,
"cited_count": 1,
"noise_count": 1,
"noise_ratio": 7.5,
"rule": "string"
}
]
}
Last modified on August 31, 2026