Users.dataSources.datasets: get

傳回含有所有資料點的資料集,其中開始時間和結束時間與指定資料集最小開始時間和最大結束時間重疊。具體來說,任何資料點的開始時間小於或等於資料集結束時間,以及結束時間大於或等於資料集開始時間的資料點。立即試用

要求

HTTP 要求

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

參數

參數名稱 說明
路徑參數
dataSourceId string 建立資料集的資料來源 ID。
datasetId string 資料集識別碼,結合了最低資料點開始時間和最高資料點結束時間 (以 Epoch 紀元時間表示奈秒)。 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 resources

試試看!

使用 APIs Explorer 針對即時資料呼叫這個方法,並查看回應。