Skip to content

Edit a bank-authored rule

PUT
/v1/rules/custom/{id}
curl --request PUT \
--url http://localhost:8080/v1/rules/custom/example \
--header 'Content-Type: application/json' \
--data '{ "id": "example", "title": "example", "severity": "example", "field": "example", "comparison": "example", "kind": "example", "docType": "example" }'

Replaces the spec of an existing custom rule; the id is kept. Administrators only. 404 for an unknown custom rule, 400 when the new spec is invalid.

id
required
string
Media typeapplication/json

Wire shape for creating/editing a custom rule; maps 1:1 onto CustomRuleSpec.

object
id
null | string
title
string
severity
string
field
string
comparison
string
kind
null | string
docType
null | string
Examplegenerated
{
"id": "example",
"title": "example",
"severity": "example",
"field": "example",
"comparison": "example",
"kind": "example",
"docType": "example"
}

OK

Media typeapplication/json
object
rulesetVersion
required
string
rules
required
Array<object>

One row of the Rules page: a shipped or bank-authored rule with its policy state.

object
id
required
string
version
required
string
severity
required
string
title
required
string
fields
required
Array<string>
enabled
required
boolean
isCustom
required
boolean
spec
required
One of:
null
Examplegenerated
{
"rulesetVersion": "example",
"rules": [
{
"id": "example",
"version": "example",
"severity": "example",
"title": "example",
"fields": [
"example"
],
"enabled": true,
"isCustom": true,
"spec": {
"id": "example",
"title": "example",
"severity": "example",
"field": "example",
"comparison": "example",
"kind": "example",
"docType": "example"
}
}
]
}