Appearance
获取用户硬件(设备)信息
请求方式
bash
POST {您的域名}/api/ai-dol/v1/device-list请求头
text
Authorization: Bearer {您的apiKey}
X-Signature: {计算的签名}请求参数
| 参数名 | 类型 | 是否必填 | 示例值 | 说明 |
|---|---|---|---|---|
| account | string | 是 | 680857435 | 用户 ID/账号/邮箱 |
| requestId | string | 是 | req_abc123 | 客户端生成唯一请求标识 |
| timestamp | number | 是 | 1760581487000 | 毫秒级时间戳 |
响应格式(JSON)
成功响应
json
{
"code": 10200,
"success": true,
"message": "OK",
"data": [
{
"category_name": "智能设备",
"device_code": "DEV001234567",
"device_name": "震动棒",
"is_selected": true,
"is_precise_control_supported": true,
"device_functions": [
{
"function_name": "震动",
"function_type": "vibrate",
"command": {
"level_commands": [
"START",
"LEVEL_1",
"LEVEL_2"
],
"stop_command": "STOP"
}
},
{
"function_name": "伸缩",
"function_type": "thrust",
"command": {
"level_commands": [
"EXTEND",
"RETRACT"
],
"stop_command": "STOP"
}
}
]
},
{
"category_name": "智能设备",
"device_code": "DEV001234568",
"device_name": "飞机杯",
"is_selected": false,
"is_precise_control_supported": true,
"device_functions": [
{
"function_name": "加热",
"function_type": "heat",
"command": {
"level_commands": [
"UP"
],
"stop_command": "STOP"
}
}
]
}
],
"timestamp": 1760582574528
}失败
json
{
"code": 10500,
"success": false,
"message": "获取失败",
"data": null,
"timestamp": 1760582574528
}响应参数说明:
| 参数名 | 类型 | 必 填 | 示例值 | 描述 |
|---|---|---|---|---|
| category_name | String | 是 | 智能设备 | 设备大类名称 |
| device_code | String | 是 | DEV001234567 | 设备码/barcode |
| device_name | String | 是 | 震动棒 | 设备名称 |
| is_selected | String | 是 | true | 是否为用户当前选中的设备 |
| is_precise_control_supported | Boolean | 是 | true | 是否支持精准控制 |
| device_functions | Array | 是 | 功能数组,每个为一个功能模块 | |
| function_name | String | 是 | 震动 | 功能名称(如震动、伸缩) |
| function_type | String | 是 | vibrate | 功能类型,可选值: 伸缩: thrust拍打: tap吮吸: suck放电: shock震动: vibrate加热: heat |
| command | Object | 是 | 指令集 | |
| level_commands | Array | 是 | ["START","LEVEL_1","LEVEL_2"] | 正向指令数组(强制要求:需要正序排序,级别越高越靠后) |
| stop_command | String | 是 | STOP | 停止指令 |