# Issues_ReopenIssues

`POST /v1/accounts/{account}/datasets/{dataset}/issues:reopen`

Reopens dismissed issues scoped to the parent (same matching rule as
DismissIssues). An episode a person ruled with a reopened issue becomes
unreviewed again in that scope.

- 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.ReopenIssuesRequest`

## Responses

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

## Schemas

```yaml
qualia.v1.ReopenIssuesRequest:
  required:
    - parent
    - selection
  type: object
  properties:
    parent:
      type: string
      description: accounts/{account}/datasets/{dataset}
    selection:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.IssueSelection"
      description: Which issues; only DISMISSED ones are reopened.
  description: Request for Issues.ReopenIssues.
qualia.v1.IssueSelection:
  type: object
  properties:
    names:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.IssueNames"
      description: Issue names under the request's parent.
    filter:
      type: string
      description: A ListIssues filter over the parent, e.g. `code = "idle_tail" AND state = OPEN`.
  description: |-
    Which issues a bulk call acts on. The server forces `dataset = parent`:
    only issues scoped to the parent ever match.
qualia.v1.IssueNames:
  type: object
  properties:
    names:
      type: array
      items:
        type: string
      description: accounts/{account}/datasets/{dataset}/issues/{issue}, at most 10000.
  description: A list of issue names.
qualia.v1.ReopenIssuesResponse:
  type: object
  properties:
    reopenedCount:
      type: integer
      description: How many issues were reopened.
      format: int32
    lockedCount:
      type: integer
      description: |-
        Episodes whose issues were left as they were, because another person
        holds the episode's edit lease. Their issues are not in reopened_count.
      format: int32
    locked:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.LockedEpisode"
      description: The first 100 of them, with their holders.
  description: Response for Issues.ReopenIssues.
qualia.v1.LockedEpisode:
  type: object
  properties:
    episode:
      type: string
      description: |-
        accounts/{account}/datasets/{dataset}/episodes/{episode}, in the scope
        the write was made in.
    holderName:
      type: string
      description: The holder's display name; empty when they have none.
  description: |-
    An episode a write left alone, or refused, because another person holds
    its edit lease (Episodes.AcquireEpisodeLease). Bulk responses list at most
    100 of these beside a count of all of them.
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.
```
