Skip to navigation

Update DLP Rule

Update the fields you send. Seeded rules accept only enabled and action.

Authentication

AuthorizationBearer

A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.

Path parameters

rule_idstringRequiredformat: "uuid"

The rule’s id.

Request

This endpoint expects an object.
actionenum or nullOptional

log records a match and sends the prompt unchanged, redact replaces each match with a placeholder such as <US_SSN> before the prompt is sent, and block refuses the request with 422. Omit, or send null, to keep the current value.

Allowed values:
descriptionstring or nullOptional
Seeded rules accept only enabled and action. Omit, or send null, to keep the current value.
enabledboolean or nullOptional
Omit, or send null, to keep the current value.
entity_typestring or nullOptional1-80 characters

The rule’s name. Unique among the organization’s custom rules. Seeded rules accept only enabled and action. Omit, or send null, to keep the current value. Renaming is refused (409) while project or customer overrides use the current name.

keywordslist of strings or nullOptional

Seeded rules accept only enabled and action. Send [] to clear them. Omit, or send null, to keep the current value. A custom rule keeps at least one of pattern and keywords.

patternstring or nullOptional<=500 characters
Seeded rules accept only enabled and action. Send "" to clear it. Omit, or send null, to keep the current value. A custom rule keeps at least one of pattern and keywords.

Response

The updated DLP rule
actionenum

log records a match and sends the prompt unchanged, redact replaces each match with a placeholder such as <US_SSN> before the prompt is sent, and block refuses the request with 422.

Allowed values:
categoryenumRead-only

custom for rules the organization creates; global and usa are seeded.

Allowed values:
created_atdatetimeRead-only
For a seeded rule never changed, the time of the request.
descriptionstring
What the rule detects.
detection_methodstringRead-only

How the rule finds matches, like Pattern match and checksum.

display_namestringRead-only
The name the dashboard shows.
enabledboolean
Whether the rule scans requests.
entity_typestring
The rule's name. Unique among the organization's custom rules.
idstringRead-onlyformat: "uuid"
Stable for seeded rules, even before they are first changed.
is_seededbooleanRead-only
Seeded rules can't be created or deleted, only enabled and given an action.
keywordslist of strings or null
Words the rule matches, if it has any.
patternstring or null
The rule's regular expression, if it has one.
updated_atdatetimeRead-only
When the rule last changed.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
502
Bad Gateway Error