Add a reviewer to a work
Code Mode: praxis.studio.works.reviewers.create
HTTP: POST /studio/v1/works/{work}/reviewers
Put one of this organization’s service agents on the work’s reviewer roster, with the kind it reviews as: expert writes a scored report, audience fills a screening card. Every round sent from now on asks every roster member of that round’s kind, so add only agents that should judge every round of this work. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. Pass the agent id as /v1/agents returns it (agent_…). The agent must be a service agent of this organization: anything else, including an absent id and another organization’s agent, answers REVIEWER_NOT_SERVICE_AGENT. An agent already on the roster answers REVIEWER_ALREADY_ADDED; change its kind with the update operation instead.
Signature
praxis.studio.works.reviewers.create(args:{path:{/** e.g. "wu-gang" */ work:string};body:{/** Service agent of this organization to add, by the agent_ id /v1/agents returns for it; the agent must exist in this organization and be a service agent, or the e.g. "agent_0b6f3c2e-6d1a-4f2b-9c47-2e8a5d1f7a30" */ agent:string;/** Kind this reviewer reviews as on this roster: expert writes a scored report, audience fills a screening card. e.g. "audience" */ 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. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json | The reviewer to add: the agent and the kind it reviews as on this roster. |
Responses
| Status | Content types | Description |
|---|---|---|
| 201 | application/json | The reviewer as it now stands on the roster, with its display name. |
| 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 | REVIEWER_NOT_SERVICE_AGENT means that agent is not a service agent of this organization, so it cannot review; add one of the organization’s service agents instead. REVIEWER_ALREADY_ADDED means the agent is already on this work’s roster, so change its kind with the update operation rather than adding it again. |
| 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. |