## List and filter evaluation items

**get** `/v5/evaluation-items`

Return a paginated list of evaluation items belonging to the caller's account.

Pass `evaluation_id` to restrict the results to a single evaluation's items. The
`completion_status` filter selects items by whether any of their tasks errored:
`failed` returns only items that have task errors, `passed` returns only items with no
task errors, and `all` (or omitting the parameter) returns every item. Archived items
are excluded unless `include_archived=true`. Each returned item has its cached task
results merged into `data` and its errors exposed in `task_errors`, identically to the
single-item endpoint.

### Query Parameters

- `completion_status: optional "failed" or "passed" or "all"`

  Filter items by completion status. Pass 'failed' to return only items with errors, 'passed' for items without errors. Pass 'all' or omit to return all items.

  - `"failed"`

  - `"passed"`

  - `"all"`

- `ending_before: optional string`

- `evaluation_id: optional string`

- `include_archived: optional boolean`

- `limit: optional number`

- `sort_by: optional string`

- `sort_order: optional SortOrder`

  - `"asc"`

  - `"desc"`

- `starting_after: optional string`

### Returns

- `has_more: boolean`

  Whether there are more items left to be fetched.

- `items: array of EvaluationItem`

  - `id: string`

    The unique identifier of the entity.

  - `created_at: string`

    The date and time when the entity was created in ISO format.

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `data: map[unknown]`

  - `evaluation_id: string`

  - `archived_at: optional string`

    The date and time when the entity was archived in ISO format.

  - `dataset_item_id: optional string`

  - `dataset_item_version_num: optional number`

  - `files: optional map[string]`

  - `object: optional "evaluation.item"`

    - `"evaluation.item"`

  - `task_errors: optional map[TaskError]`

    Map of task alias to error info.

    - `message: string`

      Error message

    - `type: string`

      Error type/category

  - `task_result_statuses: optional map["completed" or "skipped" or "errored" or 2 more]`

    Per-alias task-result lifecycle status derived from `task_result_cache`. Present when at least one alias has a recorded status; `null` for legacy rows with an empty cache. Renderers use this to distinguish `prefilled` from `completed` on the wire (values themselves are already merged into `data` by `merge_task_result_cache_into_data`).

    - `"completed"`

    - `"skipped"`

    - `"errored"`

    - `"pending"`

    - `"prefilled"`

- `total: number`

  The total of items that match the query. This is greater than or equal to the number of items returned.

- `limit: optional number`

  The maximum number of items to return.

- `object: optional "list"`

  - `"list"`

### Example

```http
curl https://api.egp.scale.com/v5/evaluation-items \
    -H "x-api-key: $SGP_API_KEY"
```

#### Response

```json
{
  "has_more": true,
  "items": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "created_by": {
        "id": "id",
        "type": "user",
        "object": "identity"
      },
      "data": {
        "foo": "bar"
      },
      "evaluation_id": "evaluation_id",
      "archived_at": "2019-12-27T18:11:19.117Z",
      "dataset_item_id": "dataset_item_id",
      "dataset_item_version_num": 0,
      "files": {
        "foo": "string"
      },
      "object": "evaluation.item",
      "task_errors": {
        "foo": {
          "message": "message",
          "type": "type"
        }
      },
      "task_result_statuses": {
        "foo": "completed"
      }
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
```
