POST api/Command/SendCommand

向设备发送指令

Request Information

Body Parameters

SendCommandModel
NameDescriptionTypeAdditional information
DeviceId

设备 id

integer

None.

DeviceModel

设备型号

string

None.

CmdCode

指令编码

string

None.

Params

指令参数

string

None.

UserId

用户id

integer

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": 1,
  "DeviceModel": "sample string 2",
  "CmdCode": "sample string 3",
  "Params": "sample string 4",
  "UserId": 5,
  "Token": "sample string 6",
  "Language": "sample string 7",
  "AppId": "sample string 8"
}

application/xml, text/xml

Sample:
<SendCommandModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 8</AppId>
  <Language>sample string 7</Language>
  <Token>sample string 6</Token>
  <CmdCode>sample string 3</CmdCode>
  <DeviceId>1</DeviceId>
  <DeviceModel>sample string 2</DeviceModel>
  <Params>sample string 4</Params>
  <UserId>5</UserId>
</SendCommandModel>

Response Information

Resource Description

State 值为:
0:Send successful
5. 设备正在拍照
6. 设备存储空间已满
7. 设备不在线,指令已存入队列
1101. 设备不存在
1800. 设备不在线
1801. 发送超时
1802. 下发失败
1803. 指令已发送
7000. 非主控号无权操作
1804. 24小时短信发送超过30条
2003. 绑定中间号码失败
1108. 设备号码未填写

CommandResult
NameDescriptionTypeAdditional information
Content

string

None.

Message

string

None.

WIFIItem

Collection of WIFIResult

None.

State

状态码

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Content": "sample string 1",
  "Message": "sample string 2",
  "WIFIItem": [
    {
      "WIFIName": "sample string 1",
      "SSID": "sample string 2",
      "IsCurrentLink": true,
      "Password": "sample string 4"
    },
    {
      "WIFIName": "sample string 1",
      "SSID": "sample string 2",
      "IsCurrentLink": true,
      "Password": "sample string 4"
    }
  ],
  "State": 3
}

application/xml, text/xml

Sample:
<CommandResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>3</State>
  <Content>sample string 1</Content>
  <Message>sample string 2</Message>
  <WIFIItem>
    <WIFIResult>
      <IsCurrentLink>true</IsCurrentLink>
      <Password>sample string 4</Password>
      <SSID>sample string 2</SSID>
      <WIFIName>sample string 1</WIFIName>
    </WIFIResult>
    <WIFIResult>
      <IsCurrentLink>true</IsCurrentLink>
      <Password>sample string 4</Password>
      <SSID>sample string 2</SSID>
      <WIFIName>sample string 1</WIFIName>
    </WIFIResult>
  </WIFIItem>
</CommandResult>