企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC=2] >[danger] 需要填写接口地址,接口地址单独给出 > 接口地址拼接以下的地址就可以使用 ## 登录 ~~~[api] post:/api/login *string:username=测试#账号 *string:password=123456#密码 *string:udid=123456#登录标识 <<< success { "code": 0, "data": { "id": 3, "nickname": "测试", "name": "测试", "avatar": "", "gender": "secret", "last_login_time": "2019-05-08 16:13:10", "session_key": "PHPSESSID", "session_value": "pahnbupgqvt0mlt0hh03e7imff" } } <<< error { "code": -1, "msg": "账户不存在" } ~~~ ## 获取型号列表 ~~~[api] get:/api/device_info <<< success { "code": 0, "data": { "list": [ { "id": 8, "name": "优家6901-xy电采暖2.0", "code_name": "KD5P601", "sn": "746015", "firmware": [ "http://cn.ikelink.com/w1_fw/user1.2048.new.3V2_9.bin__IKECIN_TASK_KD5P1", "http://cn.ikelink.com/w1_fw/user2.2048.new.3V2_9.bin__IKECIN_TASK_KD5P1" ] }, ] } } <<< success { "code": 0, "data": { "list": [ { "id": 91, "name": "科什-暖冬WR主机", "code_name": "KP11C5", "sn": "890500", "firmware": [ "/uploads/device_firmware/91/user1.2048.new.3V2_2.bin__IKECIN_TASK_KP1C3", "/uploads/device_firmware/91/user2.2048.new.3V2_2.bin__IKECIN_TASK_KP1C3" ] } ] } } <<< error { "code": -1, "msg": "" } ~~~ ## 获取最后可用号段 ~~~[api] get:/api/last_sn *int:id=0#上面型号列表的 id <<< success { "code": 0, "data": { "sn": "870100000000" } } <<< error { "code": -1, "msg": "该选项不存在" } ~~~ ## 发起申请 ~~~[api] post:/api/save *string:sn=870100000000#上面接口返回的 sn *int:num=1#申请数量 *int:device_id=87#获取最后号段选的 id <<< success { "code": 0, "data": { "start_sn": "870100000033", // 开始号段 "end_sn": "870100000033" // 结束号段 } } <<< error { "code": -1, "msg": "最少申请 1 个" } ~~~ ## 固件下载 ~~~[api] get:/uploads/device_firmware/91/user1.2048.new.3V2_2.bin__IKECIN_TASK_KP1C3 <<< info 固件下载使用 ip 地址 + 固件文件数组里面的地址 直接访问下载 ~~~ ## 记录上报 ~~~[api] post:/api/allot_record *int:user_id=1#登录返回的 id *int:device_id=1#保存的 id *string:sn=111111111111#设备序列号 *string:mac=01:01#设备 mac 地址 *json:produce_test_log={}#产测记录 *string:firmware=11#设备固件版本 *string:end_sn=111111111#截止序列号 *string:error_test_log=""#产测错误信息 <<< success { "code": 0 } <<< error { "code": -1, "msg": "其他错误" } ~~~