POST api/Sleep/CaculaterSleepStates?startTime={startTime}

计算睡眠状态

Request Information

URI Parameters

NameDescriptionTypeAdditional information
startTime

date

Required

Body Parameters

Collection of SleepDecibelInfo
NameDescriptionTypeAdditional information
startTime

string

None.

endTime

string

None.

decibel

decimal number

None.

dbList

Collection of decimal number

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "startTime": "sample string 1",
    "endTime": "sample string 2",
    "decibel": 3.1,
    "dbList": [
      1.1,
      2.1
    ]
  },
  {
    "startTime": "sample string 1",
    "endTime": "sample string 2",
    "decibel": 3.1,
    "dbList": [
      1.1,
      2.1
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfSleepDecibelInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Controllers">
  <SleepDecibelInfo>
    <dbList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:double>1.1</d3p1:double>
      <d3p1:double>2.1</d3p1:double>
    </dbList>
    <decibel>3.1</decibel>
    <endTime>sample string 2</endTime>
    <startTime>sample string 1</startTime>
  </SleepDecibelInfo>
  <SleepDecibelInfo>
    <dbList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:double>1.1</d3p1:double>
      <d3p1:double>2.1</d3p1:double>
    </dbList>
    <decibel>3.1</decibel>
    <endTime>sample string 2</endTime>
    <startTime>sample string 1</startTime>
  </SleepDecibelInfo>
</ArrayOfSleepDecibelInfo>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Collection of SleepStateInfo2
NameDescriptionTypeAdditional information
startTime

date

None.

endTime

date

None.

state

0深睡 1浅睡 2醒着

integer

None.

var

decimal number

None.

span

decimal number

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "startTime": "2020-07-13T12:04:32.5149448+08:00",
    "endTime": "2020-07-13T12:04:32.5149448+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  },
  {
    "startTime": "2020-07-13T12:04:32.5149448+08:00",
    "endTime": "2020-07-13T12:04:32.5149448+08:00",
    "state": 3,
    "var": 4.1,
    "span": 5.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSleepStateInfo2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Controllers">
  <SleepStateInfo2>
    <endTime>2020-07-13T12:04:32.5149448+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-07-13T12:04:32.5149448+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
  <SleepStateInfo2>
    <endTime>2020-07-13T12:04:32.5149448+08:00</endTime>
    <span>5.1</span>
    <startTime>2020-07-13T12:04:32.5149448+08:00</startTime>
    <state>3</state>
    <var>4.1</var>
  </SleepStateInfo2>
</ArrayOfSleepStateInfo2>