POST api/Command/SetAlarm

Set up the alarm clock for the special device HW]

Request Information

Body Parameters

SaveAlarmModel
NameDescriptionTypeAdditional information
ObjId

Item id

integer

None.

DeviceId

device id

integer

None.

AlarmTime

alarm clock time

string

None.

Cycle

repetition period -1 :without repetition 1 :Monday 2 :Tuesday 3 :Wednesday 4 :Tursday 5 :Friday 6 :Saturday 7 :Sunday

string

None.

Label

target

string

None.

IsActive

switch

boolean

None.

Action

action refer to ContactAction Add = 1, // add Update = 2, // amend Deleted = 3 //delete ContactAction

integer

None.

ObjType

object 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:
{
  "ObjId": 1,
  "DeviceId": 2,
  "AlarmTime": "sample string 3",
  "Cycle": "sample string 4",
  "Label": "sample string 5",
  "IsActive": true,
  "Action": 7,
  "ObjType": 8,
  "Token": "sample string 9",
  "Language": "sample string 10",
  "AppId": "sample string 11"
}

application/xml, text/xml

Sample:
<SaveAlarmModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 11</AppId>
  <Language>sample string 10</Language>
  <Token>sample string 9</Token>
  <Action>7</Action>
  <AlarmTime>sample string 3</AlarmTime>
  <Cycle>sample string 4</Cycle>
  <DeviceId>2</DeviceId>
  <IsActive>true</IsActive>
  <Label>sample string 5</Label>
  <ObjId>1</ObjId>
  <ObjType>8</ObjType>
</SaveAlarmModel>

Response Information

Resource Description

NormalResult
NameDescriptionTypeAdditional information
Message

Message [in most cases, the message can be used as a prompt]

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <Message>sample string 1</Message>
</NormalResult>