POST api/Health/GetSleepData

Get sleep data [watch]

Request Information

Body Parameters

GetSleepDataModel
NameDescriptionTypeAdditional information
Imei

IMEI

string

None.

Start

starting time UTC

date

None.

End

ending time UTC

date

None.

TimeOffset

cell phonetime zone

decimal number

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:
{
  "Imei": "sample string 1",
  "Start": "2018-12-19T05:08:30.8313281+08:00",
  "End": "2018-12-19T05:08:30.8313281+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>2018-12-19T05:08:30.8313281+08:00</End>
  <Imei>sample string 1</Imei>
  <Start>2018-12-19T05:08:30.8313281+08:00</Start>
  <TimeOffset>4.1</TimeOffset>
</GetSleepDataModel>

Response Information

Resource Description

Statestatus code:
0. Indicates success

GetSleepDataResult
NameDescriptionTypeAdditional information
Items

data

Collection of Sleep

None.

State

status code

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>