---
title: "列出 AI 助手会话"
method: GET
path: "/v1/analytics/{projectId}/assistant"
tags: ["Analytics"]
language: "zh-Hans"
---

# 列出 AI 助手会话

`GET /v1/analytics/{projectId}/assistant`

## Request

- Base URL: `https://api.mintlify.com`
- URL: `https://api.mintlify.com/v1/analytics/{projectId}/assistant`
- Auth: HTTP bearer

列出 AI 助手会话历史，支持分页。

使用管理员 API 密钥进行身份验证。

## Path parameters

- `projectId` string, required: 你的项目 ID，可在控制台的 [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) 页面中复制。

## Query parameters

- `dateFrom` string: ISO 8601 或 YYYY-MM-DD 格式的日期
- `dateTo` string: ISO 8601 或 YYYY-MM-DD 格式的日期。`dateTo` 为不包含在内的上限。结果将包含早于该日期的记录，但不包含该日期当天的记录。
- `limit` number: 每页返回的最大结果数
- `cursor` string, ulid: 分页游标（ULID 格式）

## Response `200`

包含分页信息的会话数据

- AssistantConversationsResponse
  - `conversations` object[], required: AI 助手会话列表。
    - `id` string, required: 此轮次的唯一标识符。多轮会话中的每一行都有不同的 `id`。
    - `conversationId` string, required: 该轮次所属会话的标识符。同一会话中的各行共享相同的 `conversationId`。可将其作为获取 AI 助手会话线程端点的 `threadId` 使用。
    - `timestamp` string, required: 开启该轮次的用户消息的时间戳。
    - `query` string, required: 用户向 AI 助手提出的问题。
    - `response` string, required: AI 助手的回答。对于澄清问题轮次，这是 AI 助手向用户提出的追问。
    - `responseType` 'answer' | 'clarifying_question': 返回给用户的响应类型。`answer` 表示最终回答。`clarifying_question` 表示 AI 助手向用户提出了追问，而没有直接作答。当该字段不存在时，默认值为 `answer`。
    - `sources` object[], required: 在回答中被引用的文档页面。
      - `title` string, required: 被引用文档页面的标题。
      - `url` string, required: 被引用文档页面的 URL。
    - `resolutionStatus` 'answered' | 'unanswered', required: 助手是否成功回答了此轮次。按行计算：当助手将问题标记为现有文档未涵盖时，值为 `unanswered`。如果会话被记录为未回答（例如因为某个响应失败），且没有任何轮次被标记为未涵盖，则该会话中的每个轮次都为 `unanswered`。否则为 `answered`。
    - `queryCategory` string, nullable, required: 会话自动分配的分类分组（如适用）。
    - `feedback` 'positive' | 'negative' | 'null', nullable, required: 用户对 AI 助手响应的点赞或点踩评价。`positive` 表示点赞，`negative` 表示点踩，`null` 表示用户未评价该响应。
    - `pageUrl` string, nullable, required: 会话开始时所在文档页面的完整 URL。如果没有捕获页面路径，则为 null。
  - `nextCursor` string, nullable, required: 用于获取下一页结果的游标；如果没有更多结果则为 null。
  - `hasMore` boolean, required: 指示在当前页之外是否还有更多可用结果。

## Other responses

- `400`: 某个查询参数无效，例如日期格式错误或 `limit` 超出允许范围，或者项目 ID 格式错误。响应正文会说明具体错误。
- `401`: API 密钥缺失或无效，或者你的方案不包含 API 访问权限。
- `403`: 你的请求来自不在该 API 密钥允许列表中的 IP 地址。
- `404`: 该项目不存在或不属于你的组织。
- `429`: 你已超出分析端点的速率限制。
- `500`: 发生意外的服务器错误。请重试该请求。如果错误仍然存在，请联系支持团队。

## Changes

- **2026-10-30** `5cdecd920d06`: 4 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - added the non-success response with the status `429`
- **2026-10-19** `d4cf4be9f200`: 1 info
  - added the required property `conversations/items/conversationId` to the response with the `200` status
- **2026-10-15** `a38f95b90627`: 1 info
  - added the required property `conversations/items/resolutionStatus` to the response with the `200` status
- **2026-09-24** `b233b1279414`: 1 info
  - added the required property `conversations/items/feedback` to the response with the `200` status
- **2026-08-13** `f8d76e4d39e4`: 1 info
  - added the optional property `conversations/items/responseType` to the response with the `200` status

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/changes/v1/analytics/:projectId/assistant/get.md)

---

[API](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh.md) - [All operations](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/llms.txt) - [OpenAPI document](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/revisions/f0aae58f3af8?raw)
