be08f4f706f5
List site inspections
Returns SiteInspection records for the caller's organization. All filter parameters are optional; row-level security confines results to the caller's organization.
Query parameters
Restrict to inspections for a single site.
Restrict to inspections for a single mission.
Restrict to inspections that contain at least one asset inspection for this asset.
When true, restrict to inspections that have at least one comment on any associated media (site-level via site_inspection_media, or asset-level via the site's asset_inspections). Any other value is treated as absent.
Case-insensitive substring match (ILIKE) on the joined site's name. Pass plain text; the server wraps it with % on both sides.
Repeating allowlist on the joined site's site_type. Empty/absent means any.
Repeating GeoJSON geometry-type allowlist on the joined site's geometry (mapped to ST_GeometryType internally). Empty/absent means any.
Repeating allowlist on the denormalized sites.priority column (none also matches a NULL priority). Empty/absent means any.
Repeating allowlist bucketing each site inspection by its defects' workDoneAt flags: all_resolved (every defect resolved), some_resolved (a mix), none_resolved (at least one defect, none resolved). Site inspections with zero defects match no bucket and are excluded when this filter is active.
Repeating allowlist bucketing each site inspection by its defects' reviewedAt flags: all_reviewed (every defect reviewed), some_reviewed (a mix), none_reviewed (at least one defect, none reviewed). Site inspections with zero defects match no bucket and are excluded when this filter is active.
When true, flags mission SiteInspection rows that could not be captured with not_capturable: true, derived from the inspection's capture-failed state (the could-not-capture signal). Requires missionId; sending it without missionId is a 400. The flagged rows are real inspections and pass through the same filters and pagination as other rows.
Page size (default 50, max 200)
Opaque pagination cursor from a previous response
Response
Success