Users.dataSources.datasets: get

返回一个数据集,其中包含所有起始点和结束点与指定的数据集最短开始时间和最长结束时间重叠的数据点。具体而言,开始时间短于或等于数据集结束时间且结束时间大于或等于数据集开始时间的任何数据点。立即尝试

请求

HTTP 请求

GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId

参数

参数名称 说明
路径参数
dataSourceId string 创建数据集的数据源的 ID。
datasetId string 数据集标识符,是最低数据点开始时间和最大数据点结束时间的组合(表示为从公元纪年开始到纳秒为单位)。ID 的格式为:startTime-endTime,其中 startTimeendTime 为 64 位整数。
userId string 检索所识别的人员的数据集。使用 me 表示经过身份验证的用户。目前仅支持 me
可选的查询参数
limit integer 如果已指定,则数据集中包含的数据点数量不得超过此值。如果数据集中存在更多数据点,则数据集响应中会设置 nextPageToken。系统会在时间范围结束时应用限制。也就是说,如果 pageToken 不存在,则返回 limit 最新数据点。
pageToken string 用于对大型数据集进行分页的延续令牌。如需获取数据集的下一页,请将此参数设置为上一个响应中的 nextPageToken 的值。每个后续调用都将生成部分数据集,其数据点结束时间戳严格低于上一个部分响应中的时间戳。

授权

此请求需要获得以下至少一个范围的授权:

范围
https://www.googleapis.com/auth/fitness.activity.read
https://www.googleapis.com/auth/fitness.activity.write
https://www.googleapis.com/auth/fitness.location.read
https://www.googleapis.com/auth/fitness.location.write
https://www.googleapis.com/auth/fitness.body.read
https://www.googleapis.com/auth/fitness.body.write
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
https://www.googleapis.com/auth/fitness.blood_pressure.read
https://www.googleapis.com/auth/fitness.blood_pressure.write
https://www.googleapis.com/auth/fitness.blood_glucose.read
https://www.googleapis.com/auth/fitness.blood_glucose.write
https://www.googleapis.com/auth/fitness.oxygen_saturation.read
https://www.googleapis.com/auth/fitness.oxygen_saturation.write
https://www.googleapis.com/auth/fitness.body_temperature.read
https://www.googleapis.com/auth/fitness.body_temperature.write
https://www.googleapis.com/auth/fitness.reproductive_health.read
https://www.googleapis.com/auth/fitness.reproductive_health.write

如需了解详情,请参阅身份验证和授权页面。

请求正文

使用此方法时请勿提供请求正文。

响应

如果成功,此方法将在响应正文中返回 Users.dataSources.dataset 资源

试试看!

请使用下面的 API Explorer 针对实际数据调用此方法并查看响应。