跳转到内容
EN

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.

签名

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}>;

参数

名称位置类型必填说明
workpathstring是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.

请求体

必填内容类型说明
是application/jsonThe settings to change: the maximum rounds, and the revision the current settings were read at.

响应

状态码内容类型说明
200application/jsonThe settings after the change, with revision advanced by one.
400application/jsonINVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call.
401application/jsonThe API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header.
403application/jsonPERMISSION_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.
404application/jsonWORK_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.
409application/jsonREVISION_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.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.