Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query HealthKit data via REST API

Tags:

healthkit

Is it possible to get data from Healthkit the same way as you would query regular API (With user's consent) to store in my webapp?

Something like: healthkit.com/api/v1/user/GetWeight

If yes, where can I find a list of available methods? If not, are there any workarounds?

like image 422
user194076 Avatar asked May 01 '15 10:05

user194076


People also ask

Is HealthKit an API?

HealthKit is a framework with an API that allows displaying the health data collected by apps and wearables that are connected to Health. In the same fashion, developers should design consent forms to ask users to share their data collected in the Health app or through Apple Watch via HealthKit.

Can we access Apple Watch tracking data through a Web REST API?

As for your web app counterpart, you can use transport mechanisms like URLSession and perhaps CloudKit. So basically without an iOS app its not possible to get data from apple watch. Data flow is like device -> your iOS app -> your webApp .

Where is HealthKit data stored?

This data is stored in Data Protection class Protected Unless Open. Access to the data is relinquished 10 minutes after device locks, and data becomes accessible the next time user enters their passcode or uses Touch ID or Face ID to unlock the device.


1 Answers

You'll have to build:

  • your own REST API service to store and retrieve the desired data;
  • an iOS app that accesses the data on-device using the HealthKit SDK and POSTs it to your API.

Neither step is trivial. Good luck!

like image 101
candu Avatar answered Nov 04 '22 22:11

candu