Skip to content
页面导航
精简

用户档案模块 API 文档

基础前缀:/external/private/api/profile 鉴权:DEFrame-UserIdDEFrame-TenantIdDEFrame-ExtendedInfo 文档版本基准:4f46278(2026-08-11)

统一响应体结构:

json
{
  "code": 0,
  "message": "success",
  "data": {},
  "ext": null
}

枚举取值:

  • appearanceModeLIGHT / DARK
  • displayModeCOMPACT / STANDARD / DETAILED
  • fontSizeSMALL / DEFAULT / LARGE / EXTRA_LARGE
  • industryPETROCHEMICAL / POWER_ENERGY / WATER_AFFAIRS / MINERAL_RESOURCES / NEW_ENERGY / SMART_MANUFACTURING / CONSTRUCTION / TRANSPORTATION

1. 获取用户档案概览

名称:用户档案总览 作用:返回当前用户的基础信息、统计数据和偏好设置。

  • 请求方式:GET
  • 路径:/external/private/api/profile

响应体:

json
{
  "code": 0,
  "message": "success",
  "data": {
    "userProfile": {
      "userId": "1123598821738675201",
      "displayName": "张三",
      "email": "zhangsan@inspur.com",
      "avatarUrl": "https://cdn.example.com/avatar/zhangsan.png"
    },
    "statistics": {
      "modelCount": 12,
      "agentCount": 3,
      "conversationCount": 28
    },
    "preferences": {
      "appearanceMode": "LIGHT",
      "displayMode": "STANDARD",
      "fontSize": "DEFAULT",
      "industry": "POWER_ENERGY",
      "updatedAt": "2026-08-10T09:30:00"
    }
  },
  "ext": null
}

2. 保存用户偏好设置

名称:保存用户偏好 作用:更新当前用户的界面外观与行业偏好。

  • 请求方式:PATCH
  • 路径:/external/private/api/profile/preferences
  • 请求体:
json
{
  "appearanceMode": "DARK",
  "displayMode": "COMPACT",
  "fontSize": "LARGE",
  "industry": "NEW_ENERGY"
}

响应体:

json
{
  "code": 0,
  "message": "success",
  "data": {
    "appearanceMode": "DARK",
    "displayMode": "COMPACT",
    "fontSize": "LARGE",
    "industry": "NEW_ENERGY",
    "updatedAt": "2026-08-12T14:20:00"
  },
  "ext": null
}