Scans
Available on NTController.scans.
scans.update(id, body)
PATCH /api/v1/scans/{id}
Updates a scan's default view direction or its pose within the floor plan.
| Field | Type | Description |
|---|---|---|
theta | number | null | Default view direction in radians. null clears it. |
transform | number[] | Column-major 4×4 matrix, 16 elements, positioning the scan in the tour. |
Returns void
await NTController.scans.update(scanId, { theta: Math.PI / 2 });
scans.delete(id)
DELETE /api/v1/scans/{id}
Returns void
scans.getThumbnailUploadURL(id)
POST /api/v1/scans/{id}/thumbnail
Issues a presigned POST target for the scan's thumbnail. Use
uploadThumbnail unless you need to drive the
upload yourself.
Returns PresignedUpload
scans.uploadThumbnail(id, file)
Requests a presigned target and sends the image straight to storage, so the file never passes through the API.
| Parameter | Type | Description |
|---|---|---|
id (required) | string | Scan identifier. |
file (required) | File | Image file. Maximum 500 KB. |
Returns void
const file = input.files[0];
await NTController.scans.uploadThumbnail(scanId, file);
note
A file over 500 KB rejects with a plain Error before any request is sent.
Reading scan images
A scan only has images once processing reaches FINISHED — panoramaURL,
panoramaLowResURL and thumbnailURL are null until then. Filter on status
before rendering:
const viewable = room.scans.filter(scan => scan.status === "FINISHED");
See ScanStatus for every value.