Skip to main content
POST
UpsertRule

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
id
string<uuid>

Client-supplied UUID identifying the rule. The same id updates the same rule; a new id creates a new rule.

dimension
enum<string> | null

The dimension the rule categorises along. Required when creating; omit to keep it on update.

Available options:
CATEGORY_DIMENSION_UNSPECIFIED,
CATEGORY_DIMENSION_TECHNICAL,
CATEGORY_DIMENSION_GOVERNANCE
scope
enum<string> | null

Scope of the rule. Defaults to RULE_SCOPE_WORKSPACE when creating; omit to keep it on update. Platform-provided rules cannot be edited from a workspace.

Available options:
RULE_SCOPE_UNSPECIFIED,
RULE_SCOPE_GLOBAL,
RULE_SCOPE_WORKSPACE
title
string | null

Human-readable title, shown wherever the rule is credited for a category. Required when creating; omit to keep it on update.

Required string length: 1 - 200
category
string | null

The category assigned to matching checks. Required when creating; omit to keep it on update. Prefer a name the workspace already uses — read them from ChecksCategoriesService.ListCategories.

Required string length: 1 - 200
matcher
attributes · object

Which checks the rule applies to. Required when creating; omit to keep it on update. Replaces the previous matcher wholesale — there is no partial update within a matcher.

priority
integer<int32> | null

Rank within the rule's scope: the highest number is tried first. Defaults to 0 when creating; omit to keep it on update.

Required range: -1000000 <= x <= 1000000
etag
string | null

Optional optimistic-concurrency guard. When set, the write fails with a conflict if the rule was modified since this etag was read.

Maximum string length: 100
actor
Actor · object

Who is making the change, when the caller acts on someone's behalf — an agent, a bot, an automation. Recorded as the editor and shown back on reads. Omit it when the caller's own credentials already identify them.

Response

200 - application/json

Success

rule
CategorisationRule · object

The stored rule after the write.