Apple iCloud service actions

Overview

The icloud service in the ricloud API lets clients access realtime, near-time and batch data stored on Apple’s iCloud in a readily consumable feed format.

Batch data is sourced from iOS device iCloud backups, with realtime data coming from a variety of sources. In some cases, data of the same type is available from multiple sources.

Note

The ricloud API is licensed subject to Reincubate’s position on privacy and data. Most notably, commercial licenses are only made available for transparent, consent-based, or otherwise legal applications.

The API provides specialised feeds JSON data. In many cases, the data is stored in highly proprietary formats, subject to regular change and often encrypted. The ricloud handles decryption and parsing of this data automatically, so that no app- or iCloud-specific knowledge is required to work with the data.

All results from these service actions are output in the JSON format, and consistent formats are used for similar datatypes. For instance, data from messaging apps is always structured in the same way.

Realtime and near-time iOS / iCloud data

The Apple iCloud realtime service lets users access the contents of their iCloud accounts. Numerous Apple and third-party apps for iOS and macOS devices periodically synchronise data and files with the iCloud in realtime or near-time.

Realtime and near-time feed modules include:

Batch data from iOS device backups

Most of the non-realtime data from the icloud service is obtained from iCloud backups of iOS devices. iCloud-associated iPhones and other iOS devices will periodically send incremental or full device backups when connected to a wifi network and charging. Apple provide more information on this in HT203977.

The ricloud API enables an authenticated user to download part – or the entirety – of an iCloud backup, and to extract files and metadata from it. Batch data feed modules include:

End-user trial module

An end-user trial module is available for client use. This can be used to return a “teaser” of data to potential end-users. The module provides a feed of the last five messages along with a last location and a summary count of other available messages. Using this mechanism can be more cost-effective than using a full key for end-user trials.

Analytics and reporting

The ricloud‘s iCloud service provides a number of additional features around analytics and reporting.

Two modules are available for enterprises: basic app usage, which shows which apps were used on an iOS device within a given day, and advanced app usage, which provides further information including number of sessions, duration of sessions, and so on. More information on these modules is available on request.

Forensics and recovery

Forensic undeletion and recovery functionality is available for a number of modules as indicated below, including the Messages (SMS, MMS and iMessage) and iCloud Photo Library modules.

Reincubate have a number of custom forensic tools which can be applied on request to other modules, including WhatsApp and WeChat.

Feed modules

Location

Realtime location data is presented under the following key.

Source Feed module key
Realtime and near-time iOS / iCloud data location
{ "location": [{
    "model_raw_name": "iPhone8,2",
    "name": "John's Mac Mini",
    "battery": {
      "low_power_mode": false,
      "battery_level": 0.0,
      "battery_status": "Unknown"
    },
    "fmip_id": "aTJHznls94JTroGs/DxdC9Uy2RtdFbfg981la5Y1VjydBwaduPrTwQ==",
    "model_display_name": "Mac mini",
    "location": {
      "altitude": 0.0,
      "longitude": -0.09058943950483185,
      "latitude": 51.51440460583699,
      "date_created": "2017-07-31T11:47:01.883000",
      "positioning_type": "Wifi",
      "accuracy": {
        "horizontal": 65.0,
        "vertical": 0.0
      }
    },
    "model": "iPhone8,2",
    "identifier": "aTJHznls94JTroGs/DxdC9Uy2RtdFbfg981la5Y1VjydBwaduPrTwQ=="
  }]
}

If location data is temporarily unavailable for a device, the location key will contain a null value. This indicates that Apple has no current location information, but the field will be populated with data as soon as the device starts reporting again.

Realtime enumeration of iCloud account devices

Devices associated with the iCloud account are presented under following key.

Source Feed module key
Realtime and near-time iOS / iCloud data web_devices
{ "web_devices": [{
    "name": "Dave's iPhone SE White",
    "os_version": "iOS;9.3.2",
    "imei": "\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf12345",
    "model": "iPhone8,4",
    "latest_backup": null,
    "model_name": "iPhone SE",
    "serial": "\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cfAAAA"
  }, {
    "name": "Greg\u2019s iPhone",
    "os_version": "iOS;10.1.1",
    "imei": "\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf12345",
    "model": "iPhone8,1",
    "latest_backup": null,
    "model_name": "iPhone 6s",
    "serial": "\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cfBBBBB"
  }, {
    "name": "Gregs\u2019s MacBook Pro",
    "os_version": "OSX;10.11.6",
    "imei": null,
    "model": "MacBookPro12,1",
    "latest_backup": null,
    "model_name": "MacBook Pro 13\"",
    "serial": "\u25cf\u25cf\u25cf\u25cf\u25cf\u25cf\u25cfCCCCC"
  }]
}

Messages (and third-party messaging apps)

The API uses a consistent format for message data from Apple’s Messages app and other third-party messaging apps.

A number of feed modules are available for different messaging apps.

Source App Feed module key
Batch data from iOS device backups Messages (SMS, MMS and iMessage) sms
Batch data from iOS device backups WhatsApp whatsapp_messages
Batch data from iOS device backups Skype skype_messages
Batch data from iOS device backups LINE line_messages
Batch data from iOS device backups Kik kik_messages
Batch data from iOS device backups Viber viber_messages
Batch data from iOS device backups Facebook Messenger facebook_messages
Batch data from iOS device backups WeChat wechat_messages

Messaging apps will return data as an array of messaging objects each containing the following keys:

  • id The ID of the message. This field is internal to the messaging app, unique only in the context of that app, and may not be an integer. Deleted messages do not have unique IDs, as the field is set is -1 for those records.
  • conversation_id The ID of the messaging thread. Like id this is internal and may not be an integer. For iOS messaging, this may be set by the sender (for instance, vodafone, or it may be arbitrary, like chat1122932342342.
  • date The date that the message was sent or received. For instance, 2015-10-28 09:18:17.000000.
  • text The body of the message. This can be a string or null.
  • from_me A boolean value to indicate whether the message was sent or received.
  • user (Optional.) The user of the messaging app in the case where multiple users/accounts may be using a messaging app from the device.
  • type (Optional.) Types include SMS, iMessage.
  • deleted (Optional.) A boolean value to indicate whether the message had been deleted.
  • handle The 2nd party of the conversation, this may be the group name.
  • contact (Optional.) An object referencing an iOS contact of the 2nd party of the conversation.
  • group (Optional.) The name of the group at the time the message was sent.
  • group_id (Optional.) The unique identifier for the group within the context of that app. This may not be an integer, and if present, only provides information in addition to conversation_id.
  • group_handles This value is null for person-to-person messages, and in group conversations is an array of strings representing phone numbers or iMessage email addresses.
  • group_contacts (Optional.) An array of objects referencing iOS contacts in the group.
  • attachments An array of file_id values which can be used with the download_file method. If the message includes no attachment, an empty array is returned.

Note

Deleted messages will only appear for customers with the undeletion module active on their key.

Warning

There are some caveats around use of Facebook Messenger, Skype and Snapchat data; please contact the enterprise team to learn more.

An example JSON response containing a single message is shown below.

{ "sms": [{
    "group_handles": [
      "+441234567890",
      "renate@reincubate.com"
    ],
    "attachments": [],
    "deleted": false,
    "text": "Don't forget. Get a \u00a35 Bonus Credit to use for 7 days when you top up by \u00a310 or more in one go by 29/10/15. Your Bonus Credit will usually be added to your balance within 24hrs of your top up. Terms apply. To stop SMS text STOP to 9774.",
    "conversation_id": "vodafone",
    "from_me": false,
    "date": "2015-10-28 09:18:17.000000",
    "handle": "vodafone",
    "type": "SMS",
    "id": 6
  }]
}

Photos and videos

iCloud Photo Library, Photo Stream and device Photos data is presented with the following feed module keys.

Source Feed module key
Batch data from iOS device backups photos
Realtime and near-time iOS / iCloud data web_photos
{ "photos": [{
    "filename": "IMG_0003.JPG",
    "last_modified": "2016-09-16 11:55:15.000000",
    "file_path": "Media/DCIM/100APPLE/IMG_0003.JPG",
    "file_id": "d27997f2fbefc0ad9027c9b91239154266859e53"
  }]
}
{ "web_photos": [{
    "filename": "IMG_0006.JPG",
    "file_id": 1,
    "size": 1878590
  }]
}

Note

If an iOS device has the iCloud Photo Library enabled with the “optimise storage” setting, it may not save all of its photos on the device. Consequently they may not all be available through the backup photos module. The realtime module will be able to get the data.

Safari browser history

Safari browser history is presented using the following keys, with example JSON shown below.

Source Feed module key
Batch data from iOS device backups browser_history
Realtime and near-time iOS / iCloud data web_browser_history
{ "browser_history": [{
    "url": "http://www.amazon.co.uk/",
    "last_visit": "2015-09-10 10:30:53.413244",
    "title": "Amazon.co.uk: Low Prices in Electronics, Books, Sports Equipment & more"
  }]
}

Safari browser cookies

Details of the Safari browser cookies module available on request.

Call history

Call history from the iPhone phone application (mobile / cell and FaceTime Audio), and from third-party voice apps is available under the following modules. The realtime module below includes call histories from all CallKit-compliant apps, including Skype and WhatsApp.

Source Feed module key
Batch data from iOS device backups call_history
Batch data from iOS device backups whatsapp_call_history
Batch data from iOS device backups viber_call_history
Realtime and near-time iOS / iCloud data live_call_history
{ "call_history": [{
    "duration": 5.0,
    "answered": false,
    "from_me": true,
    "date": "2015-07-20 10:23:27.538011",
    "address": "07123456789",
    "call_type": "Phone"
  }]
}

Contacts

Contact and address book data is presented using the following keys.

Source Feed module key
Batch data from iOS device backups contacts
Realtime and near-time iOS / iCloud data web_contacts
{ "contacts": [{
    "records": [{
      "type": "Phone",
      "value": "1-800-MY-APPLE"
    }, {
      "type": "URL",
      "value": "http://www.apple.com"
    }],
    "first_name": "John",
    "last_name": "Appleseed",
    "organisation": null,
    "modified": "2015-09-14 11:59:17.000000",
    "created": "2015-09-14 11:59:10.000000",
    "id": 17
  }]
}

Installed apps

Installed apps data from iCloud device backups is presented as in the example below.

Source Feed module key
Batch data from iOS device backups installed_apps
{ "installed_apps": [{
    "name": "FaceTime",
    "description": "FaceTime for Mac makes it easy to talk, smile and laugh with friends and family on their iPhone 4, iPad 2, iPod touch or Mac.",
    "advisory-rating": "4+",
    "author": "Apple",
    "store_url": "https://itunes.apple.com/us/app/facetime/id414307850?mt=12&uo=4",
    "artwork_url": "http://is5.mzstatic.com/image/thumb/Purple4/v4/3a/7c/e5/3a7ce5a9-3e6e-e735-0299-150923793646/source.icns/100x100bb.png"
  }]
}

Calendar

Calendar data from the iCloud is present as in the example below.

Source Feed module key
Batch data from iOS device backups calendar_appointments
Realtime and near-time iOS / iCloud data realtime_calendar_appointments
{ "calendar_appointments": [{
    "attached_url": null,
    "attendees": null,
    "description": null,
    "end_date": "2014-08-15 14:30:00.000000",
    "start_time_zone": "Europe/London",
    "all_day": false,
    "summary": "Another appointment",
    "recurrence": {
      "specifier": "",
      "repeat": "Weekly",
      "interval": 1,
      "repeat_end_date": null
    },
    "travel_time": null,
    "id": 73,
    "location": null,
    "end_time_zone": "Europe/London",
    "start_location": null,
    "calendar": "Work",
    "creation_date": "2014-08-22 13:23:20.000000",
    "start_date": "2014-08-15 13:30:00.000000"
  }]
}

Raw file enumeration

File list data from iCloud device backups is presented as in the example below.

Source Feed module key
Batch data from iOS device backups file_list
{ "file_list": [{
    "file_id": "37194cdd973ff73e0d9547eb23b8d93510cbdeea",
    "filename": "IconState.plist"
  }]
}

iCloud Drive

Details of the iCloud Drive module available on request.

Notes

Notes data from the Apple Notes app is presented as in the example below. There are a number of module keys depending on the source of the data.

Source Feed module key
Batch data from iOS device backups notes
Realtime and near-time iOS / iCloud data realtime_notes
{ "notes": [{
    "creation_date": "2016-06-06 13:23:20.000000",
    "last_modified": "2016-06-07 15:21:25.000000",
    "title": "Monday meeting:",
    "note": "Monday meeting:\n Discuss X,\n discuss Y.",
    "summary": null,
    "attachments":  [{
      "type": "image",
      "file_id": "8e22cf6e524357b4eb3da775d193072ebba9543f",
      "file_path": "Media/80DDDEAD-B33F-37B2-7219432C0359/Image.jpeg",
    }],
    "folder": "icloud",
    "sub_folder": "work",
  }]
}

HealthKit steps

HealthKit step data is available using the module key as shown below. Please see the Apple HealthKit API reference for more details on HealthKit.

{ "healthkit_steps": [{
    "end_date": "2016-07-04 18:12:09.000000",
    "data_type": "Steps",
    "value": 8.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-07-04 18:11:54.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:18:00.000000",
    "data_type": "Steps",
    "value": 24.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 7,
    "start_date": "2016-08-25 09:18:00.000000",
    "sample_type": "quantity_sample"
  }]
}

HealthKit

HealthKit data is available using the module key as shown below.

Source Feed module key
Batch data from iOS device backups healthkit

Please see the Apple HealthKit API reference for more details.

HealthKit data is comprised of many possible parameters identified by data_type_id key in the results. Possible values include:

'0': 'Body Mass Index',
'1': 'Body Fat Percentage',
'2': 'Height',
'3': 'Weight',
'4': 'Lean Body Mass',
'5': 'Heart Rate',
'7': 'Steps',
'8': 'Walking + Running Distance',
'9': 'Resting Energy',
'10': 'Active Energy',
'12': 'Flights Climbed',
'14': 'Oxygen Saturation',
'15': 'Blood Glucose',
'16': 'Systolic Blood Pressure',
'17': 'Diastolic Blood Pressure',
'18': 'Blood Alcohol Content',
'19': 'Peripheral Perfusion Index',
'20': 'Total Fat',
'21': 'Polyunsaturated Fat',
'22': 'Monounsaturated Fat',
'23': 'Saturated Fat',
'24': 'Dietary Cholesterol',
'25': 'Sodium',
'26': 'Carbohydrates',
'27': 'Fibre',
'28': 'Dietary Sugar',
'29': 'Dietary Energy',
'30': 'Protein',
'31': 'Vitamin A',
'32': 'Vitamin B6',
'33': 'Vitamin B12',
'34': 'Vitamin C',
'35': 'Vitamin D',
'36': 'Vitamin E',
'37': 'Vitamin K',
'38': 'Calcium',
'39': 'Iron',
'40': 'Thiamine',
'41': 'Riboflavin',
'42': 'Niacin',
'43': 'Folate',
'44': 'Biotin',
'45': 'Pantothenic Acid',
'46': 'Phosphorous',
'47': 'Iodine',
'48': 'Magnesium',
'49': 'Zinc',
'50': 'Selenium',
'51': 'Copper',
'52': 'Manganese',
'53': 'Chromium',
'54': 'Molybdenum',
'55': 'Chloride',
'56': 'Potassium',
'57': 'Number of Times Fallen',
'58': 'Electrodermal Activity',
'60': 'Inhaler Usage',
'61': 'Respiratory Rate',
'62': 'Body Temperature',
'63': 'Sleep Analysis',
'71': 'Forced Vital Capacity',
'72': 'Forced Expiration Volume, 1 sec',
'73': 'Peak Expiratory Flow Rate',
'78': 'Caffeine',
'79': 'Workout',
'80': 'Blood Pressure Correlation',
'83': 'Cycling Distance',
'87': 'Water',
'89': 'UV Index',
'90': 'Basal Body Temperature',
'91': 'Cervical Mucus Quality',
'92': 'Ovulation Test Results',
'95': 'Menstruation',
'96': 'Spotting',
'97': 'Sexual Activity',

The results will be in the following form:

{ "healthkit": [{
    "weight": 95.2543977,
    "gender": "Female",
    "fitzpatrick_skin_type": "Type V",
    "date_of_birth": "1988-08-22 23:00:00.000000",
    "height": 1.9812,
    "blood_type": "O+"
  }, {
    "end_date": "2016-07-04 18:12:09.000000",
    "data_type": "Walking + Running Distance",
    "value": 6.08,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-07-04 18:11:54.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-07-04 18:12:09.000000",
    "data_type": "Steps",
    "value": 8.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-07-04 18:11:54.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 16:24:00.000000",
    "data_type": "Caffeine",
    "value": 800.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 78,
    "start_date": "2016-08-23 16:24:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 16:24:00.000000",
    "data_type": "Fibre",
    "value": 5.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 27,
    "start_date": "2016-08-23 16:24:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 16:24:00.000000",
    "data_type": "Basal Body Temperature",
    "value": 2.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 90,
    "start_date": "2016-08-23 16:24:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 17:30:00.000000",
    "data_type": "Weight",
    "value": 69.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 3,
    "start_date": "2016-08-23 17:30:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 17:31:00.000000",
    "data_type": "Height",
    "value": 220.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 2,
    "start_date": "2016-08-23 17:31:00.000000",
    "unit": "cm",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 17:31:00.000000",
    "data_type": "Body Fat Percentage",
    "value": 0.18,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 1,
    "start_date": "2016-08-23 17:31:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:13:00.000000",
    "data_type": "Body Mass Index",
    "value": 14.26,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 0,
    "start_date": "2016-08-25 09:13:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:14:00.000000",
    "data_type": "Lean Body Mass",
    "value": 19.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 4,
    "start_date": "2016-08-25 09:14:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:15:00.000000",
    "data_type": "Active Energy",
    "value": 20.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 10,
    "start_date": "2016-08-25 09:15:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:15:00.000000",
    "data_type": "Cycling Distance",
    "value": 21.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 83,
    "start_date": "2016-08-25 09:15:00.000000",
    "unit": "km",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:16:00.000000",
    "data_type": "Flights Climbed",
    "value": 22.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 12,
    "start_date": "2016-08-25 09:16:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:17:00.000000",
    "data_type": "Resting Energy",
    "value": 23.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 9,
    "start_date": "2016-08-25 09:17:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:18:00.000000",
    "data_type": "Steps",
    "value": 24.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 7,
    "start_date": "2016-08-25 09:18:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:18:00.000000",
    "data_type": "Walking + Running Distance",
    "value": 25.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 8,
    "start_date": "2016-08-25 09:18:00.000000",
    "unit": "km",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:19:00.000000",
    "data_type": "Active Energy",
    "value": 26.0,
    "additional_data": null,
    "data_type_id": 10,
    "start_date": "2016-08-25 09:19:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:19:00.000000",
    "data_type": "Walking + Running Distance",
    "value": 27.0,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-08-25 09:19:00.000000",
    "unit": "km",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:25:00.000000",
    "data_type": "Biotin",
    "value": 28.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 44,
    "start_date": "2016-08-25 09:25:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:25:00.000000",
    "data_type": "Calcium",
    "value": 29.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 38,
    "start_date": "2016-08-25 09:25:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:26:00.000000",
    "data_type": "Carbohydrates",
    "value": 30.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 26,
    "start_date": "2016-08-25 09:26:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:26:00.000000",
    "data_type": "Chloride",
    "value": 31.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 55,
    "start_date": "2016-08-25 09:26:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:27:00.000000",
    "data_type": "Chromium",
    "value": 32.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 53,
    "start_date": "2016-08-25 09:27:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:27:00.000000",
    "data_type": "Copper",
    "value": 33.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 51,
    "start_date": "2016-08-25 09:27:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:27:00.000000",
    "data_type": "Dietary Cholesterol",
    "value": 34.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 24,
    "start_date": "2016-08-25 09:27:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:27:00.000000",
    "data_type": "Dietary Energy",
    "value": 35.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 29,
    "start_date": "2016-08-25 09:27:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:28:00.000000",
    "data_type": "Dietary Sugar",
    "value": 36.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 28,
    "start_date": "2016-08-25 09:28:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:28:00.000000",
    "data_type": "Fibre",
    "value": 37.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 27,
    "start_date": "2016-08-25 09:28:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:28:00.000000",
    "data_type": "Folate",
    "value": 38.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 43,
    "start_date": "2016-08-25 09:28:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:29:00.000000",
    "data_type": "Iodine",
    "value": 39.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 47,
    "start_date": "2016-08-25 09:29:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:29:00.000000",
    "data_type": "Iron",
    "value": 40.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 39,
    "start_date": "2016-08-25 09:29:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:29:00.000000",
    "data_type": "Magnesium",
    "value": 41.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 48,
    "start_date": "2016-08-25 09:29:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:29:00.000000",
    "data_type": "Manganese",
    "value": 42.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 52,
    "start_date": "2016-08-25 09:29:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:30:00.000000",
    "data_type": "Molybdenum",
    "value": 43.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 54,
    "start_date": "2016-08-25 09:30:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:30:00.000000",
    "data_type": "Monounsaturated Fat",
    "value": 44.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 22,
    "start_date": "2016-08-25 09:30:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:30:00.000000",
    "data_type": "Niacin",
    "value": 45.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 42,
    "start_date": "2016-08-25 09:30:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:31:00.000000",
    "data_type": "Pantothenic Acid",
    "value": 46.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 45,
    "start_date": "2016-08-25 09:31:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:31:00.000000",
    "data_type": "Phosphorous",
    "value": 47.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 46,
    "start_date": "2016-08-25 09:31:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:32:00.000000",
    "data_type": "Polyunsaturated Fat",
    "value": 48.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 21,
    "start_date": "2016-08-25 09:32:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:32:00.000000",
    "data_type": "Potassium",
    "value": 49.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 56,
    "start_date": "2016-08-25 09:32:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:32:00.000000",
    "data_type": "Protein",
    "value": 50.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 30,
    "start_date": "2016-08-25 09:32:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:33:00.000000",
    "data_type": "Riboflavin",
    "value": 51.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 41,
    "start_date": "2016-08-25 09:33:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:33:00.000000",
    "data_type": "Saturated Fat",
    "value": 52.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 23,
    "start_date": "2016-08-25 09:33:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:33:00.000000",
    "data_type": "Selenium",
    "value": 53.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 50,
    "start_date": "2016-08-25 09:33:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:33:00.000000",
    "data_type": "Sodium",
    "value": 54.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 25,
    "start_date": "2016-08-25 09:33:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:34:00.000000",
    "data_type": "Thiamine",
    "value": 55.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 40,
    "start_date": "2016-08-25 09:34:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:34:00.000000",
    "data_type": "Total Fat",
    "value": 56.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 20,
    "start_date": "2016-08-25 09:34:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:34:00.000000",
    "data_type": "Vitamin A",
    "value": 57.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 31,
    "start_date": "2016-08-25 09:34:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:34:00.000000",
    "data_type": "Vitamin B6",
    "value": 58.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 32,
    "start_date": "2016-08-25 09:34:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:35:00.000000",
    "data_type": "Vitamin B12",
    "value": 59.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 33,
    "start_date": "2016-08-25 09:35:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:35:00.000000",
    "data_type": "Vitamin C",
    "value": 60.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 34,
    "start_date": "2016-08-25 09:35:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:35:00.000000",
    "data_type": "Vitamin D",
    "value": 61.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 35,
    "start_date": "2016-08-25 09:35:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:36:00.000000",
    "data_type": "Vitamin E",
    "value": 62.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 36,
    "start_date": "2016-08-25 09:36:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:36:00.000000",
    "data_type": "Vitamin K",
    "value": 63.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 37,
    "start_date": "2016-08-25 09:36:00.000000",
    "unit": "mcg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:36:00.000000",
    "data_type": "Water",
    "value": 64.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 87,
    "start_date": "2016-08-25 09:36:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:37:00.000000",
    "data_type": "Zinc",
    "value": 65.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 49,
    "start_date": "2016-08-25 09:37:00.000000",
    "unit": "mg",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:44:00.000000",
    "data_type": "Blood Alcohol Content",
    "value": 0.66,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 18,
    "start_date": "2016-08-25 09:44:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:45:00.000000",
    "data_type": "Blood Glucose",
    "value": 5.999999999999999,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 15,
    "start_date": "2016-08-25 09:45:00.000000",
    "unit": "mmol<180.1558800000541>/L",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:46:00.000000",
    "data_type": "Electrodermal Activity",
    "value": 67.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 58,
    "start_date": "2016-08-25 09:46:00.000000",
    "unit": "mcS",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:46:00.000000",
    "data_type": "Forced Expiration Volume, 1 sec",
    "value": 68.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 72,
    "start_date": "2016-08-25 09:46:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:47:00.000000",
    "data_type": "Forced Vital Capacity",
    "value": 70.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 71,
    "start_date": "2016-08-25 09:47:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:47:00.000000",
    "data_type": "Inhaler Usage",
    "value": 71.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 60,
    "start_date": "2016-08-25 09:47:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:47:00.000000",
    "data_type": "Number of Times Fallen",
    "value": 72.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 57,
    "start_date": "2016-08-25 09:47:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:50:00.000000",
    "data_type": "Peak Expiratory Flow Rate",
    "value": 74.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 73,
    "start_date": "2016-08-25 09:50:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:50:00.000000",
    "data_type": "Oxygen Saturation",
    "value": 0.73,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 14,
    "start_date": "2016-08-25 09:50:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:51:00.000000",
    "data_type": "Peripheral Perfusion Index",
    "value": 0.75,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 19,
    "start_date": "2016-08-25 09:51:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:52:00.000000",
    "data_type": "UV Index",
    "value": 76.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 89,
    "start_date": "2016-08-25 09:52:00.000000",
    "unit": "count",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:54:00.000000",
    "data_type": "Diastolic Blood Pressure",
    "value": 78.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 17,
    "start_date": "2016-08-25 09:54:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:54:00.000000",
    "data_type": "Systolic Blood Pressure",
    "value": 77.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 16,
    "start_date": "2016-08-25 09:54:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:54:00.000000",
    "data_type": "Body Temperature",
    "value": 79.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 62,
    "start_date": "2016-08-25 09:54:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:55:00.000000",
    "data_type": "Heart Rate",
    "value": 80.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 5,
    "start_date": "2016-08-25 09:55:00.000000",
    "unit": "count/min",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 09:55:00.000000",
    "data_type": "Respiratory Rate",
    "value": 81.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 61,
    "start_date": "2016-08-25 09:55:00.000000",
    "unit": "count/min",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 12:03:00.000000",
    "data_type": "Height",
    "value": 6.5,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 2,
    "start_date": "2016-08-25 12:03:00.000000",
    "unit": "ft",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-25 12:04:00.000000",
    "data_type": "Weight",
    "value": 15.000000000000002,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 3,
    "start_date": "2016-08-25 12:04:00.000000",
    "unit": "st",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-09-23 16:01:42.000000",
    "data_type": "Walking + Running Distance",
    "value": 10.790000000000001,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-09-23 16:01:21.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-09-23 16:01:42.000000",
    "data_type": "Steps",
    "value": 15.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-09-23 16:01:21.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-10 15:12:00.000000",
    "data_type": "Steps",
    "value": 300.0,
    "additional_data": "HKWasUserEntered",
    "data_type_id": 7,
    "start_date": "2016-10-10 15:12:00.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-11 18:13:25.000000",
    "data_type": "Steps",
    "value": 11.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-10-11 18:13:20.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-11 18:13:25.000000",
    "data_type": "Walking + Running Distance",
    "value": 8.79,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-10-11 18:13:20.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-24 13:58:45.000000",
    "data_type": "Walking + Running Distance",
    "value": 7.9999999999999964,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-10-24 13:52:45.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-24 13:59:42.000000",
    "data_type": "Walking + Running Distance",
    "value": 17.11,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-10-24 13:58:45.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-24 13:58:45.000000",
    "data_type": "Steps",
    "value": 8.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-10-24 13:52:45.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-24 13:59:42.000000",
    "data_type": "Steps",
    "value": 24.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-10-24 13:58:45.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-25 08:33:47.000000",
    "data_type": "Steps",
    "value": 8.0,
    "additional_data": null,
    "data_type_id": 7,
    "start_date": "2016-10-25 08:27:47.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-10-25 08:33:47.000000",
    "data_type": "Walking + Running Distance",
    "value": 4.960000000000001,
    "additional_data": null,
    "data_type_id": 8,
    "start_date": "2016-10-25 08:27:47.000000",
    "sample_type": "quantity_sample"
  }, {
    "end_date": "2016-08-23 16:24:00.000000",
    "data_type": "Cervical Mucus Quality",
    "value": "Watery",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 91,
    "start_date": "2016-08-23 16:24:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:41:00.000000",
    "data_type": "Menstruation",
    "value": "Light",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 95,
    "start_date": "2016-08-25 09:41:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:41:00.000000",
    "data_type": "Menstruation",
    "value": "Light",
    "additional_data": "HKMenstrualCycleStart",
    "data_type_id": 95,
    "start_date": "2016-08-25 09:41:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:41:00.000000",
    "data_type": "Ovulation Test Results",
    "value": "Indeterminate",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 92,
    "start_date": "2016-08-25 09:41:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:44:00.000000",
    "data_type": "Sexual Activity",
    "value": "Sexual Activity",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 97,
    "start_date": "2016-08-25 09:44:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:44:00.000000",
    "data_type": "Sexual Activity",
    "value": "Sexual Activity",
    "additional_data": "HKSexualActivityProtectionUsed",
    "data_type_id": 97,
    "start_date": "2016-08-25 09:44:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:44:00.000000",
    "data_type": "Spotting",
    "value": "Spotting",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 96,
    "start_date": "2016-08-25 09:44:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:52:00.000000",
    "data_type": "Sleep Analysis",
    "value": "Asleep",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 63,
    "start_date": "2016-08-25 09:52:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 09:06:00.000000",
    "data_type": "Sleep Analysis",
    "value": "In Bed",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 63,
    "start_date": "2016-08-25 09:06:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 11:53:00.000000",
    "data_type": "Menstruation",
    "value": "Heavy",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 95,
    "start_date": "2016-08-25 11:53:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 11:53:00.000000",
    "data_type": "Menstruation",
    "value": "Heavy",
    "additional_data": "HKMenstrualCycleStart",
    "data_type_id": 95,
    "start_date": "2016-08-25 11:53:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 11:56:00.000000",
    "data_type": "Sexual Activity",
    "value": "Sexual Activity",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 97,
    "start_date": "2016-08-25 11:56:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-08-25 15:33:00.000000",
    "data_type": "Ovulation Test Results",
    "value": "Negative",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 92,
    "start_date": "2016-08-25 15:33:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:20:00.000000",
    "data_type": "Menstruation",
    "value": "Medium",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:20:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:20:00.000000",
    "data_type": "Menstruation",
    "value": "Medium",
    "additional_data": "HKMenstrualCycleStart",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:20:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:24:00.000000",
    "data_type": "Menstruation",
    "value": "Unspecified",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:24:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:24:00.000000",
    "data_type": "Menstruation",
    "value": "Unspecified",
    "additional_data": "HKMenstrualCycleStart",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:24:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:24:00.000000",
    "data_type": "Menstruation",
    "value": "Unspecified",
    "additional_data": "HKWasUserEntered",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:24:00.000000",
    "sample_type": "category_sample"
  }, {
    "end_date": "2016-10-10 13:24:00.000000",
    "data_type": "Menstruation",
    "value": "Unspecified",
    "additional_data": "HKMenstrualCycleStart",
    "data_type_id": 95,
    "start_date": "2016-10-10 13:24:00.000000",
    "sample_type": "category_sample"
  }]
}