## List dataset items

**get** `/v5/dataset-items`

List dataset items belonging to the caller's account, paginated.

dataset_id is optional: when omitted, items across all of the account's datasets are returned;
when provided, results are restricted to that dataset. A specific version may be requested only
together with a dataset_id — passing version without dataset_id is rejected. By default only
current items at the latest version are listed (soft-deleted items are excluded); archived items
are excluded unless include_archived is true.

### Query Parameters

- `dataset_id: optional string`

  Optional dataset identifier. Must be provided if a specific version is requested.

- `ending_before: optional string`

- `include_archived: optional boolean`

- `limit: optional number`

- `sort_by: optional string`

- `sort_order: optional SortOrder`

  - `"asc"`

  - `"desc"`

- `starting_after: optional string`

- `version: optional number`

  Optional dataset version. When unset, returns the latest version. Requires a valid dataset_id when set.

### Returns

- `has_more: boolean`

  Whether there are more items left to be fetched.

- `items: array of DatasetItem`

  - `id: string`

    The unique identifier of the entity.

  - `content_hash: string`

  - `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]`

  - `updated_at: string`

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

  - `archived_at: optional string`

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

  - `dataset_id: optional string`

  - `files: optional map[string]`

  - `object: optional "dataset.item"`

    - `"dataset.item"`

- `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/dataset-items \
    -H "x-api-key: $SGP_API_KEY"
```

#### Response

```json
{
  "has_more": true,
  "items": [
    {
      "id": "id",
      "content_hash": "content_hash",
      "created_at": "2019-12-27T18:11:19.117Z",
      "created_by": {
        "id": "id",
        "type": "user",
        "object": "identity"
      },
      "data": {
        "foo": "bar"
      },
      "updated_at": "2019-12-27T18:11:19.117Z",
      "archived_at": "2019-12-27T18:11:19.117Z",
      "dataset_id": "dataset_id",
      "files": {
        "foo": "string"
      },
      "object": "dataset.item"
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
```
