# Read an artifact again

Source: https://amanucci.com/docs/developers/api/artifacts/rereadArtifact

## POST /v1/entities/{entityId}/artifacts/{artifactId}/reread

Read an artifact again

Read a document artifact again: ONE `extract` work item under's key `extract:<artifactId>:<extractor>:<extractorVersion>` — a new extractor edition is a legitimate re-read. A photo read through its display copy that has none makes the copy again instead: a `render` keyed after the failed one, `render:<artifactId>:<converter>:after:<failedItemId>`, which reads it under that edition once made ( (c)); one still being made is `current`. `extractorVersion` defaults to the edition finalize pins today; it may name only an edition this composition reads with (else 422 `edition_unknown`). Only the `extract` kinds are read (`pdf`, `photo`, `peppol_ubl`, an email's children); any other kind is 422 `artifact_not_readable`. The same edition again answers 200 `current` with the item that edition already has, whatever its state — exhausted included: reading it again needs a new edition. The reading re-projects the same document row; a booked document's new reading reaches the correction flow (unchanged posts nothing; changed reverses and re-posts), never a second booking.

Operation ID: `rereadArtifact`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "artifactId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": false,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/RereadArtifact"
      }
    }
  }
}
```

### Responses

#### 200 That edition's item already exists (`current`); nothing was enqueued.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/RereadArtifactResult"
    }
  }
}
```

#### 201 A new `extract` item, or a photo's `render`.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/RereadArtifactResult"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
