Users.dataSources: list

使用提供的 OAuth 范围列出开发者可以看到的所有数据源。该列表并不详尽;用户可能有只有其他开发者才能看到的不公开数据源,或者使用其他范围的调用。 立即尝试

请求

HTTP 请求

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

参数

参数名称 说明
路径参数
userId string 列出所识别人员的数据源。使用 me 表示经过身份验证的用户。目前仅支持 me
可选的查询参数
dataTypeName string 要包含在列表中的数据类型的名称。如果未指定,将返回所有数据源。

授权

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

范围
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

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

请求正文

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

响应

如果成功,此方法将返回采用以下结构的响应正文:

{
  "dataSource": [
    users.dataSources Resource
  ]
}
属性名称 说明 备注
dataSource[] list 之前创建的数据源。

试试看!

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