---
title: "List defects for an asset"
method: GET
path: "/defects"
tags: ["Assets"]
---

# List defects for an asset

`GET /defects`

Lists defects filtered by `assetId` (required). RLS confines
results to the caller's organization.

## Query parameters

- `assetId` string, uuid, required
- `limit` integer
- `cursor` string

## Response `200`

Success

- object
  - `data` Defect[], required
    - `id` string, uuid, required
    - `organizationId` string, uuid, required
    - `assetId` string, uuid, required
    - `assetInspectionId` string, uuid, required
    - `assetType` string, required
    - `defectName` string, required
    - `defectPriority` integer, required — 1 = highest severity, 4 = none/normal
    - `prioritySource` 'mapping' | 'manual', required — Where `defectPriority` came from. Bulk schema edits only touch rows where `prioritySource='mapping'` so reviewer manual overrides survive.
    - `defectPriorityMappingId` string, uuid, nullable — Active defect_priority_mappings.id at the time defectPriority was last derived. Informational/audit; nullable on legacy rows imported before this column existed.
    - `workDoneAt` number, nullable, required — Unix ms timestamp marking this defect as addressed in the field. Null while unaddressed. When non-null, the defect is excluded from the asset priority rollup.
    - `reviewedAt` number, nullable — Unix ms timestamp the customer marked this defect reviewed (the 'Reviewed by' mark). Null when not reviewed. Set/cleared via PATCH /defects/{id} { reviewed }.
    - `reviewedByName` string, nullable — Display name of the actor who set the current reviewed state. Null when not reviewed; empty string for api-key actors with no user row. Resolved from reviewedByActorId; present on list/expand reads, omitted on the mutation response.
    - `description` string, nullable — Longest non-empty `description` across the parent's live DefectEvidence rows. Maintained by the CVAT export — the API and UI read this column directly rather than aggregating across evidence on every fetch.
    - `deletedAt` number, nullable, required
    - `createdAt` number, required
    - `evidence` DefectEvidence[] — Populated only when `evidence` is requested via expand[]. Otherwise omitted.
      - `id` string, uuid, required
      - `defectId` string, uuid, required
      - `cvatShapeUid` string, nullable — Stable id `<cvat_task_id>:<cvat_shape_id>` of the source CVAT shape. NULL on non-CVAT-sourced rows (none today).
      - `evidenceMediaId` string, uuid, nullable — Original (uncropped) mission_media row that the lineman annotated.
      - `bbox` object, nullable — Bounding box in evidence_media_id pixel coordinates: {"x1": int, "y1": int, "x2": int, "y2": int}.
      - `description` string, nullable — Free-form text the lineman attached to this specific CVAT shape (Comment attribute on regular labels, Description on the Other catch-all).
      - `reviewUncertain` boolean, required — True when this shipped evidence crop came from QA consensus=agreed_uncertain. The customer platform rolls this up to an Uncertain tag on the merged defect.
      - `deletedAt` number, nullable, required
      - `createdAt` number, required
  - `meta` PaginationMeta, required
    - `cursor` string, nullable, required — Opaque cursor for the next page; null when no more results
    - `total` integer — Total matching results across all pages; included when cheaply computable

## Other responses

- `400` — Bad request or validation error
- `401` — Authentication required
- `403` — Insufficient permissions
- `404` — Resource not found
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/voltairlabs/apis/voltair-api.md) · [All operations](https://skmtc.net/voltairlabs/apis/voltair-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voltairlabs/voltair-api/revisions/be08f4f706f5/schema)
