Google 피트니스 REST API를 비롯한 Google 피트니스 API는 2026년에 지원 중단될 예정입니다. 2024년 5월 1일부터 개발자는 이러한 API를 사용하도록 가입할 수 없습니다.
이전할 API 또는 플랫폼에 관한 안내는 헬스 커넥트 이전 가이드를 참고하세요. 헬스 커넥트와 Google Fit API 및 Fitbit Web API를 비교하려면 헬스 커넥트 비교 가이드를 참고하세요.
헬스 커넥트 및 API와 통합하는 방법을 자세히 알아보세요.
Users.dataSources.datasets: get
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
시작 시간과 종료 시간이 있는 모든 데이터 포인트가 포함된 데이터 세트를 반환합니다.
데이터 세트의 지정된 최소 시작 시간 범위와 겹칩니다.
최대 종료 시간입니다. 특히 시작 시간이 이보다 짧은 모든 데이터 포인트는
데이터 세트 종료 시간과 같거나 종료 시간이 다음보다 크거나 같음
데이터 세트 시작 시간과 같아야 합니다.
지금 사용해 보기
요청
HTTP 요청
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId
매개변수
매개변수 이름 |
값 |
설명 |
경로 매개변수 |
dataSourceId |
string |
데이터 세트를 만든 데이터 소스의 데이터 스트림 ID입니다.
|
datasetId |
string |
최소 데이터 포인트 시작 시간의 복합인 데이터 세트 식별자
최대 데이터 포인트 종료 시간은 에포크로부터 나노초로 표현됩니다.
ID는 'startTime-endTime'와 같은 형식입니다.
여기서 startTime 및 endTime는 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 |
자세한 내용은 인증 및 승인 페이지를 참조하세요.
요청 본문
이 메소드를 사용할 때는 요청 본문을 제공하지 마세요.
사용해 보기
아래의 API 탐색기를 사용하여 실시간 데이터를 대상으로 이 메소드를 호출하고 응답을 확인해 보세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[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."]]