Add Scan Labels
Focus
Focus
Prisma AIRS

Add Scan Labels

Table of Contents


Add Scan Labels

Add new labels or modify existing ones on a scan.

AddLabels API

Add new labels or modify existing ones on a scan. When a label key already exists, the previous value will be replaced:
Using CLI
model-security add-scan-labels \ --scan-uuid "550e8400-e29b-41d4-a716-446655440000" \ --labels '[{"key":"owner","value":"alice"},{"key":"priority","value":"high"},{"key":"reviewed","value":"true"}]'
Using Python SDK
from uuid import UUID from model_security_client.api import ModelSecurityAPIClient from model_security_client.generated.data.models.LabelsCreateRequestSchema import LabelsCreateRequestSchema from model_security_client.generated.data.models.LabelSchema import LabelSchema client = ModelSecurityAPIClient( base_url="https://api.sase.paloaltonetworks.com/aims" ) scan_uuid = UUID("550e8400-e29b-41d4-a716-446655440000") # Add new labels or update existing ones client.add_scan_labels( scan_uuid=scan_uuid, data=LabelsCreateRequestSchema( labels=[ LabelSchema(key="owner", value="alice"), LabelSchema(key="priority", value="high"), LabelSchema(key="reviewed", value="true"), ] ) )