Google 피트니스 REST API를 비롯한 Google 피트니스 API는 2026년에 지원 중단될 예정입니다. 2024년 5월 1일부터 개발자는 이러한 API를 사용하도록 가입할 수 없습니다.
이전할 API 또는 플랫폼에 관한 안내는 헬스 커넥트 이전 가이드를 참고하세요. 헬스 커넥트와 Google Fit API 및 Fitbit Web API를 비교하려면 헬스 커넥트 비교 가이드를 참고하세요.
헬스 커넥트 및 API와 통합하는 방법을 자세히 알아보세요.
데이터 저작자 표시
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google 피트니스의 모든 데이터 포인트에는 연결된 데이터 소스가 있습니다. 데이터 소스에는 데이터를 수집하거나 변환하는 앱이나 기기를 식별하기 위한 정보가 포함됩니다.
REST API를 사용하면 피트니스 데이터를 삽입한 앱을 확인할 수 있습니다.
예를 들어 사용자의 피트니스 기록에서 다양한 데이터를 분석하는 앱은 분석에 포함된 피트니스 세션 목록과 각 세션을 삽입한 앱에 관한 정보를 사용자에게 제공하려고 할 수 있습니다.
REST API를 사용하면 피트니스 저장소에 삽입한 데이터를 애플리케이션과 연결할 수도 있습니다.
데이터를 삽입한 애플리케이션 확인
세션을 삽입한 Android 애플리케이션의 패키지 이름 또는 세션을 삽입한 REST 애플리케이션의 이름을 가져오는 방법은 다음과 같습니다.
- 세션을 가져옵니다.
session.application.packageName
또는 session.application.name
속성을 읽습니다.
Android 애플리케이션의 패키지 이름 또는 데이터 세트를 삽입한 REST 애플리케이션의 이름을 확인하려면 다음 안내를 따르세요.
- 데이터 세트를 검색합니다.
dataset.dataSourceId
속성을 읽어 데이터 소스를 가져옵니다.
dataSources.application.packageName
또는 dataSources.application.name
속성을 읽습니다.
application
속성에는 다음 필드가 포함되어 있습니다.
name
- 애플리케이션의 이름입니다.
packageName
- Android 애플리케이션의 패키지 이름입니다.
detailsUrl
- (선택사항) 애플리케이션에 연결할 URI입니다.
애플리케이션에서 특정 시간 간격 동안 사용 가능한 모든 세션을 나열하면 이 정보를 사용하여 사용자에게 각 세션을 삽입한 앱을 표시할 수 있습니다.
피트니스 스토어에 삽입한 데이터의 출처를 애플리케이션에 표시하려면 다음을 확인하세요.
삽입한 데이터에 액세스하는 애플리케이션은 이 정보를 사용하여 데이터의 출처 표시를 내 애플리케이션에 표시할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eEvery data point in Google Fit is linked to a data source, which identifies the source app or device.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Fit REST API allows you to identify the app that inserted specific fitness data, like sessions or datasets.\u003c/p\u003e\n"],["\u003cp\u003eYou can attribute data you insert into Google Fit to your application by including application details when creating data sources.\u003c/p\u003e\n"],["\u003cp\u003eThis attribution allows other apps to correctly identify your application as the source of the data.\u003c/p\u003e\n"]]],[],null,["# Data Attribution\n\nEvery data point in Google Fit has an associated data source. Data sources contain\ninformation to identify the app or the device that collects or transforms the data.\n\nThe REST API lets you determine which app inserted fitness data.\nFor example, an app that analyzes a variety of data from the user's fitness history may\nwant to present users with the list of fitness sessions included in the analysis, along with\ninformation about which app inserted each session.\n\nThe REST API also lets you associate data that you insert in the fitness store with your\napplication.\n\nDetermine which application inserted data\n-----------------------------------------\n\nTo obtain the package name of the Android application that inserted a session or\nthe name of the REST application that inserted a session:\n\n1. Retrieve the session.\n2. Read the [`session.application.packageName`](/fit/rest/v1/reference/users/sessions/list#session.application.packageName) or [`session.application.name`](/fit/rest/v1/reference/users/sessions/list#session.application.name) property.\n\nTo obtain the package name of the Android application or\nthe name of the REST application that inserted a dataset:\n\n1. Retrieve the dataset.\n2. Retrieve the data source by reading the [`dataset.dataSourceId`](/fit/rest/v1/reference/users/dataSources/datasets#dataSourceId) property.\n3. Read the [`dataSources.application.packageName`](/fit/rest/v1/reference/users/dataSources#application.packageName) or [`dataSources.application.name`](/fit/rest/v1/reference/users/dataSources#application.name) property.\n\nThe `application` property contains these fields:\n\n`name`\n: The name of the application.\n\n`packageName`\n: The package name of the Android application.\n\n`detailsUrl`\n: (Optional) A URI to link to the application.\n\nWhen you list all available sessions for a time interval in your application, you can\nuse this information to show your users which app inserted each session.\n\nProvide information about your application\n------------------------------------------\n\nTo attribute data you insert into the fitness store to your application, ensure that:\n\n- You add your application details to the [`dataSources.application`](/fit/rest/v1/reference/users/dataSources#application) property when creating data sources.\n- You specify the correct [`datasets.dataSourceId`](/fit/rest/v1/reference/users/dataSources/datasets) for your data source when adding points to datasets.\n\nApplications accessing data you inserted can use this information to attribute that data to your\napplication."]]