POST api/KWatch/SetAlarm
设置闹钟 [专用接口]
Request Information
Body Parameters
SaveAlarmModel| Name | Description | Type | Additional information |
|---|---|---|---|
| ObjId |
项 id |
integer |
None. |
| DeviceId |
设备Id |
integer |
None. |
| AlarmTime |
闹钟时间 |
string |
None. |
| Cycle |
重复周期 -1 :不重复 1 :Monday 2 :Tuesday 3 :Wednesday 4 :Tursday 5 :Friday 6 :Saturday 7 :Sunday |
string |
None. |
| Label |
标签 |
string |
None. |
| IsActive |
开关 |
boolean |
None. |
| Action |
动作 参见 ContactAction Add = 1, // 添加 Update = 2, // 修改 Deleted = 3 //删除 ContactAction |
integer |
None. |
| ObjType |
对象类型 |
integer |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
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
| Name | Description | Type | Additional information |
|---|---|---|---|
| Message |
消息 [大多数情况下可通过该消息做为提示语] |
string |
None. |
| State |
状态码 |
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>