SetObservers

[POST] .../v1/projecttask/setobservers

Changes the task observer list Use this method to replace or append the observer list for an existing task. The method changes observer_user_ids according to replace_mode, updates task chat participants and observer notifications through the persistent layer and returns UpdateResult. The request body must contain a valid task id, the caller needs task observer management permission and missing body, invalid id, denied access, missing task, database failures or persistent errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id Int64 Required Task ID.
observer_user_ids Array of Int64 Optional Observer ID list.
replace_mode Boolean Optional true - replace the list; false - append to the current list.

Request Example

{
  "id": 101,
  "observer_user_ids": [
    18,
    24
  ],
  "replace_mode": true
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}