コンテンツにスキップ

Try a pattern against a sample message.

POST
/api/v1/event-rules/test
curl --request POST \
--url https://example.com/api/v1/event-rules/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "clear_pattern": "example", "match_kind": "example", "pattern": "example", "sample": "example" }'

A read wearing POST — it compiles a regex and returns, changing nothing — so it is on changes_monitoring_config’s exception list and does not dirty the config generation.

Media typeapplication/json

Body for the interactive rule tester.

object
clear_pattern
string | null
match_kind
required
string
pattern
required
string
sample
required
string
Examplegenerated
{
"clear_pattern": "example",
"match_kind": "example",
"pattern": "example",
"sample": "example"
}

Whether the sample matched; a pattern that does not compile is reported in-band

Media typeapplication/json

The tester’s answer. A compile failure is reported in-band rather than as a 400: the whole point of the tester is to show the operator what is wrong with the pattern they are typing, and a 400 would be rendered as a request failure instead of inline next to the field.

object
clear_matched
boolean | null
error
string | null
matched
required
boolean
Examplegenerated
{
"clear_matched": true,
"error": "example",
"matched": true
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role below Admin

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}