logo

Get Application List

Request URL

  • GET /v1/apps

Request Parameters

Query Parameters

ParameterTypeOptionalDescription
pageNumIntegertruePage number
pageSizeIntegertruePage size (default: 20)

Response

PathTypeDescription
codeIntegerExecution result code
messageStringExecution result explanation
dataArrayApplication information
data[].idIntegerApplication ID
data[].nameStringApplication name
data[].descriptionStringApplication description
data[].createTimeStringApplication creation time
data[].companyIdIntegerCompany ID of the application
data[].accessKeyIdStringApplication accessKeyId
data[].accessKeySecretStringApplication accessKeySecret
data[].appRobotResponseListArrayRobots bound in the application
data[].appRobotResponseList[].robotIdIntegerRobot ID
data[].appRobotResponseList[].robotNameStringRobot name

Example

$ curl 'https://km.udesk.cn/api/v1/apps?email=admin@udesk.cn&timestamp=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

MessageCause
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

  • GET /v1/robots

Request Parameters

Query Parameters

ParameterTypeOptionalDescription
appIDStringfalseApplication ID, corresponding to accessKeyId

Response

PathTypeDescription
codeIntegerExecution result code
messageStringExecution result explanation
visibleBoolean
dataArrayRobot information
data[].idIntegerRobot ID
data[].nameStringRobot name
data[].logoStringRobot logo
data[].channelListArrayList of channels under the robot
data[].channelList[].idIntegerScene ID
data[].channelList[].robotIdIntegerRobot ID
data[].channelList[].nameStringScene name
data[].channelList[].descriptionStringScene description
data[].channelList[].typeIntegerType: 1 (Default), 2 (Non-default)

Example

$ curl 'https://km.udesk.cn/api/v1/robots?email=admin@udesk.cn&timestamp=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

MessageDescription
"The ID has no corresponding application"Invalid APPID