Try a pattern against a sample message.
const url = 'https://example.com/api/v1/event-rules/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"clear_pattern":"example","match_kind":"example","pattern":"example","sample":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Body for the interactive rule tester.
object
Examplegenerated
{ "clear_pattern": "example", "match_kind": "example", "pattern": "example", "sample": "example"}Responses
Section titled “Responses”Whether the sample matched; a pattern that does not compile is reported in-band
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
Examplegenerated
{ "clear_matched": true, "error": "example", "matched": true}No valid bearer token
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role below Admin
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}