# 获取端口列表

请求方式:POST

请求地址:https://$basehost/gateway/qopen/GetDeviceList

body参数

{
    "limit": 100,
    "offset": 0,
    "from_expired_at":1744173735
}
字段 类型 必填 说明
offset int 每次获取的的开始位置,最小值为0
limit int 每次获取的条数,取值范围(1~1000)
from_expired_at int 指定最小到期时间(用于获取最近一段时间内到期及未到期的端口)

返回值:

{
    "data": {
        "has_more": true,
        "list": [
            {
                "device_num": "devicexxxxxxxxx",
                "created_at": 1631867979,
                "expired_at": 1757141312,
                "bound_robot_id": "xxxxxx"
            },
            {
                "device_num": "deviceyyyyyy",
                "created_at": 1686629061,
                "expired_at": 1893427200,
                "bound_robot_id": "yyyyyy"
            }
        ]
    },
    "errcode": 0,
    "errmsg": "",
    "hint": ""
}

返回说明

字段 类型 说明
data json json返回值
data.list array 获取到的端口列表
data.list.device_num string 端口编号
data.list.created_at int 端口创建时间
data.list.expired_at int 端口过期时间
data.list.bound_robot_id string 绑定的机器人id
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息
hint string 请求日志ID

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/GetHostAccountByIds \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
    "limit": 100,
    "offset": 0,
    "from_expired_at":1744173735
}'
最后更新时间: 2025/4/10 10:42:58