Appearance
Provider data statistics user trend
GET
v1/ad/provider/data/:provider_id/total/:user_id
Request
name | necessary | type | default | describe |
---|---|---|---|---|
start_date | false | string | - | 开始日期(start date) |
end_date | false | string | - | 结束日期(end date) |
Response data struct
name | necessary | type | default | describe |
---|---|---|---|---|
code | true | int | - | 错误码(error code) |
message | true | string | - | 错误信息(error message) |
cause | true | string | - | 错误原因(error cause) |
details | true | object | - | 详情(details) |
-wire_time | true | array | - | 佩戴时间(wire time) |
--date | true | string | - | 日期(date) |
--value | true | int | - | 值(value) |
-wire_time_avg | true | float | - | 佩戴时间平均值(wire time avg) |
-sleep_score | true | array | - | 睡眠分数(sleep score) |
--date | true | string | - | 日期(date) |
--value | true | int | - | 值(value) |
-sleep_score_avg | true | float | - | 睡眠分数平均值(sleep score avg) |
-blood_oxygen | true | array | - | 血氧(bloodoxygen) |
--date | true | string | - | 日期(date) |
--value | true | float | - | 值(value) |
-blood_oxygen_avg | true | float | - | 血氧平均值(bloodoxygen avg) |
-odi_index | true | array | - | odi指标(odi index) |
--date | true | string | - | 日期(date) |
--value | true | float | - | 值(value) |
-odi_index_avg | true | float | - | odi指标(odi index |
-heart_rate | true | array | - | 心率(heart rate) |
--date | true | string | - | 日期(date) |
--value | true | float | - | 值(value) |
-heart_rate_avg | true | float | - | 心率平均值(heart rate avg) |
-advancement_position | true | array | - | 滴定值(advancement position) |
--date | true | string | - | 日期(date) |
--value | true | float | - | 值(value) |
Example
Url params:
v1/ad/provider/data/20221201092014WSUxccxp/total/36
Query params:
key | value |
---|---|
start_date | 2022-10-01 |
end_date | 2022-10-31 |
- Header:
key | value |
---|---|
x-api-key | your's key value |
- Response body:
json
{
"code": 0,
"message": "Success",
"cause": "",
"details": {
"wire_time": [
{
"date": "2022-10-26",
"value": 2
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"wire_time_avg": 0.6666666666666667,
"wire_time_peak": {
"max_value": 2,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-29"
},
"sleep_score": [
{
"date": "2022-10-26",
"value": 20
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"sleep_score_avg": 6.666666666666667,
"sleep_score_peak": {
"max_value": 20,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-29"
},
"blood_oxygen": [
{
"date": "2022-10-26",
"value": 93.48
},
{
"date": "2022-10-29",
"value": 93.59
},
{
"date": "2022-10-30",
"value": 99
}
],
"blood_oxygen_avg": 95.33333333333333,
"blood_oxygen_peak": {
"max_value": 99,
"max_date": "2022-10-30",
"min_value": 93.48,
"min_date": "2022-10-26"
},
"odi_index": [
{
"date": "2022-10-26",
"value": 0
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"odi_index_avg": 0,
"odi_index_peak": {
"max_value": 0,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-26"
},
"heart_rate": [
{
"date": "2022-10-26",
"value": 64.66
},
{
"date": "2022-10-29",
"value": 69.16
},
{
"date": "2022-10-30",
"value": 75.58
}
],
"heart_rate_avg": 69.66666666666667,
"heart_rate_peak": {
"max_value": 75.58,
"max_date": "2022-10-30",
"min_value": 64.66,
"min_date": "2022-10-26"
},
"advancement_position": [
{
"date": "2022-10-01",
"value": ""
},
{
"date": "2022-10-02",
"value": ""
},
{
"date": "2022-10-03",
"value": ""
},
{
"date": "2022-10-04",
"value": ""
},
{
"date": "2022-10-05",
"value": ""
},
{
"date": "2022-10-06",
"value": ""
},
{
"date": "2022-10-07",
"value": ""
},
{
"date": "2022-10-08",
"value": ""
},
{
"date": "2022-10-09",
"value": ""
},
{
"date": "2022-10-10",
"value": ""
},
{
"date": "2022-10-11",
"value": ""
},
{
"date": "2022-10-12",
"value": ""
},
{
"date": "2022-10-13",
"value": ""
},
{
"date": "2022-10-14",
"value": ""
},
{
"date": "2022-10-15",
"value": ""
},
{
"date": "2022-10-16",
"value": ""
},
{
"date": "2022-10-17",
"value": ""
},
{
"date": "2022-10-18",
"value": ""
},
{
"date": "2022-10-19",
"value": ""
},
{
"date": "2022-10-20",
"value": ""
},
{
"date": "2022-10-21",
"value": ""
},
{
"date": "2022-10-22",
"value": ""
},
{
"date": "2022-10-23",
"value": ""
},
{
"date": "2022-10-24",
"value": ""
},
{
"date": "2022-10-25",
"value": ""
},
{
"date": "2022-10-26",
"value": "4"
},
{
"date": "2022-10-27",
"value": "4"
},
{
"date": "2022-10-28",
"value": "4"
},
{
"date": "2022-10-29",
"value": "4"
},
{
"date": "2022-10-30",
"value": "4"
},
{
"date": "2022-10-31",
"value": "4"
}
]
}
}
{
"code": 0,
"message": "Success",
"cause": "",
"details": {
"wire_time": [
{
"date": "2022-10-26",
"value": 2
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"wire_time_avg": 0.6666666666666667,
"wire_time_peak": {
"max_value": 2,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-29"
},
"sleep_score": [
{
"date": "2022-10-26",
"value": 20
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"sleep_score_avg": 6.666666666666667,
"sleep_score_peak": {
"max_value": 20,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-29"
},
"blood_oxygen": [
{
"date": "2022-10-26",
"value": 93.48
},
{
"date": "2022-10-29",
"value": 93.59
},
{
"date": "2022-10-30",
"value": 99
}
],
"blood_oxygen_avg": 95.33333333333333,
"blood_oxygen_peak": {
"max_value": 99,
"max_date": "2022-10-30",
"min_value": 93.48,
"min_date": "2022-10-26"
},
"odi_index": [
{
"date": "2022-10-26",
"value": 0
},
{
"date": "2022-10-29",
"value": 0
},
{
"date": "2022-10-30",
"value": 0
}
],
"odi_index_avg": 0,
"odi_index_peak": {
"max_value": 0,
"max_date": "2022-10-26",
"min_value": 0,
"min_date": "2022-10-26"
},
"heart_rate": [
{
"date": "2022-10-26",
"value": 64.66
},
{
"date": "2022-10-29",
"value": 69.16
},
{
"date": "2022-10-30",
"value": 75.58
}
],
"heart_rate_avg": 69.66666666666667,
"heart_rate_peak": {
"max_value": 75.58,
"max_date": "2022-10-30",
"min_value": 64.66,
"min_date": "2022-10-26"
},
"advancement_position": [
{
"date": "2022-10-01",
"value": ""
},
{
"date": "2022-10-02",
"value": ""
},
{
"date": "2022-10-03",
"value": ""
},
{
"date": "2022-10-04",
"value": ""
},
{
"date": "2022-10-05",
"value": ""
},
{
"date": "2022-10-06",
"value": ""
},
{
"date": "2022-10-07",
"value": ""
},
{
"date": "2022-10-08",
"value": ""
},
{
"date": "2022-10-09",
"value": ""
},
{
"date": "2022-10-10",
"value": ""
},
{
"date": "2022-10-11",
"value": ""
},
{
"date": "2022-10-12",
"value": ""
},
{
"date": "2022-10-13",
"value": ""
},
{
"date": "2022-10-14",
"value": ""
},
{
"date": "2022-10-15",
"value": ""
},
{
"date": "2022-10-16",
"value": ""
},
{
"date": "2022-10-17",
"value": ""
},
{
"date": "2022-10-18",
"value": ""
},
{
"date": "2022-10-19",
"value": ""
},
{
"date": "2022-10-20",
"value": ""
},
{
"date": "2022-10-21",
"value": ""
},
{
"date": "2022-10-22",
"value": ""
},
{
"date": "2022-10-23",
"value": ""
},
{
"date": "2022-10-24",
"value": ""
},
{
"date": "2022-10-25",
"value": ""
},
{
"date": "2022-10-26",
"value": "4"
},
{
"date": "2022-10-27",
"value": "4"
},
{
"date": "2022-10-28",
"value": "4"
},
{
"date": "2022-10-29",
"value": "4"
},
{
"date": "2022-10-30",
"value": "4"
},
{
"date": "2022-10-31",
"value": "4"
}
]
}
}