---
# System prepended metadata

title: 六圖統計表
tags: [API]

---

---
title: 六圖統計表
tags: API
description: 呼叫參數、接收參數
---

以下查詢模組資料與每日睡眠報告中的參數相通
僅為了有Api呼叫多天份的 單一參數


# 呼叫參數
- deviceNumber 裝置編號(String)
- queryModule 查詢模組(String)
    - 分為 睡眠時長、入睡時長、睡眠效率、通常上床、通常離床、夜起次數
- queryType 查詢類型 (預設月)(String)
    - 分為週、月、季、年
- accessToken 通行證(String)
- queryDate 查詢日期(String)
    - 根據查詢類型獲取資料
```
{
  "deviceNumber":"20:59:A0:B0:91", 
  "queryModule":"sleepTime/lengthOfSleep/sleepEfficiency/usuallyOnBed/usuallyLeaveBed/numOfNight",
  "queryType":"week/month/season/year",
  "accessToken":"",
  "queryDate":"2020-07-10",
}
```
   
   
# 回傳參數定義 (小數點四捨五入取整數)
- status (String)
- code (Int)
- message (String)
- queryDate (String)
- queryType (String)
- name (String)
- valueCount (Int)
- valueAvg (Int)
- day  (String [])
- value (Int [])


   
# 回傳參數
```
{
  "status":"success",
  "code":200,
  "message":"OK",
  "data":{
    "queryDate":"2019-01-07",
    "queryType":"week",
    "name":"sleepTime",
    "valueCount":7,
    "valueAvg":408,
    "rawValue":{
      "day":["2019-01-06","2019-01-07","2019-01-08","2019-01-09","2019-01-10","2019-01-11","2019-01-12"],
      "value":[420,421,444,300,412,451,412]
    }
  }
}
```

# 用途
![](https://i.imgur.com/4y1mJKK.png)
![](https://i.imgur.com/sU13yKA.png)
![](https://i.imgur.com/pRF6D35.png)
![](https://i.imgur.com/qBbYATX.png)
