API v2 JavaScript demo¶
The maintained browser demo is the reference thin client for API v2. While AcqStore Server is running, open:
http://127.0.0.1:8767/demo/v2/
It requires the packaged desktop application (or an equivalent running server). Use the live page as a behavior reference when building another client; you do not need application source code.
Lifecycle exercised by the demo¶
The demo intentionally exercises the open → display → replace-session baseline:
POST /api/v2/pick-and-open(Open File in the UI)GET /api/v2/sessions/{sessionId}- fetch each source
channels[].dataUrl - fetch each optional
reference.channels[].dataUrl - decode raw little-endian float32 data
- validate
byteLengthandplane.shape - transpose immediately before canvas display
- optional reference
scanPath/lineRoioverlay (display-only;scanPathis{x,y}arrays,lineRoiis[x0,y0,x1,y1]in reference pixel space — see API contract) - display-only contrast (LUT + intensity range) on stored float planes
- interactive per-image navigation (wheel/pinch zoom; square images: drag a square region to zoom; non-square: H/V axis-zoom drag; Shift+pan; double-click home; unequal planes stretch-fill the wrap)
- optional per-group Composite (source and reference independently): each channel’s LUT + range, additive RGB clamp
- optional per-pane Axes ticks in physical units from
plane.axes(adaptive major/minor; Y is 0 at bottom after display transpose) DELETE /api/v2/sessions/{sessionId}automatically when opening a new file (the UI no longer has a Delete session button)
Clients should still call GET /api/v2/health and GET /api/v2/capabilities when building their own apps (formats, binary encoding, session TTL). The maintained demo no longer surfaces those responses in the page chrome.
The maintained demo UI does not expose POST /api/v2/open. That path remains part of the HTTP API for other clients (see the API reference and Build a client).
The server uses AcqStore and AcqImage to open the acquisition. The demo displays source channels, optional reference channels, the AcqStore header, live session metadata (collapsed), and the full open response (collapsed).
Orientation¶
The API returns the original row-major two-dimensional plane. The server never transposes it.
Immediately before canvas rendering, the demo calls transposePlane() for both source and reference planes. This is a demo display decision and does not alter the HTTP contract.
Display-only controls¶
Contrast (per-channel LUT + min/max range), per-pane Composite (LUT-colorize each channel then add RGB), and the reference scan-path overlay affect display only. They do not change the underlying image data or HTTP responses.
Compatibility¶
Keep this demo synchronized with the API reference, JavaScript guide, and OpenAPI contract tests.