アプリケーションリストの取得
リクエストURL
リクエストパラメータ
クエリパラメータ
| Parameter |
Type |
Optional |
Description |
| pageNum |
Integer |
true |
ページ番号. |
| pageSize |
Integer |
true |
ページサイズ. |
レスポンス
| Path |
Type |
Description |
| code |
Integer |
実行結果コード |
| message |
String |
実行結果メッセージ |
| data |
Array |
アプリケーション情報 |
| data[].id |
Integer |
アプリケーションID. |
| data[].name |
String |
アプリケーション名. |
| data[].description |
String |
アプリケーションの説明. |
| data[].createTime |
String |
アプリケーション作成日時. |
| data[].companyId |
Integer |
アプリケーションの会社ID. |
| data[].accessKeyId |
String |
アプリケーションのaccessKeyId. |
| data[].accessKeySecret |
String |
アプリケーションのaccessKeySecret. |
| data[].appRobotResponseList |
Array |
アプリケーションに紐づくボット. |
| data[].appRobotResponseList[].robotId |
Integer |
ボットID. |
| data[].appRobotResponseList[].robotName |
String |
ボット名. |
例
$ curl 'https://km.udesk.cn/api/v1/apps?email=admin@udesk.cn×tamp=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号"
} ]
} ]
}
リクエスト失敗の原因
| Message |
Cause |
| Failed to convert value of type 'java.lang.String' to required type 'int'; |
整数型パラメータの値が異常です |
アプリケーション下のすべてのボットリストを取得
リクエストURL
リクエストパラメータ
クエリパラメータ
| Parameter |
Type |
Optional |
Description |
| appID |
String |
false |
アプリケーションID。セッション初期化時のaccessKeyIdに対応します。km-管理-アプリケーション管理で確認できます。 |
レスポンス
| Path |
Type |
Description |
| code |
Integer |
実行結果コード |
| message |
String |
実行結果の説明 |
| visible |
Boolean |
|
| data |
Array |
ボット情報 |
| data[].id |
Integer |
ボットID |
| data[].name |
String |
ボット名 |
| data[].logo |
String |
ボットのアバター |
| data[].channelList |
Array |
ボットに属するチャネルリスト |
| data[].channelList[].id |
Integer |
シーンID |
| data[].channelList[].robotId |
Integer |
ボットID |
| data[].channelList[].name |
String |
シーン名 |
| data[].channelList[].description |
String |
シーンの説明 |
| data[].channelList[].type |
Integer |
type 1:デフォルト 2:非デフォルト |
例
$ curl 'https://km.udesk.cn/api/v1/robots?email=admin@udesk.cn×tamp=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
}
]
}
]
}
リクエスト失敗の原因
| Message |
Description |
| "The ID has no corresponding application" |
APPIDが無効です |