API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · entity_watchers

Entity Watcher Schema

Schema-ID
entity_watcher
Collection
entity_watchers
Permissions
  • Lezenentity_watcher_view
  • Aanmakenentity_watcher_manage
  • Wijzigenentity_watcher_manage
  • Verwijderenentity_watcher_manage

Velden

Entity Watcher Schema

entity_watchers4 permissions

Schema for validating entity watcher subscriptions (Beobachter)

entityTypestringvereist

Target COLLECTION name (plural, e.g. "tickets" / "hr_tickets") — not the singular schema id. Matches the `entityType` convention of the notifications collection.

max. 64 tekensread-only
entityIduuidvereist

UUIDv7 of the watched record.

read-only
userIduuidvereist

INTERNAL user id (`users._id`, UUIDv7) — never the better-auth session id. Everything downstream (notifications, data scopes) speaks internal ids.

read-only
userNamestringoptioneel

Denormalized display name for the watcher chips, so the list does not need an N+1 join. Display-only; `userId` is authoritative.

max. 200 tekensnullable
originstringoptioneel

How the subscription came to be. MANUAL = clicked "Beobachten". The AUTO_* origins come from ADR 0515 §4 (commented / was mentioned / handed the ticket over) and are what the per-user auto-watch toggle switches off. Kept for the UI hint and for measuring whether auto-watch pulls its weight.

MANUALAUTO_COMMENTAUTO_MENTIONAUTO_HANDOVER
Default: "MANUAL"read-only
mutedUntildatetimeoptioneel

Silence deliveries until this instant WITHOUT losing the subscription. Null = active.

nullable
remindAtdatetimeoptioneel

Personal reminder: notify THIS watcher at this instant. Cleared by the worker once delivered. Null/missing = no reminder. Private to the watcher — other users never see it.

read-onlynullable
reminderNotestringoptioneel

Optional note shown in the reminder notification. Private to the watcher.

max. 500 tekensread-onlynullable

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/entity_watchers — Lijst, gepagineerd + filterbaar
  • GET /api/v1/entity_watchers/<id> — Enkele entity
  • POST /api/v1/entity_watchers — Aanmaken
  • PATCH /api/v1/entity_watchers/<id> — Gedeeltelijke update
  • DELETE /api/v1/entity_watchers/<id> — Soft-delete
  • GET /api/v1/entity_watchers/<id>/timeline — Audit + activiteiten

Zoeken