POST api/Command/CommandList

Get device's command list

Request Information

Body Parameters

DeviceCommandListModel
NameDescriptionTypeAdditional information
DeviceId

Device id

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,
  "Token": "sample string 2",
  "Language": "sample string 3",
  "AppId": "sample string 4"
}

application/xml, text/xml

Sample:
<DeviceCommandListModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 4</AppId>
  <Language>sample string 3</Language>
  <Token>sample string 2</Token>
  <DeviceId>1</DeviceId>
</DeviceCommandListModel>

Response Information

Resource Description

State status code illustrate:
0. success
100. success but no data
1000. device does not exist

DeviceCommandListResult
NameDescriptionTypeAdditional information
Items

A list of device instructions

Collection of Cmd

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Items": [
    {
      "Code": "sample string 1",
      "Name": "sample string 2",
      "CmdValue": "sample string 3",
      "SMSType": 4,
      "SMSContent": "sample string 5"
    },
    {
      "Code": "sample string 1",
      "Name": "sample string 2",
      "CmdValue": "sample string 3",
      "SMSType": 4,
      "SMSContent": "sample string 5"
    }
  ],
  "State": 1
}

application/xml, text/xml

Sample:
<DeviceCommandListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>1</State>
  <Items>
    <Cmd>
      <CmdValue>sample string 3</CmdValue>
      <Code>sample string 1</Code>
      <Name>sample string 2</Name>
      <SMSContent>sample string 5</SMSContent>
      <SMSType>4</SMSType>
    </Cmd>
    <Cmd>
      <CmdValue>sample string 3</CmdValue>
      <Code>sample string 1</Code>
      <Name>sample string 2</Name>
      <SMSContent>sample string 5</SMSContent>
      <SMSType>4</SMSType>
    </Cmd>
  </Items>
</DeviceCommandListResult>