Get Application List
Request URL
Request Parameters
Query Parameters
Parameter | Type | Optional | Description |
---|
pageNum | Integer | true | Page number |
pageSize | Integer | true | Page size (default: 20) |
Response
Path | Type | Description |
---|
code | Integer | Execution result code |
message | String | Execution result explanation |
data | Array | Application information |
data[].id | Integer | Application ID |
data[].name | String | Application name |
data[].description | String | Application description |
data[].createTime | String | Application creation time |
data[].companyId | Integer | Company ID of the application |
data[].accessKeyId | String | Application accessKeyId |
data[].accessKeySecret | String | Application accessKeySecret |
data[].appRobotResponseList | Array | Robots bound in the application |
data[].appRobotResponseList[].robotId | Integer | Robot ID |
data[].appRobotResponseList[].robotName | String | Robot name |
Example
$ curl 'https://km.udesk.cn/api/v1/apps?email=admin@udesk.cn×tamp=1529402464&sign=8381262e495ae817172d466d976e42cc83bbbdb4&pageNum=1&pageSize=10'
Response
{
"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 Test Robot Number 2"
}
]
},
{
"id": 6,
"name": "test 2",
"description": "Binding time: October 24th, 2017, 10:22:14",
"createTime": "2017-10-24 10:21:58",
"companyId": 6,
"accessKeyId": "ZJxlAoIal+dmbZWalsNW",
"accessKeySecret": "9t/EvojGUdvfsMeftZjKM0YQ6iQtVboasEEcpRwM",
"appRobotResponseList": [
{
"robotId": 84,
"robotName": "hj Test Robot 2"
}
]
}
]
}
Failure Reasons
Message | Cause |
---|
Failed to convert value of type 'java.lang.String' to required type 'int' | Incorrect integer parameter value |
Get List of Robots under an Application
Request URL
Request Parameters
Query Parameters
Parameter | Type | Optional | Description |
---|
appID | String | false | Application ID, corresponding to accessKeyId |
Response
Path | Type | Description |
---|
code | Integer | Execution result code |
message | String | Execution result explanation |
visible | Boolean | |
data | Array | Robot information |
data[].id | Integer | Robot ID |
data[].name | String | Robot name |
data[].logo | String | Robot logo |
data[].channelList | Array | List of channels under the robot |
data[].channelList[].id | Integer | Scene ID |
data[].channelList[].robotId | Integer | Robot ID |
data[].channelList[].name | String | Scene name |
data[].channelList[].description | String | Scene description |
data[].channelList[].type | Integer | Type: 1 (Default), 2 (Non-default) |
Example
$ curl 'https://km.udesk.cn/api/v1/robots?email=admin@udesk.cn×tamp=1529402448&sign=f9a267c5d3a10f144489f5ec61ce36c696d0fe2e&appID=%2F%2B7772AKE6kv8AVNjWqP'
Response
{
"code": 200,
"message": "OK",
"visible": false,
"exception": null,
"paging": {
"pageNum": 1,
"pageSize": 2,
"total": 2
},
"data": [
{
"id": 91,
"name": "test L",
"logo": "https://xxx.oss-cn-beijing.aliyuncs.com/Data/robot/robot_logo_default.png",
"channelList": [
{
"robotId": 91,
"name": "system default scenario",
"type": 1,
"id": 93
}
]
},
{
"id": 83,
"name": "hj Test Robot 3",
"logo": "https://xxx.oss-cn-beijing.aliyuncs.com/Data/image/ssjeBWZpJPaT8TQ3hXcwhSSx3NJRzjW2/u=3933150512,449646089&fm=27&gp=0.jpg",
"channelList": [
{
"robotId": 83,
"name": "system default scenario",
"type": 1,
"id": 82
},
{
"robotId": 83,
"name": "Scenario2",
"type": 2,
"id": 83
}
]
}
]
}
Failure
Reasons
Message | Description |
---|
"The ID has no corresponding application" | Invalid APPID |