Project watches

/api/projects

Watch categories, standards and datasheets in a project's draft, stop watching, opt one item out of a category watch, and see who else watches. Offered to people who read the draft.

Endpoints

GET /api/projects/:id/watchers

Who watches what in this project's draft: every watch and every opt-out, with each person's name and initials. People who can edit the draft see everyone; anyone else who reads the draft sees only their own rows. 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: project:draft:view

PUT /api/projects/:id/watches

Watch a category, standard or datasheet in this project's open draft, so you get a notification when a revision of it is saved. A category watch covers every standard and datasheet in it and in its subcategories, including ones added later. Calling it again returns the same watch (200; 201 when new) and removes your opt-out of the same item, if you had one.

Required permission: project:draft:view

Request body (JSON)

Required

DELETE /api/projects/:id/watches/:watchId

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

Required permission: project:draft:view

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

Stop watching this one: opt a standard or datasheet out of a watch of yours that covers it (a category watch, or for a datasheet the watch on its standard) while keeping that watch. Refused with 400 when nothing of yours covers it. Also removes your direct watch on the same item, if you had one. Calling it again returns the same opt-out.

Required permission: project:draft:view

Request body (JSON)

Required

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

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

Required permission: project:draft:view