> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai.relyt.cn/llms.txt
> Use this file to discover all available pages before exploring further.

> 获取指定会话的配置信息。

# Get session

**请求示例：**

<CodeGroup>
  ```curl cURL theme={null}
  curl --request GET \
    --url https://app.ai.relyt.cn/app/api/v2/team/sessions/{id}?user_id=tmm-dafasdfasdfasdf \
    --header 'x-pd-api-key: <api-key>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.ai.relyt.cn/app/api/v2/team/sessions/{id}?user_id=tmm-dafasdfasdfasdf"

  headers = {"x-pd-api-key": "<api-key>"}

  response = requests.request("GET", url, headers=headers)

  print(response.text)
  ```
</CodeGroup>

**返回示例：**

```json 200 theme={null}
{
  "code": 0,
  "data": {
    "id": "cckrXXg68P8lmb59dg4yO",
    "name": "Analyze performance",
    "output_language": "HI",
    "job_mode": "AUTO",
    "max_contextual_job_history": 76,
    "agent_id": "DATA_ANALYSIS_AGENT"
  }
}
```


## OpenAPI

````yaml get /v2/team/sessions/{id}
openapi: 3.0.1
info:
  title: Team Open API Version 2 中文版本
  description: ''
  version: 1.0.0
servers:
  - url: https://app.ai.relyt.cn/app/api
    description: 体验环境
security:
  - apikey-header-x-pd-api-key: []
tags:
  - name: Session
  - name: Dataset
  - name: Data source
  - name: File
  - name: Job
paths:
  /v2/team/sessions/{id}:
    get:
      tags:
        - Session
      summary: Get session
      description: 获取指定会话的配置信息。
      parameters:
        - name: id
          in: path
          description: >-
            目标会话的 ID。


            如需查看项目中存在的会话，请调用 [GET
            /v2/team/sessions](/api-reference/list-sessions) 接口。
          required: true
          schema:
            type: string
        - name: user_id
          in: query
          description: 用户 ID，即您在组织中的唯一身份标识。
          required: true
          schema:
            type: string
        - name: x-pd-external-trace-id
          in: header
          description: >-
            您本地系统中设置的 Trace ID，至多支持 128 个字符。当请求发生错误时，可以将此 ID 提供给 Relyt AI
            团队，协助进行故障排查。
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: >-
                      状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查，请参阅
                      [错误码](/introduction/error-codes)。
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 会话 ID，会话在当前项目中的唯一标识。
                      name:
                        type: string
                        description: 会话名称。如名称长度超过 128 个字符，将仅返回前 128 个字符。
                      output_language:
                        type: string
                        enum:
                          - AUTO
                          - EN
                          - ES
                          - AR
                          - PT
                          - ID
                          - JA
                          - RU
                          - HI
                          - FR
                          - DE
                          - VI
                          - TR
                          - PL
                          - IT
                          - KO
                          - ZH-CN
                          - ZH-TW
                        default: AUTO
                        description: |-
                          Relyt AI 的返回语言。可能值包括：

                          - `AUTO`：根据提示词自动识别
                          - `EN`：英语
                          - `ES`：西班牙语
                          - `AR`：阿拉伯语
                          - `PT`：葡萄牙语
                          - `ID`：印尼语
                          - `JA`：日语
                          - `RU`：俄语
                          - `HI`：印地语
                          - `FR`：法语
                          - `DE`：德语
                          - `VI`：越南语
                          - `TR`：土耳其语
                          - `PL`：波兰语
                          - `IT`：意大利语
                          - `KO`：韩语
                          - `ZH-CN`：简体中文
                          - `ZH-TW`：繁体中文
                      job_mode:
                        type: string
                        description: |-
                          任务类型。可能值包括：

                          - `AUTO`：Relyt AI 根据您的提问进行意图判断，决定任务是数据分析任务还是信息检索任务。
                          - `DATA_ANALYTICS`：Relyt AI 根据您的输入进行数据分析。
                        enum:
                          - AUTO
                          - DATA_ANALYTICS
                        default: DATA_ANALYTICS
                      max_contextual_job_history:
                        type: integer
                        description: >-
                          在会话中保留作为下一个任务上下文的任务数量，取值范围为 `0` 到 `10`，默认值为 `10`。值为
                          `0` 时表示会话中的任务在执行时不会使用历史任务执行结果作为上下文信息。
                      agent_id:
                        type: string
                        enum:
                          - DATA_ANALYSIS_AGENT
                        default: DATA_ANALYSIS_AGENT
                        description: AI 智能体的 ID。该参数为保留参数，无实际意义，请忽略。
                    description: 会话对象。
                    required:
                      - id
                      - name
                required:
                  - data
                  - code
              examples:
                '1':
                  summary: 成功示例
                  value:
                    code: 0
                    data:
                      id: cckrXXg68P8lmb59dg4yO
                      name: Analyze performance
                      output_language: HI
                      job_mode: AUTO
                      max_contextual_job_history: 76
                      agent_id: DATA_ANALYSIS_AGENT
          headers:
            x-pd-trace-id:
              example: ''
              required: true
              description: Relyt AI 返回的 Trace ID。当请求发生错误时，可以将此 ID 提供给 Relyt AI 团队，协助进行故障排查。
              schema:
                type: string
      deprecated: false
      security:
        - apikey-header-x-pd-api-key: []
components:
  securitySchemes:
    apikey-header-x-pd-api-key:
      type: apiKey
      in: header
      name: x-pd-api-key

````