POST api/Command/SendCommand

Send instructions to the device

Request Information

Body Parameters

SendCommandModel
NameDescriptionTypeAdditional information
DeviceId

device id

integer

None.

DeviceModel

type model

string

None.

CmdCode

Command code

string

None.

Params

order parameter

string

None.

UserId

user id

integer

None.

Type

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

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,
  "Type": 6,
  "Token": "sample string 7",
  "Language": "sample string 8",
  "AppId": "sample string 9"
}

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 9</AppId>
  <Language>sample string 8</Language>
  <Token>sample string 7</Token>
  <CmdCode>sample string 3</CmdCode>
  <DeviceId>1</DeviceId>
  <DeviceModel>sample string 2</DeviceModel>
  <Params>sample string 4</Params>
  <Type>6</Type>
  <UserId>5</UserId>
</SendCommandModel>

Response Information

Resource Description

State value is:
0:Send successful
5. device is taking photo
6. The device storage space is full
7. The device is not online and the instructions are in the queue
1101. device does not exist
1800. The device is not online
1801. Send timeout
1802. Issued by the failure
1803. Instruction sent
7000. The non-master number has no right to operate

CommandResult
NameDescriptionTypeAdditional information
Content

string

None.

Message

string

None.

WIFIItem

Collection of WIFIResult

None.

State

status code

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>