v1

latestOpenAPI 3.1.02026-07-13125160383.6 KB

Update asset policy

Update an existing asset policy. Use append mode to merge new values with existing ones (e.g., add alerting configs or labels without removing current ones). Use replace mode to completely overwrite the policy configuration.

patch/v1/asset/policy/{policy_id}

Query parameters

update_type'append' | 'replace'

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.

Request body

namestring

Display name for the policy

enumeration_idsstring[]

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

policy_type'alert' | 'delete' | 'set_label' | 'remove_label'

Type of action to perform when policy matches assets

labelsstring[]

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_idsstring[]

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_existingboolean

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

Response

OK

messagestring
idstring