Skip to main content
PUT
Update AI Session Analyzer Rule

Path Parameters

name
string
required

The name of the resource

Body

application/json

The request body resource

connection_names
string[]
required

Connection names this rule applies to

Example:
name
string
required

Unique name for the rule

Example:

"block-dangerous-queries"

risk_evaluation
object
required

Risk evaluation actions per level

agentic
boolean

When true, the analyzer runs an agentic tool-calling loop over past sessions and resource metadata before classifying.

Example:

false

approval_ttl_sec
integer

Seconds an approval lasts from the approval, 60 to 604800. The same rules as pending_ttl_sec

Example:

600

custom_prompt
string

Optional extra instructions appended to the default system prompt

Example:

"Treat any query that touches the payments schema as high risk."

description
string

Optional description

Example:

"Blocks high-risk SQL commands"

pending_ttl_sec
integer

Seconds a held statement's review may wait for a decision, 60 to 604800. Control plane, read only while sidecar_spec holds under its own approval rule. Absent keeps, 0 clears

Example:

900

reviewers_groups
string[]

ReviewersGroups are the groups whose members may release a statement this rule holds for approval. Absent keeps the groups already set; with none set the admin group reviews.

A control plane field, read only while sidecar_spec holds a statement.

Example:
sidecar_spec
object

SidecarSpec is this rule in the SIDECAR's own vocabulary, which the gateway's fields above do not share: a trigger, risk actions spelled allow / warn / block / defer, and the per-lane cost overrides. It IS the analyzer block the listener receives.

A control plane field. A gateway has no sidecars and refuses it.

sidecar_targets
object[]

SidecarTargets names the sidecar LISTENERS that must run this analysis. One block per listener: two rules bound to one listener is refused rather than merged.

A POINTER because absent and empty are different instructions: absent leaves the bindings exactly as they are, and [] unbinds the rule from every sidecar. Without that distinction any write that did not mention the field -- a script fixing a typo, the gateway's own UI, an MCP call -- would silently unbind a rule from the whole fleet.

Response

OK

agentic
boolean

When true, the analyzer runs an agentic tool-calling loop over past sessions and resource metadata before classifying.

Example:

false

approval_ttl_sec
integer

Seconds an approval lasts from the approval. Present as pending_ttl_sec is

Example:

600

connection_names
string[]

Connection names this rule applies to

Example:
created_at
string
read-only

The time the resource was created

Example:

"2024-07-25T15:56:35.317601Z"

custom_prompt
string

Optional extra instructions appended to the default system prompt

Example:

"Treat any query that touches the payments schema as high risk."

description
string

Optional description

Example:

"Blocks high-risk SQL commands"

id
string<uuid>
read-only

The resource identifier

Example:

"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7"

managed_by
string
read-only

Set to "hoop" when the rule is materialized and lifecycle-managed by a protection profile; managed rules are read-only through this API

Example:

"hoop"

name
string

Unique name for the rule

Example:

"block-dangerous-queries"

pending_ttl_sec
integer

Seconds a held statement's review may wait for a decision. Present only in a control plane, while the rule holds and the limit is set

Example:

900

reviewers_groups
string[]

The groups whose members may release a statement this rule holds. Present only in a control plane, while the rule holds.

Example:
risk_evaluation
object

Risk evaluation actions per level

sidecar_spec
object

SidecarSpec is this rule in the sidecar's own vocabulary; see the request type. Present only in a control plane.

sidecar_targets
object[]

The sidecar listeners this rule is bound to, and therefore distributed to

updated_at
string
read-only

The time the resource was updated

Example:

"2024-07-25T15:56:35.317601Z"