# Episodes_ReviewSuggestions

`POST /v1/accounts/{account}/datasets/{dataset}/episodes:reviewSuggestions`

Settles every PROPOSED subtask span of one origin over the episodes a
filter leaves: accept or reject in one call.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header

## Parameters

- `account` (path, string, required): The account id.
- `dataset` (path, string, required): The dataset id.

## Request body

Required: `application/json` `qualia.v1.ReviewSuggestionsRequest`

## Responses

- `200` OK: `application/json` `qualia.v1.ReviewSuggestionsResponse`
- `default` Default error response: `application/json` `google.rpc.Status`

## Schemas

```yaml
qualia.v1.ReviewSuggestionsRequest:
  required:
    - parent
    - selection
    - review
  type: object
  properties:
    parent:
      type: string
      description: accounts/{account}/datasets/{dataset}
    selection:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.EpisodeSelection"
      description: Which episodes.
    origin:
      enum:
        - ORIGIN_UNSPECIFIED
        - HUMAN
        - MODEL
        - HEURISTIC
      type: string
      description: Only spans of this origin (MODEL or HEURISTIC); unset means both.
      format: enum
    review:
      enum:
        - REVIEW_UNSPECIFIED
        - PROPOSED
        - ACCEPTED
        - REJECTED
      type: string
      description: ACCEPTED or REJECTED.
      format: enum
    requestId:
      type: string
      description: |-
        Optional UUID4 identifying this logical edit. Reusing it with the same
        caller and request returns the original result; different input conflicts.
        When absent, each call starts a new logical edit.
  description: Request for Episodes.ReviewSuggestions.
qualia.v1.EpisodeSelection:
  type: object
  properties:
    names:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.EpisodeNames"
      description: Episode names under the request's parent.
    filter:
      type: string
      description: A ListEpisodes filter over the parent (e.g. what the filter bar leaves).
  description: |-
    Which episodes a bulk ruling acts on: an explicit list, or a filter. Names
    must be under the request's parent (INVALID_ARGUMENT otherwise); a filter
    only ever matches the parent's own episodes (a mixture: its pool).
qualia.v1.EpisodeNames:
  type: object
  properties:
    names:
      type: array
      items:
        type: string
      description: accounts/{account}/datasets/{dataset}/episodes/{episode}, at most 10000.
  description: A list of episode names.
qualia.v1.ReviewSuggestionsResponse:
  type: object
  properties:
    episodeCount:
      type: integer
      description: Episodes that had a span settled.
      format: int32
    spanCount:
      type: integer
      description: Spans settled.
      format: int32
  description: Response for Episodes.ReviewSuggestions.
google.rpc.Status:
  oneOf:
    - $ref: "#/components/schemas/ApiError"
    - $ref: "#/components/schemas/GatewayError"
  description: "The body of a failed call: one of the two shapes below."
ApiError:
  title: API error
  type: object
  required:
    - code
    - message
    - retryable
    - details
  properties:
    code:
      type: string
      description: The gRPC code name in upper case, e.g. `NOT_FOUND`.
    message:
      type: string
    retryable:
      type: boolean
      description: Whether the same call may succeed if retried.
    details:
      type: array
      items:
        type: object
      description: "Empty, except when a dataset copy or move is refused: then one `google.rpc.ErrorInfo` with the refusal's `reason` code, its `domain` and, in `metadata`, the datasets it names."
  description: A refusal from the API itself.
GatewayError:
  title: Gateway error
  type: object
  required:
    - detail
  properties:
    detail:
      type: string
      description: What went wrong.
  description: A refusal from the gateway before the call reaches the API, for example `401` bad or missing API key, `403` key lacks the scope or environment closed, `413` body too large.
```
