文档首页> ISDP> API参考> API接口> 智能安监> 设备控制> 布控球转动(API名称:openApiSendImMessage)
更新时间:2024-02-19 GMT+08:00
分享

布控球转动(API名称:openApiSendImMessage)

功能介绍

用于与客户系统对接布控球转动接口服务。

相关API

接口名称

调用说明

获取Token

调用该接口获取到Token,再调用其他接口时,需要在请求消息头中添加“Authorization”,其值即为Token。

URL

请求方式

HTTPS地址

服务架构

消息体类型

POST

https://isdp+域名/openapi/v1/openSendImMessage/openApiSendImMessage

OpenAPI

application/json

请求头

KEY

VALUE

是否必填

描述

Content-Type

application/json

Authorization

bearer ${access_token}

bearer +“ ”+5.2.1中获取的access_token的值

请求参数

参数

类型

是否必填

描述

message

String

根据需求有所变化,详情见下方请求示例

响应参数

参数

类型

描述

result

Object

响应消息体

errorMessage

String

接口错误时有值,正常调用时为空

stateCode

String

“0”成功 其他值失败

请求示例(布控球转动例子)

:标红部分的是账号需要修改,759646@saasgroupchat.isdp-saas-sit.test.huawei.com为设备的chatJid;1663658550096是一个随机数UUID;http://isdp-saas-sit.test.huawei.com仅为sit示例,具体地址视现场openfire服务而定;864711是userID; zhang_sit是userName;Zhang123456是操作人;aqm0523接收设备;蓝色部分是发送指令;绿色部分是租户id。

{"message":"<?xml version=\"1.0\" encoding=\"UTF-8\" ?><message to=\"759646@saasgroupchat.isdp-saas- {"message": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><message to=\"769090@saasgroupchat.isdp-saas-sit.test.huawei.com\" id=\"1663658550096\" type=\"chat\"><body>布控球方位调整!</body><subject>helmet-ball-Y2-command</subject><properties xmlns=\"http://isdp-saas-sit.test.huawei.com/xmlns/xmpp/properties\"><content_type type=\"string\">text</content_type><nick type=\"string\">无牙仔</nick><directives_type type=\"string\">helmet-ball-Y2-command</directives_type><directives_attrs type=\"string\">{&quot;command&quot;:&quot;turn&quot;,&quot;value&quot;:&quot;left&quot;,&quot;userId&quot;:864711,&quot;userName&quot;:&quot;zhang_sit&quot;,&quot;userNo&quot;:&quot;Zhang123456&quot;,&quot;tenantId&quot;:886,&quot;uid&quot;:&quot;f75fe2a6ec0c404f98de3d18e88fb736&quot;,&quot;channelId&quot;:&quot;33358871****805&quot;,&quot;deviceId&quot;:&quot;f20909&quot;,&quot;isdpDeviceId&quot;:&quot;f20909--1&quot;}</directives_attrs></properties></message>"}

响应示例

{
"stateCode": "0",
 "errorMessage": null,
 "result": null
}

状态码

状态码请参见状态码

错误码

错误码请参见错误码

分享:

    相关文档

    相关产品