Skip to main content
PATCH
Update asset policy
The update_type query parameter controls how values are merged:In replace mode, alerting_config_ids is required for alert policies and labels is required for set_label/remove_label policies.

Example Requests

Append new labels to an existing policy

Replace policy conditions entirely

Authorizations

X-API-Key
string
header
required

Path Parameters

policy_id
string
required

Unique identifier of the asset policy

Query Parameters

update_type
enum<string>

Update strategy. append (default) merges new values with existing ones. replace overwrites the entire policy โ€” all required fields for the policy type must be provided.

Available options:
append,
replace

Body

application/json
policies
AssetFilters ยท object
name
string

Display name for the policy

enumeration_ids
string[]

Optional list of enumeration IDs to scope this policy to specific enumerations

policy_type
enum<string>

Type of action to perform when policy matches assets

Available options:
alert,
delete,
set_label,
remove_label
labels
string[]

List of labels to apply/remove (required when policy_type is set_label or remove_label). In append mode, merged with existing labels. In replace mode, replaces all labels.

alerting_config_ids
string[]

List of alerting configuration IDs (required when policy_type is alert). In append mode, merged with existing configs. In replace mode, replaces all configs.

apply_to_existing
boolean

When true, the policy action is applied to existing matching assets in addition to future assets.

Response

OK

message
string
id
string