## List Extract Review Events

`client.Extract.Review.ListEvents(ctx, jobID, query) (*PaginatedCursor[ExtractReviewEvent], error)`

**get** `/api/v2/extract/{job_id}/review/events`

Beta: answers 403 until extract review is enabled for the caller and their organization.

List a review's history, newest first.

### Parameters

- `jobID string`

- `query ExtractReviewListEventsParams`

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

    Events per page.

  - `PageToken param.Field[string]`

    Token from the previous page.

  - `ProjectID param.Field[string]`

### Returns

- `type ExtractReviewEvent struct{…}`

  One entry in a review's history.

  - `ID string`

    Unique identifier of the entry.

  - `ActorID string`

    ID of the user who acted.

  - `CreatedAt Time`

    When it happened.

  - `Kind ExtractReviewEventKind`

    What happened.

    - `const ExtractReviewEventKindApproved ExtractReviewEventKind = "approved"`

    - `const ExtractReviewEventKindCreated ExtractReviewEventKind = "created"`

    - `const ExtractReviewEventKindFieldCleared ExtractReviewEventKind = "field_cleared"`

    - `const ExtractReviewEventKindFieldConfirmed ExtractReviewEventKind = "field_confirmed"`

    - `const ExtractReviewEventKindFieldCorrected ExtractReviewEventKind = "field_corrected"`

    - `const ExtractReviewEventKindFieldRestored ExtractReviewEventKind = "field_restored"`

    - `const ExtractReviewEventKindFieldUndone ExtractReviewEventKind = "field_undone"`

    - `const ExtractReviewEventKindFlagsSignedOff ExtractReviewEventKind = "flags_signed_off"`

    - `const ExtractReviewEventKindRejected ExtractReviewEventKind = "rejected"`

    - `const ExtractReviewEventKindReopened ExtractReviewEventKind = "reopened"`

  - `Detail ExtractReviewEventDetailUnion`

    The settings for `created`, the reason for `rejected`, and the fields for `flags_signed_off`; null for the rest.

    - `type ExtractReviewEventDetailExtractReviewCreatedDetail struct{…}`

      What a `created` entry records: where review was turned on, and its settings.

      - `ConfidenceThreshold float64`

        Fields read below this confidence are flagged.

      - `FieldsInScope []string`

        JSON Pointers of the fields the threshold applies to; empty means all.

      - `Origin string`

        Turned on as the job ran, from History, by a first edit, or by the API.

        - `const ExtractReviewEventDetailExtractReviewCreatedDetailOriginAPI ExtractReviewEventDetailExtractReviewCreatedDetailOrigin = "api"`

        - `const ExtractReviewEventDetailExtractReviewCreatedDetailOriginEdit ExtractReviewEventDetailExtractReviewCreatedDetailOrigin = "edit"`

        - `const ExtractReviewEventDetailExtractReviewCreatedDetailOriginHistory ExtractReviewEventDetailExtractReviewCreatedDetailOrigin = "history"`

        - `const ExtractReviewEventDetailExtractReviewCreatedDetailOriginRun ExtractReviewEventDetailExtractReviewCreatedDetailOrigin = "run"`

      - `RequiredFields []string`

        JSON Pointers of fields flagged when empty.

    - `type ExtractReviewEventDetailExtractReviewRejectedDetail struct{…}`

      What a `rejected` entry records.

      - `Reason string`

        Why the result was rejected.

    - `type ExtractReviewEventDetailExtractReviewSignedOffDetail struct{…}`

      What a `flags_signed_off` entry records.

      - `Paths []string`

        JSON Pointers of the flagged fields confirmed as part of approving.

  - `Path string`

    JSON Pointer of the field it changed.

  - `ValueAfter any`

    The field's value after the change.

  - `ValueBefore any`

    The field's value before the change.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Extract.Review.ListEvents(
    context.TODO(),
    "job_id",
    llamacloud.ExtractReviewListEventsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "actor_id": "actor_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "kind": "approved",
      "detail": {
        "confidence_threshold": 0,
        "fields_in_scope": [
          "string"
        ],
        "origin": "api",
        "required_fields": [
          "string"
        ]
      },
      "path": "path",
      "value_after": {},
      "value_before": {}
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
