latestOpenAPI 3.0.32026-08-137683171.1 KB

be08f4f706f5

Assets

Replace the active defect priority mapping (priority values only)

Versioned write: deactivates the prior active row and inserts a new one with version+1. Customer-facing edits are LIMITED TO priority values: the (Equipment, Type, Defect) keyset is immutable from this endpoint. Adding or removing keys requires a super-admin re-import via the admin API after the CVAT project schema is updated -- 409 with code='schema_keys_immutable' when the request would change the keyset.

Optional applyToExisting (default false) bulk-rewrites every existing defect row whose (asset_type, defect_name) tuple has a changed priority value, while preserving rows marked priority_source='manual'.

Permission: defects:write.

put/defect-priority-mapping

Headers

Idempotency-Keystring uuid

Idempotency key for POST requests. If a transaction with the same key already exists for the org, the server returns the original response without re-executing. Keys are valid for 48 hours.

Request body

mappingobject required

Three-level Equipment / Type / Defect JSONB. See voltair-admin-api/src/service/defect_priority_mapping.go::validateMappingShape for the canonical shape; it is enforced server-side.

applyToExistingboolean

Response

Success

transactionIdstring uuid required