RuleService
Source and message fields. Error family: rule.
ListRules
ListRules is every rule with its current version, deleted ones included (their current version is the tombstone).
- Path:
/backplane.console.v1.RuleService/ListRules. - Input:
ListRulesRequest; output:ListRulesResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: ListRulesRequest; signal: AbortSignal
const response = await client.listRules(request, { signal });
GetRule
GetRule is one version of a rule: the current one by default.
- Path:
/backplane.console.v1.RuleService/GetRule. - Input:
GetRuleRequest; output:GetRuleResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: GetRuleRequest; signal: AbortSignal
const response = await client.getRule(request, { signal });
ListRuleVersions
ListRuleVersions pages through a rule's versions, newest first.
- Path:
/backplane.console.v1.RuleService/ListRuleVersions. - Input:
ListRuleVersionsRequest; output:ListRuleVersionsResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: ListRuleVersionsRequest; signal: AbortSignal
const response = await client.listRuleVersions(request, { signal });
ValidateRule
ValidateRule is SaveRule without saving: the violations it would be rejected with.
- Path:
/backplane.console.v1.RuleService/ValidateRule. - Input:
ValidateRuleRequest; output:ValidateRuleResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: ValidateRuleRequest; signal: AbortSignal
const response = await client.validateRule(request, { signal });
SaveRule
SaveRule validates the definition and, when valid, saves it as the next version of the rule (a new rule without id). Invalid: nothing is saved, violations say why.
- Path:
/backplane.console.v1.RuleService/SaveRule. - Input:
SaveRuleRequest; output:SaveRuleResponse; mode: unary. - Errors: rule + common.
- Database mutation: never automatically replay after an ambiguous failure.
// client: RuleServiceClient; request: SaveRuleRequest; signal: AbortSignal
const response = await client.saveRule(request, { signal });
RollbackRule
RollbackRule saves a new version with the name and definition of an older one (rollback_of), validated as any save.
- Path:
/backplane.console.v1.RuleService/RollbackRule. - Input:
RollbackRuleRequest; output:RollbackRuleResponse; mode: unary. - Errors: rule + common.
- Database mutation: never automatically replay after an ambiguous failure.
// client: RuleServiceClient; request: RollbackRuleRequest; signal: AbortSignal
const response = await client.rollbackRule(request, { signal });
DeleteRule
DeleteRule saves a tombstone version: the rule stops, the history stays.
- Path:
/backplane.console.v1.RuleService/DeleteRule. - Input:
DeleteRuleRequest; output:DeleteRuleResponse; mode: unary. - Errors: rule + common.
- Database mutation: never automatically replay after an ambiguous failure.
// client: RuleServiceClient; request: DeleteRuleRequest; signal: AbortSignal
const response = await client.deleteRule(request, { signal });
PauseRule
PauseRule stops starting runs for the rule's events until resumed.
- Path:
/backplane.console.v1.RuleService/PauseRule. - Input:
PauseRuleRequest; output:PauseRuleResponse; mode: unary. - Errors: rule + common.
- Database mutation: never automatically replay after an ambiguous failure.
// client: RuleServiceClient; request: PauseRuleRequest; signal: AbortSignal
const response = await client.pauseRule(request, { signal });
ResumeRule
ResumeRule undoes PauseRule.
- Path:
/backplane.console.v1.RuleService/ResumeRule. - Input:
ResumeRuleRequest; output:ResumeRuleResponse; mode: unary. - Errors: rule + common.
- Database mutation: never automatically replay after an ambiguous failure.
// client: RuleServiceClient; request: ResumeRuleRequest; signal: AbortSignal
const response = await client.resumeRule(request, { signal });
WatchRules
WatchRules streams ListRules: now, then again whenever it changes.
- Path:
/backplane.console.v1.RuleService/WatchRules. - Input:
WatchRulesRequest; output:WatchRulesResponse; mode: replacement snapshots. - Errors: rule + common.
- Long-lived read; recovery follows its stream semantics.
// client: RuleServiceClient; request: WatchRulesRequest; signal: AbortSignal
for await (const response of client.watchRules(request, { signal })) {
console.log(response);
}
TestRule
TestRule runs a rule on a sample event: the definition is compiled against the latest manifests, when is evaluated on the event and, when it matches (and not dry_run), a test run starts — workflow id test/rule/
- Path:
/backplane.console.v1.RuleService/TestRule. - Input:
TestRuleRequest; output:TestRuleResponse; mode: unary. - Errors: rule + common.
- External command: durable intent/result; never automatically replay. Additional audit statuses:
Unavailablebefore dispatch,Abortedif result persistence fails.
// client: RuleServiceClient; request: TestRuleRequest; signal: AbortSignal
const response = await client.testRule(request, { signal });
ListRuleRuns
ListRuleRuns is a rule's runs, newest first (Temporal visibility, workflow id prefix rule/
- Path:
/backplane.console.v1.RuleService/ListRuleRuns. - Input:
ListRuleRunsRequest; output:ListRuleRunsResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: ListRuleRunsRequest; signal: AbortSignal
const response = await client.listRuleRuns(request, { signal });
GetRuleRun
GetRuleRun is one run of the rule: status, input, result or failure, pending activities, history and the steps' timeline.
- Path:
/backplane.console.v1.RuleService/GetRuleRun. - Input:
GetRuleRunRequest; output:GetRuleRunResponse; mode: unary. - Errors: rule + common.
- Read/validation: safe to retry after a transient failure.
// client: RuleServiceClient; request: GetRuleRunRequest; signal: AbortSignal
const response = await client.getRuleRun(request, { signal });
CancelRuleRun
CancelRuleRun requests cancellation of a run of the rule.
- Path:
/backplane.console.v1.RuleService/CancelRuleRun. - Input:
CancelRuleRunRequest; output:CancelRuleRunResponse; mode: unary. - Errors: rule + common.
- External command: durable intent/result; never automatically replay. Additional audit statuses:
Unavailablebefore dispatch,Abortedif result persistence fails.
// client: RuleServiceClient; request: CancelRuleRunRequest; signal: AbortSignal
const response = await client.cancelRuleRun(request, { signal });