XISUITEDokumentation

Wiki Collaboration

4 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1

Keep the collab session alive#

POST/spaces/{spaceId}/wiki/{pageId}/collab/heartbeatToken

Parameter

NameOrtTypBeschreibung
spaceIdPflichtPfadstring–
pageIdPflichtPfadstring–

Request-Bodyapplication/jsonCollabHeartbeatDto

NameTypBeschreibung
sessionIdPflichtstring

Collab session UUID to keep alive

Antworten

  • 200{ alive }
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/wiki/{pageId}/collab/heartbeat" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"…"}'

Read the current collab snapshot state#

GET/spaces/{spaceId}/wiki/{pageId}/collab/snapshotToken

Parameter

NameOrtTypBeschreibung
spaceIdPflichtPfadstring–
pageIdPflichtPfadstring–

Antworten

  • 200Snapshot state (nulls when none)
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/wiki/{pageId}/collab/snapshot" \
  -H "Authorization: Bearer $XISUITE_TOKEN"

Persist a collab snapshot (CAS on seq + session; supports seed, stale-session takeover, and endSession)#

POST/spaces/{spaceId}/wiki/{pageId}/collab/snapshotToken

Parameter

NameOrtTypBeschreibung
spaceIdPflichtPfadstring–
pageIdPflichtPfadstring–

Request-Bodyapplication/jsonSaveCollabSnapshotDto

NameTypBeschreibung
sessionIdPflichtstring

Collab session UUID (owner of the snapshot)

seqPflichtnumber

Expected current snapshot seq (CAS token). The save wins only if the row still carries this seq; the stored seq becomes seq+1.

ydocStatePflichtstring

Full Yjs document state, base64-encoded (max ~14 MB binary)

stateVectorstring

Yjs state vector, base64-encoded

contentPflichtstring

Stringified TipTap JSON matching the ydoc state; sanitized and persisted to wiki_pages.content.

contentTextstring

Client-computed plain text (hint only; the server recomputes content_text authoritatively).

seedboolean

Seed mode: create the snapshot row iff none exists (409 SEED_CONFLICT when one does).

endSessionboolean

End the session after saving: clears active_session_id and bumps the page version hint so the trigger cuts a session-end version.

Antworten

  • 200{ seq, updatedAt }
  • 409SEED_CONFLICT | SESSION_CONFLICT | SEQ_CONFLICT
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/wiki/{pageId}/collab/snapshot" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"…","seq":0,"ydocState":"…","content":"…"}'

Mint a Realtime JWT for the page collab channel#

POST/spaces/{spaceId}/wiki/{pageId}/collab/tokenToken

Parameter

NameOrtTypBeschreibung
spaceIdPflichtPfadstring–
pageIdPflichtPfadstring–

Antworten

  • 200{ token, expiresAt, topic }
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/wiki/{pageId}/collab/token" \
  -H "Authorization: Bearer $XISUITE_TOKEN"
Stand: 25. Oktober 2026© 2026 XISUITE · AmberTech Solutions