tessera

Pushes a share's scan verdict to whoever manages it, as server-sent events, so the uploader's page does not have to poll `GET /shares/{code}/manage`.

GET
/api/v1/shares/{code}/manage/events

Each event is named share and carries the same body as that route. The first is sent at once; another follows whenever the scanner records a verdict that changes it. The stream ends after the first event in which nothing is waiting on the scanner any more (scanning is false), so it ends at once for a share that was never held. It also ends if the share is deleted. A comment line every fifteen seconds keeps an idle connection open.

Authenticated as GET /shares/{code}/manage is. A browser's EventSource cannot send X-Share-Management-Token, so a client using the token reads the stream with fetch.

Errors

404 when no share the caller manages has that code.

cookietessera_session<token>

Set by POST /auth/login. A browser sends it automatically; it is HttpOnly, so page scripts cannot read or set it.

code*string

The retrieval code, normalised as for GET /shares/{code}.

X-Share-Management-Token?|

For an anonymous share, the token handed out at creation

share events, each carrying the share as its manager sees it

text/event-stream
  1. response

One event from GET /shares/{code}/manage/events, as the OpenAPI document describes it. Never built: the handler writes the event itself.

data*string

A [ShareResponse], as JSON.

event*string

Always share.

curl -X GET 'https://example.com/api/v1/shares/string/manage/events'
{  "data": "string",  "event": "string"}