Scan Label Replacement
Focus
Focus
Prisma AIRS

Scan Label Replacement

Table of Contents


Scan Label Replacement

Replace the complete set of existing labels on the scan with the new provided labels.

SetLabels API

Replace the complete set of existing labels on the scan with the new provided labels.
Using CLI
model-security set-scan-labels \ --scan-uuid "550e8400-e29b-41d4-a716-446655440000" \ --labels '[{"key":"env","value":"staging"},{"key":"version","value":"v2-0"},{"key":"deployed","value":"false"}]'
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") # Replace all existing labels client.set_scan_labels( scan_uuid=scan_uuid, data=LabelsCreateRequestSchema( labels=[ LabelSchema(key="env", value="staging"), LabelSchema(key="version", value="v2-0"), LabelSchema(key="deployed", value="false"), ] ) ) print(f"Labels set for scan {scan_uuid} (all previous labels removed)")