获取应用和机器人列表接口

获取应用列表

请求地址

请求参数

Query parameters

Parameter Type Optional Description
pageNum int true 页数.
pageSize int true 页数大小.

请求结果

Path Type Optional Description
code Integer true
message String true
visible Boolean true
data Array true
data[].id Integer true ID.
data[].name String true 名称.
data[].description String true 描述.
data[].createTime String true 创建时间.
data[].companyId Integer true 公司.
data[].accessKeyId String true accessKeyId.
data[].accessKeySecret String true accessKeySecret.
data[].appRobotResponseList Array true 绑定机器人.
data[].appRobotResponseList[].robotId Integer true 机器人ID.
data[].appRobotResponseList[].robotName String true 机器人名称.

示例

$ curl 'https://km.udesk.cn/api/v1/apps?email=admin@udesk.cn&timestamp=1529402464&sign=8381262e495ae817172d466d976e42cc83bbbdb4&pageNum=1&pageSize=10' -i
返回
{
  "code" : 200,
  "message" : "OK",
  "visible" : false,
  "data" : [ {
    "id" : 11,
    "name" : "11",
    "description" : "222",
    "createTime" : "2017-12-22 15:45:19",
    "companyId" : 6,
    "accessKeyId" : "8HOlmb8WFfxnz5IMC8g",
    "accessKeySecret" : "rShtqhRO5VIUD76uvkbrkvnsOJSGAuXcKnFfhPW",
    "appRobotResponseList" : [ {
      "robotId" : 85,
      "robotName" : "ces "
    } ]
  }, {
    "id" : 10,
    "name" : "123",
    "description" : "",
    "createTime" : "2017-12-12 16:31:28",
    "companyId" : 6,
    "accessKeyId" : "9wLpiNVcbedPu6NVJR1H",
    "accessKeySecret" : "xg28NuRS1KU2wzcE3QvxlMQQaksIDNp3qytoOi9",
    "appRobotResponseList" : [ {
      "robotId" : 84,
      "robotName" : "hj测试机器人2号"
    } ]
  }, {
    "id" : 6,
    "name" : "测试2",
    "description" : "绑定时间-2017年10月24日10:22:14",
    "createTime" : "2017-10-24 10:21:58",
    "companyId" : 6,
    "accessKeyId" : "ZJxlAoIal+dmbZWalsNW",
    "accessKeySecret" : "9t/EvojGUdvfsMeftZjKM0YQ6iQtVboasEEcpRwM",
    "appRobotResponseList" : [ {
      "robotId" : 84,
      "robotName" : "hj测试机器人2号"
    } ]
  } ]
}

获取应用下所有的机器人列表

请求地址

请求参数

Query parameters

Parameter Type Optional Description
appID String false 应用ID,在初始化会话中对应accessKeyId,在km-管理-应用管理中查看.

请求结果

Path Type Optional Description
code Integer true
message String true
visible Boolean true
data Array true
data[].id Integer true 机器人id.
data[].name String true 机器人名.
data[].logo String true 机器人头像.
data[].channelList Array true 机器人下属渠道列表.
data[].channelList[].id Integer true id.
data[].channelList[].robotId Integer true 机器人Id.
data[].channelList[].name String true 场景名.
data[].channelList[].description String true 场景描述.
data[].channelList[].type Integer true type 1:默认 2:非默认.

示例

$ curl 'https://km.udesk.cn/api/v1/robots?email=admin@udesk.cn&timestamp=1529402448&sign=f9a267c5d3a10f144489f5ec61ce36c696d0fe2e&appID=%2F%2B7772AKE6kv8AVNjWqP' -i -H 'Accept: application/json'
返回
{
    "code": 200,
    "message": "OK",
    "visible": false,
    "exception": null,
    "paging": {
        "pageNum": 1,
        "pageSize": 2,
        "total": 2
    },
    "data": [
        {
            "id": 91,
            "name": "测试L",
            "logo": "https://xxx.oss-cn-beijing.aliyuncs.com/Data/robot/robot_logo_default.png",
            "channelList": [
                {
                    "robotId": 91,
                    "name": "系统默认场景",
                    "type": 1,
                    "id": 93
                }
            ]
        },
        {
            "id": 83,
            "name": "hj 测试机器人3",
            "logo": "https://xxx.oss-cn-beijing.aliyuncs.com/Data/image/ssjeBWZpJPaT8TQ3hXcwhSSx3NJRzjW2/u=3933150512,449646089&fm=27&gp=0.jpg",
            "channelList": [
                {
                    "robotId": 83,
                    "name": "系统默认场景",
                    "type": 1,
                    "id": 82
                },
                {
                    "robotId": 83,
                    "name": "场景2",
                    "type": 2,
                    "id": 83
                }
            ]
        }
    ],
    "extra": null
}