# place.hud.getWorkspaceEvents

> The person's workspace, live: an open stream of server-sent events (text/event-stream), one covering every canvas they have open as a tab, which follows the tabs as they open and close. Each event's data is one JSON object, typed by its $type: place.hud.defs#tileEvent (a tile of an open canvas changed), #presenceEvent (who is on an open canvas: first for each as the stream opens, then as people come and go) or #canvasesEvent (the workspace changed: read getWorkspace again). A comment, ping, comes every 25 seconds when nothing else does. It is a query, not an XRPC subscription: subscriptions are WebSocket with DAG-CBOR frames, sequenced for backfill from a cursor, and this keeps no history to backfill from (what happened while no stream was open is read again from getWorkspace and getCanvas), while a browser's EventSource sends the session's cookie and reconnects by itself. It ends when the session does, or when the reader falls too far behind: connect again and read afresh. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.

- Kind: query
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getWorkspaceEvents)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getWorkspaceEvents/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getWorkspaceEvents/analytics)

## Query (`place.hud.getWorkspaceEvents`)

Type: query · GET

### Output (text/event-stream)


### Errors

- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The person's workspace, live: an open stream of server-sent events (text/event-stream), one covering every canvas they have open as a tab, which follows the tabs as they open and close. Each event's data is one JSON object, typed by its $type: place.hud.defs#tileEvent (a tile of an open canvas changed), #presenceEvent (who is on an open canvas: first for each as the stream opens, then as people come and go) or #canvasesEvent (the workspace changed: read getWorkspace again). A comment, ping, comes every 25 seconds when nothing else does. It is a query, not an XRPC subscription: subscriptions are WebSocket with DAG-CBOR frames, sequenced for backfill from a cursor, and this keeps no history to backfill from (what happened while no stream was open is read again from getWorkspace and getCanvas), while a browser's EventSource sends the session's cookie and reconnects by itself. It ends when the session does, or when the reader falls too far behind: connect again and read afresh. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "output": {
        "encoding": "text/event-stream"
      },
      "type": "query"
    }
  },
  "description": "The signed-in person's workspace, live, as server-sent events.",
  "id": "place.hud.getWorkspaceEvents",
  "lexicon": 1
}
```
