POST api/Health/GetSleepData
获取睡眠数据 [手表]
Request Information
Body Parameters
GetSleepDataModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Imei |
IMEI |
string |
None. |
| Start |
开始时间 UTC |
date |
None. |
| End |
结束时间 UTC |
date |
None. |
| TimeOffset |
手机时区 |
decimal number |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Imei": "sample string 1",
"Start": "2025-12-12T05:26:15.8206405+08:00",
"End": "2025-12-12T05:26:15.8206405+08:00",
"TimeOffset": 4.1,
"Token": "sample string 5",
"Language": "sample string 6",
"AppId": "sample string 7"
}
application/xml, text/xml
Sample:
<GetSleepDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel"> <AppId>sample string 7</AppId> <Language>sample string 6</Language> <Token>sample string 5</Token> <End>2025-12-12T05:26:15.8206405+08:00</End> <Imei>sample string 1</Imei> <Start>2025-12-12T05:26:15.8206405+08:00</Start> <TimeOffset>4.1</TimeOffset> </GetSleepDataModel>
Response Information
Resource Description
State状态码:
0. 表示成功
| Name | Description | Type | Additional information |
|---|---|---|---|
| Items |
数据 |
Collection of Sleep |
None. |
| State |
状态码 |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"Items": [
{
"Start": "sample string 1",
"End": "sample string 2",
"TotalSec": 3,
"DeepSleepSec": 4,
"LightSleepSec": 5,
"Roll": 6,
"Wake": 7,
"Quality": 8
},
{
"Start": "sample string 1",
"End": "sample string 2",
"TotalSec": 3,
"DeepSleepSec": 4,
"LightSleepSec": 5,
"Roll": 6,
"Wake": 7,
"Quality": 8
}
],
"State": 1
}
application/xml, text/xml
Sample:
<GetSleepDataResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
<State>1</State>
<Items>
<Sleep>
<DeepSleepSec>4</DeepSleepSec>
<End>sample string 2</End>
<LightSleepSec>5</LightSleepSec>
<Quality>8</Quality>
<Roll>6</Roll>
<Start>sample string 1</Start>
<TotalSec>3</TotalSec>
<Wake>7</Wake>
</Sleep>
<Sleep>
<DeepSleepSec>4</DeepSleepSec>
<End>sample string 2</End>
<LightSleepSec>5</LightSleepSec>
<Quality>8</Quality>
<Roll>6</Roll>
<Start>sample string 1</Start>
<TotalSec>3</TotalSec>
<Wake>7</Wake>
</Sleep>
</Items>
</GetSleepDataResult>