Change a reviewer's kind
Code Mode: praxis.studio.works.reviewers.update
HTTP: PATCH /studio/v1/works/{work}/reviewers/{agent}
Change the kind one roster member reviews as: expert or audience. Use it when a reviewer should judge a different way, rather than removing it and adding it back, because the roster position it holds decides its label and is kept. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. A round already sent is not affected, because its seats were fixed when it was sent. An agent that is not on this work’s roster answers REVIEWER_NOT_FOUND, which is also the answer for another work’s reviewer.
Signature
praxis.studio.works.reviewers.update(args:{path:{/** e.g. "wu-gang" */ work:string;/** e.g. "agent_0b6f3c2e-6d1a-4f2b-9c47-2e8a5d1f7a30" */ agent:string};body:{/** Kind this reviewer reviews as from now on; rounds already sent keep the kind they were sent with. e.g. "expert" */ kind:"expert"|"audience"}}):Promise<{/** Identifier of the reviewer agent, and the value the reviewer path segment takes. e.g. "agent_0b6f3c2e-6d1a-4f2b-9c47-2e8a5d1f7a30" */ agent:string;/** Resource kind marker, always studio.reviewer for this shape. e.g. "studio.reviewer" */ object:string;/** Identifier of the work this roster belongs to; a reviewer is on one work's roster and has no address outside it. e.g. "wk_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ work:string;/** Kind this reviewer reviews as on this roster, which decides which rounds ask it and what it is asked for. e.g. "audience" */ kind:"expert"|"audience";/** Display name of the reviewer agent, such as 宝妈, shown where a person reads the roster. e.g. "宝妈" */ name:string}>;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. |
| agent | path | string | yes | Reviewer being addressed, by the agent value this work’s reviewer list returns for it; a reviewer is a member of one work’s roster, so it has no address outside that work. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json | The kind this reviewer should review as from now on. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The reviewer with its new kind; the rest of its entry is unchanged. |
| 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 | REVIEWER_NOT_FOUND means that agent is not on this work’s reviewer roster; read the work’s reviewer list and pass one of the agent values it returns, since another work’s reviewer answers the same way. |
| 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. |