17  Gallery

2 operations.

17.0.1 getAssetTileset

GET /api/gallery/assets/{assetId}/tileset

Resolves where a 3D model’s tiles actually live so the viewer can stream them.

Why it exists. † Return the tile manifest for a large 3D scene, so the viewer can stream the model progressively instead of downloading it whole.

Resolves a 3D Tiles / Gaussian-splat tileset manifest for a gallery asset. All-numeric ids short-circuit to Cesium Ion; other ids are looked up in the datasets’ gaussian_splats (RLS-scoped, under the caller’s session cookie).

Authentication: CookieAuth

Returns — not readable from the source: the handler returns a value assembled at run time rather than a literal.

Effect — reads datasets

Parameters

Name In Required Type Notes
assetId path yes string

Responses

Status Meaning Body
200 Tileset manifest.
401 Authentication required. Error
403 Access denied for this asset. Error
500 Manifest not found or lookup failure (no 404 is emitted). Error

17.0.2 logAssetViewerEvent

POST /api/gallery/assets/{assetId}/viewer-events

Records viewer telemetry events (no login; placeholder — logs only).

Why it exists. ‡ Record how a user moved through a 3D asset, for viewer analytics. A placeholder: it reports success and stores nothing.

Called by — app/(authenticated)/datasets/[slug]/components/dataset-detail-client.tsx · modules/photo-map-3d/core/hooks/use-viewer-session.ts

Reached from — /datasets/<slug> · /w/data-explorer/anomalies/map · /w/data-explorer/assets · /w/integrity/assets · /w/integrity/evidence-explorer

Unauthenticated stub telemetry sink — logs a viewer event for an asset to the server console. No persistence.

Authentication: none

Returns — status · message

Field names as the handler returns them; the source states no types for them.

Parameters

Name In Required Type Notes
assetId path yes string

Responses

Status Meaning Body
200 Logged.