Change how many rounds a work may take
Code Mode: praxis.studio.works.reviewSettings.update
HTTP: PATCH /studio/v1/works/{work}/review-settings
Change how many rounds a work may take. Send expected_revision with the revision this settings read returned, so two writers cannot overwrite each other silently; a mismatch answers REVISION_CONFLICT and the settings are unchanged. A person makes this change: an agent calling it is refused with PERMISSION_DENIED. The settings are locked while a round of this work is reviewing, which answers REVIEW_IN_PROGRESS; change them after the round decides or is cancelled. Raising max_rounds is how a draft whose rounds are used up is sent again. The changed limit applies to rounds sent from now on and never rewrites a round already sent; who reviews is on the reviewer roster, not here.
Signature
praxis.studio.works.reviewSettings.update(args:{path:{/** e.g. "wu-gang" */ work:string};body:{/** Revision the settings read returned; a mismatch means somebody else changed the panel in between and this call is refused, so read the settings again and repeat e.g. 3 */ expected_revision:number;/** Most rounds the work may take from now on, counting the first; leave the field out to keep the current limit. e.g. 3 */ max_rounds?:number}}):Promise<{/** Most rounds this work may take, counting the first one; sending another round after that answers REVIEW_ROUND_LIMIT until a person raises this number. e.g. 2 */ max_rounds:number;/** Revision of these settings, advanced by one on every change; pass it as expected_revision when changing them. e.g. 3 */ revision:number}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| work | path | string | yes | The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json | The settings to change: the maximum rounds, and the revision the current settings were read at. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The settings after the change, with revision advanced by one. |
| 400 | application/json | INVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call. |
| 401 | application/json | The API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header. |
| 403 | application/json | PERMISSION_DENIED means the caller is not a person of this organization: the reviewer roster, the review settings and cancelling a round are the owner’s decisions and an agent cannot make them. Report what needs to change to the person who owns the work instead of repeating the call. |
| 404 | application/json | WORK_NOT_FOUND means no work in this organization matches that slug or identifier; use the value from the work list, or resolve a loose name first. |
| 409 | application/json | REVISION_CONFLICT means the settings changed since the expected_revision you sent, so nothing was written; read the settings again, apply your change to what you just read and repeat with the revision it returns. REVIEW_IN_PROGRESS means a round of this work is reviewing and the settings are locked until it decides or is cancelled. |
| 500 | application/json | INTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed. |