v1

latestOpenAPI 3.1.02026-07-13125160383.6 KB

Create asset policy

Create a new asset policy that automatically takes action on assets matching defined conditions. Supported actions: alert (send notifications), delete (remove assets), set_label (add labels), and remove_label (remove labels).

post/v1/asset/policy

Request body

namestring

Display name for the policy. Auto-generated if not provided.

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

Type of action to perform when policy matches assets

alerting_config_idsstring[]

List of alerting configuration IDs (required when policy_type is 'alert')

labelsstring[]

List of labels to apply/remove (required when policy_type is 'set_label' or 'remove_label')

enumeration_idsstring[]

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

apply_to_existingboolean

When true, the policy action is applied to existing assets that match the conditions in addition to future assets. When false (default), the policy only applies to newly discovered assets.

Response

OK

messagestring
idstring

Unique identifier of the created policy