Skip to main content

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.

FieldTypeDescription
thetanumber | nullDefault view direction in radians. null clears it.
transformnumber[]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.

ParameterTypeDescription
id (required)stringScan identifier.
file (required)FileImage 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 FINISHEDpanoramaURL, 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.