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 先前建立的資料來源。

試試看!

使用下方的 APIs Explorer,針對有效資料呼叫這個方法,然後查看回應。