---
title: "Get Assistant Session History"
method: GET
path: "/api/assistant/admin/{userId}/sessions/{sessionId}/history"
tags: ["Assistant"]
---

# Get Assistant Session History

`GET /api/assistant/admin/{userId}/sessions/{sessionId}/history`

Retrieve a chat session's messages for a given user and session.

## Path parameters

- `userId` string, required
- `sessionId` string, required

## Response `200`

List of messages belonging to the session

- ModelStoredMessage[]
  - `createTime` string — The date and time that this object was created. This is a read-only field.
  - `id` string — The ID assigned to this object by the server. This is a read-only field.
  - `kind` string — The kind of object. This is a read-only field.
  - `message` ModelMessage — The message content.
    - `id` string — The unique identifier for the message. Not required.
    - `role` string — Indicates who authored the message. Either `user` or `assistant`.
    - `stop_reason` string — The reason the message was stopped.
    - `stop_sequence` string — The sequence in which the message was stopped.
    - `thoughts` string — The plain text thoughts from the model's response
    - `usage` ModelUsage — Usage statistics after deducting the costs of the message.
      - `credits` integer — The number of credits remaining after this message.
      - `input_tokens` integer — The number of input tokens used.
      - `output_tokens` integer — The number of output tokens used.
  - `model` string — The model used for this message.
  - `operation` string — The operation that was applied to the object. This is a read-only field.
  - `session_id` string — What session this message belongs to.
  - `tags` string[] — Metadata about the message.
  - `updateTime` string — The date and time that this object was last modified. This is a read-only field.
  - `userId` string — The user ID (or API client ID) that initiated this event. This is a read-only field.

## Other responses

- `401` — Request was not properly authenticated
- `403` — Insufficient permissions for this request
- `500` — Internal SOC error; review SOC logs

## Changes

- **2026-07-17** `0576ce393f8d` — 1 info
  - added the optional property `items/model` to the response with the `200` status
- **2026-02-27** `c7b650ad3d3e` — 1 info
  - added the optional property `items/message/thoughts` to the response with the `200` status
- **2025-10-23** `dd1538426ed4` — 1 info
  - endpoint added
- **2024-12-10** `ee1120fd1e20` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/security-onion-solutions/apis/security-onion-connect-api/changes/api/assistant/admin/:userId/sessions/:sessionId/history/get.md)

---

[API](https://skmtc.dev/security-onion-solutions/apis/security-onion-connect-api.md) · [All operations](https://skmtc.dev/security-onion-solutions/apis/security-onion-connect-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/security-onion-solutions/security-onion-connect-api/revisions/0576ce393f8d/schema)
