Google Fit REST API के साथ-साथ, Google Fit के सभी एपीआई 2026 में बंद कर दिए जाएंगे. डेवलपर, 1 मई, 2024 से इन एपीआई का इस्तेमाल करने के लिए साइन अप नहीं कर सकते.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
वह डेटासेट देता है जिसमें सभी डेटा बिंदु शामिल होते हैं, जिनके शुरू और खत्म होने का समय होता है
डेटासेट के शुरू होने के कम से कम समय की तय की गई सीमा से ओवरलैप करें और
खत्म होने का ज़्यादा से ज़्यादा समय. खास तौर पर, ऐसा कोई भी डेटा पॉइंट जिसका शुरू होने का समय कम है
डेटासेट के खत्म होने के समय से ज़्यादा या उसके बराबर और जिसके खत्म होने का समय, या से ज़्यादा है
डेटासेट शुरू होने के समय के बराबर होना चाहिए.
इसे अभी आज़माएं.
अनुरोध
एचटीटीपी अनुरोध
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId
पैरामीटर
पैरामीटर का नाम
मान
ब्यौरा
पाथ पैरामीटर
dataSourceId
string
डेटासेट बनाने वाले डेटा सोर्स का डेटा स्ट्रीम आईडी.
datasetId
string
डेटासेट आइडेंटिफ़ायर, जो डेटा पॉइंट के शुरू होने के कम से कम समय को मिलाकर बनाया गया है
और सबसे ज़्यादा डेटा पॉइंट के खत्म होने का समय, epoch के लिए नैनोसेकंड से दिखाया जाता है.
आईडी का फ़ॉर्मैट "startTime-endTime" है
जहां startTime और endTime, 64 बिट के पूर्णांक हैं.
userId
string
पहचाने गए व्यक्ति के लिए डेटासेट पाएं. इसके लिए me का इस्तेमाल करें
प्रमाणित उपयोगकर्ता को दर्शाता हो. इसमें सिर्फ़ me का इस्तेमाल किया जा सकता है
समय.
वैकल्पिक क्वेरी पैरामीटर
limit
integer
अगर तय किया गया है, तो इसमें इतने से ज़्यादा डेटा पॉइंट नहीं जोड़े जाएंगे
डेटासेट. अगर डेटासेट में ज़्यादा डेटा पॉइंट हैं, तो NextPageToken
को डेटासेट रिस्पॉन्स में सेट किया जाएगा.
यह सीमा, समयसीमा के खत्म होने पर लागू की जाती है. इसका मतलब है कि अगर
pageToken मौजूद नहीं है, limit का सबसे हाल का डेटा
पॉइंट वापस कर दिए जाएंगे.
pageToken
string
कंटिन्यूएशन टोकन, जिसका इस्तेमाल बड़े डेटासेट में पेज करने के लिए किया जाता है.
डेटासेट का अगला पेज पाने के लिए, इस पैरामीटर को
पिछले जवाब से nextPageToken. हर एक बाद
कॉल से डेटा पॉइंट खत्म होने के टाइमस्टैंप के साथ आंशिक डेटासेट मिलेगा.
यह पिछले पार्शियल जवाब में मौजूद डेटा से कम हो.
अनुमति देना
इस अनुरोध के लिए, इनमें से कम से कम एक दायरे की अनुमति लेना ज़रूरी है:
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eRetrieves a dataset containing all data points within a specified time range, overlapping with the dataset's minimum start and maximum end times.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes related to fitness data access (e.g., \u003ccode\u003ehttps://www.googleapis.com/auth/fitness.activity.read\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eUses a GET request to the endpoint \u003ccode\u003ehttps://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId\u003c/code\u003e with parameters for user, data source, and dataset identification.\u003c/p\u003e\n"],["\u003cp\u003eAllows optional parameters like \u003ccode\u003elimit\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e to control the size and pagination of the returned dataset.\u003c/p\u003e\n"],["\u003cp\u003eReturns a \u003ccode\u003eUsers.dataSources.datasets\u003c/code\u003e resource upon successful execution, containing the requested fitness data.\u003c/p\u003e\n"]]],[],null,["# Users.dataSources.datasets: get\n\n| **Note:** Requires [authorization](#auth).\n\nReturns a dataset containing all data points whose start and end times\noverlap with the specified range of the dataset minimum start time and\nmaximum end time. Specifically, any data point whose start time is less\nthan or equal to the dataset end time and whose end time is greater than or\nequal to the dataset start time.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `dataSourceId` | `string` | The data stream ID of the data source that created the dataset. |\n| `datasetId` | `string` | Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: \"\u003cvar translate=\"no\"\u003estartTime\u003c/var\u003e-\u003cvar translate=\"no\"\u003eendTime\u003c/var\u003e\" where \u003cvar translate=\"no\"\u003estartTime\u003c/var\u003e and \u003cvar translate=\"no\"\u003eendTime\u003c/var\u003e are 64 bit integers. |\n| `userId` | `string` | Retrieve a dataset for the person identified. Use `me` to indicate the authenticated user. Only `me` is supported at this time. |\n| **Optional query parameters** |||\n| `limit` | `integer` | If specified, no more than this many data points will be included in the dataset. If there are more data points in the dataset, nextPageToken will be set in the dataset response. The limit is applied from the end of the time range. That is, if \u003cvar translate=\"no\"\u003epageToken\u003c/var\u003e is absent, the \u003cvar translate=\"no\"\u003elimit\u003c/var\u003e most recent data points will be returned. |\n| `pageToken` | `string` | The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of `nextPageToken` from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response. |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|---------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/fitness.activity.read` |\n| `https://www.googleapis.com/auth/fitness.activity.write` |\n| `https://www.googleapis.com/auth/fitness.location.read` |\n| `https://www.googleapis.com/auth/fitness.location.write` |\n| `https://www.googleapis.com/auth/fitness.body.read` |\n| `https://www.googleapis.com/auth/fitness.body.write` |\n| `https://www.googleapis.com/auth/fitness.nutrition.read` |\n| `https://www.googleapis.com/auth/fitness.nutrition.write` |\n| `https://www.googleapis.com/auth/fitness.blood_pressure.read` |\n| `https://www.googleapis.com/auth/fitness.blood_pressure.write` |\n| `https://www.googleapis.com/auth/fitness.blood_glucose.read` |\n| `https://www.googleapis.com/auth/fitness.blood_glucose.write` |\n| `https://www.googleapis.com/auth/fitness.oxygen_saturation.read` |\n| `https://www.googleapis.com/auth/fitness.oxygen_saturation.write` |\n| `https://www.googleapis.com/auth/fitness.body_temperature.read` |\n| `https://www.googleapis.com/auth/fitness.body_temperature.write` |\n| `https://www.googleapis.com/auth/fitness.reproductive_health.read` |\n| `https://www.googleapis.com/auth/fitness.reproductive_health.write` |\n\nFor more information, see the [authentication and authorization](/fit/rest/v1/authorization) page.\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a [Users.dataSources.datasets resource](/fit/rest/v1/reference/users/dataSources/datasets#resource) in the response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]