Library watches

/api/libraries

The same for the categories and standards of a company library. Personal libraries and the SynC Standards library have no watches yet.

Endpoints

GET /api/libraries/:id/watchers

Who watches what in this company library. People who can edit the library's standards see everyone; anyone else who reads it sees only their own rows. Personal libraries and the SynC Standards library have no watches yet and answer 404. Returns { all, watches, exclusions }. Each row carries id, user_id, display_name, initials, target_type, target_id and created_at. all is true when every watcher is listed; otherwise both lists hold only your own rows.

Required permission: standard:read

PUT /api/libraries/:id/watches

Watch a category or standard in this company library, so you get a notification when a revision of it is saved. Datasheets are watched in a project, not here (400). Calling it again returns the same watch (200; 201 when new).

Required permission: standard:read

Request body (JSON)

Required

DELETE /api/libraries/:id/watches/:watchId

Stop watching: remove one of your own watches in this library. Answers 204.

Required permission: standard:read

PUT /api/libraries/:id/watch-exclusions

Stop watching this one: opt a standard out of a category watch of yours while keeping the category watch. Refused with 400 when no category watch of yours covers it.

Required permission: standard:read

Request body (JSON)

Required

DELETE /api/libraries/:id/watch-exclusions/:exclusionId

Watch again: remove one of your own opt-outs in this library. Answers 204.

Required permission: standard:read