# List session items

Launch stage: Beta

`GET /api/2.0/agents/{parent=session-stores/*/sessions/*}/items`

Lists items in a session.

API scopes: agent-kit

## Path parameters

- `parent` (string, required)
  Resource name of the containing session, in the form
   `session-stores/{session_store_id}/sessions/{session_id}`.

## Query parameters

- `page_size` (int32, optional)
  Maximum number of items to return. Defaults to 10; must be between 1 and 100.
- `page_token` (string, optional)
  Token returned by a previous list request.
- `order_by` (string, optional)
  Sort order. Supported values are `create_time asc` and `create_time desc`. The default is
   `create_time desc`, which returns the most recently appended items first. Equal timestamps are
   resolved by committed append order in the requested direction.

## Returns

- `session_items` (array of object, optional)
  Session items in the requested page.
  - `item_id` (string, optional, Output only)
    Stable service-generated item ID.
  - `data` (object, required)
    Complete SDK-native, JSON-compatible item. The service stores and returns this value without
     interpreting provider-specific fields such as `type`, `role`, or `content`.
  - `create_time` (string, optional, Output only)
    Server-assigned time when the append commits. Values are nondecreasing within a session. Item
     listing orders by this timestamp; equal timestamps are resolved by committed append order.
- `next_page_token` (string, optional)
  Token to retrieve the next page.

## Response

```json
{
  "session_items": [
    {
      "item_id": "string",
      "data": {},
      "create_time": "string"
    }
  ],
  "next_page_token": "string"
}
```

