承载协议 | HTTPS GET |
|---|---|
接口方向 | 开发者应用->Health Service Kit云 |
接口URL | https://health-api.cloud.huawei.com/healthkit/v2/athleticPerformance?types=***&types=***&startDay=***&endDay=***&timeZone=*** |
数据格式 | 请求消息:Content-Type: application/json 响应消息:Content-Type: application/json |
Request Header
参数 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
timeZone | String | 是 | 时区。其中的特殊字符需要进行URL编码。 例如待设置的时区为+0800时,需要输入“%2b0800”。 |
startDay | int | 是 | 查询开始日期,格式yyyyMMdd。 |
endDay | int | 是 | 查询结束日期,格式yyyyMMdd。从开始日期算起最大支持查询的时间间隔为31天。 |
types | String[] | 否 | 需要查询的运动能力指数:
如果不传值,则查询以上四种指数。 |
Request Body
无
GET https://health-api.cloud.huawei.com/healthkit/v2/athleticPerformance?types=runningAbility&types=condition&startDay=20241020&endDay=20241024&timeZone=%2b0800 Content-Type: application/json Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
状态码为200时:
Response Header
参数 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
Content-Type | String | 是 | 取值为:application/json; charset=UTF-8 |
Response Body
参数 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
Map<Integer, AthleticPerformance> | Map | 是 | 历史跑力数据,请参见AthleticPerformance数据模型。 |
HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
20241020: {
"runningAbility": 20,
"fitness": 0.0814,
"fatigue": 0.0001,
"condition": 0.0832
},
20241021: {
"runningAbility": 20,
"fitness": 0.0795,
"fatigue": 0.0001,
"condition": 0.0812
},
20241022: {
"runningAbility": 20,
"fitness": 0.0776,
"fatigue": 0.0001,
"condition": 0.0794
},
20241023: {
"runningAbility": 20,
"fitness": 0.0758,
"fatigue": 0.0001,
"condition": 0.0775
},
20241024: {
"runningAbility": 20,
"fitness": 0.074,
"fatigue": 0.0001,
"condition": 0.0757
}
}