Users.dataSources.datasets: get

傳回含有所有資料點的資料集,這些資料點的起點和結束時間與資料集的最小開始時間和結束時間之間的指定範圍重疊。具體來說,開始時間小於或等於資料集結束時間,且結束時間大於或等於資料集開始時間的任何資料點。立即試用

要求

HTTP 要求

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

參數

參數名稱 說明
路徑參數
dataSourceId string 建立資料集的資料來源的資料串流 ID。
datasetId string 資料集 ID,包含最短資料點開始時間和最長資料點結束時間,以週期的奈秒表示。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.datasets 資源

試試看!

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