Google 피트니스 REST API를 비롯한 Google 피트니스 API는 2026년에 지원 중단될 예정입니다. 2024년 5월 1일부터 개발자는 이러한 API를 사용하도록 가입할 수 없습니다.
이전할 API 또는 플랫폼에 관한 안내는 헬스 커넥트 이전 가이드를 참고하세요. 헬스 커넥트와 Google Fit API 및 Fitbit Web API를 비교하려면 헬스 커넥트 비교 가이드를 참고하세요.
헬스 커넥트 및 API와 통합하는 방법을 자세히 알아보세요.
Users.dataSources.datasets: delete
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
시작 시간과 종료 시간이 있는 모든 데이터 포인트를 포괄적으로 삭제합니다.
데이터 세트 ID로 지정된 기간과 겹치는 부분이 있는지 확인합니다. 대부분의 경우
데이터 유형의 경우 전체 데이터 포인트가 삭제됩니다.
기간은 일관된 값을 나타냄 (예:
com.google.activity.segment
), 데이터 포인트 전체
데이터 세트의 한쪽 끝 지점이나 데이터에서 겹치는 부분만
포인트가 삭제됩니다.
지금 사용해보기
요청
HTTP 요청
DELETE 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 만 지원됩니다.
|
승인
이 요청을 처리하려면 다음 범위 중 하나 이상의 승인이 필요합니다.
범위 |
https://www.googleapis.com/auth/fitness.activity.write |
https://www.googleapis.com/auth/fitness.location.write |
https://www.googleapis.com/auth/fitness.body.write |
https://www.googleapis.com/auth/fitness.nutrition.write |
https://www.googleapis.com/auth/fitness.blood_pressure.write |
https://www.googleapis.com/auth/fitness.blood_glucose.write |
https://www.googleapis.com/auth/fitness.oxygen_saturation.write |
https://www.googleapis.com/auth/fitness.body_temperature.write |
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\u003eDeletes all Fitness data points within a specified time range, identified by the \u003ccode\u003edatasetId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor data types with consistent values, only overlapping portions of data points are deleted.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes like \u003ccode\u003ehttps://www.googleapis.com/auth/fitness.activity.write\u003c/code\u003e or similar for other data types.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003eDELETE\u003c/code\u003e request to \u003ccode\u003ehttps://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/datasets/datasetId\u003c/code\u003e with \u003ccode\u003edatasetId\u003c/code\u003e specifying the time range.\u003c/p\u003e\n"],["\u003cp\u003eAn empty response body indicates successful deletion.\u003c/p\u003e\n"]]],[],null,["# Users.dataSources.datasets: delete\n\n| **Note:** Requires [authorization](#auth).\n\nPerforms an inclusive delete of all data points whose start and end times\nhave any overlap with the time range specified by the dataset ID. For most\ndata types, the entire data point will be deleted. For data types where the\ntime span represents a consistent value (such as\n`com.google.activity.segment`), and a data point straddles\neither end point of the dataset, only the overlapping portion of the data\npoint will be deleted.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nDELETE 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` | Delete a dataset for the person identified. Use `me` to indicate the authenticated user. Only `me` is supported at this time. |\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.write` |\n| `https://www.googleapis.com/auth/fitness.location.write` |\n| `https://www.googleapis.com/auth/fitness.body.write` |\n| `https://www.googleapis.com/auth/fitness.nutrition.write` |\n| `https://www.googleapis.com/auth/fitness.blood_pressure.write` |\n| `https://www.googleapis.com/auth/fitness.blood_glucose.write` |\n| `https://www.googleapis.com/auth/fitness.oxygen_saturation.write` |\n| `https://www.googleapis.com/auth/fitness.body_temperature.write` |\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 an empty response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]