The Health Graph captures a user's fitness activities and health measurements over time. Each activity and measurement is a time-stamped node, and each node is linked to those other nodes closest in time. Devices can add new nodes to the graph by submitting health measurements; applications can follow the links in the graph from node to node to extract a user's progress towards his or her fitness goals.

The Health Graph API presents the Health Graph as a collection of Web-based resources, one for each node of the graph. The Health Graph API also makes available resources that enable quick navigation of the Health Graph, as well as provide access to a user's profile, sharing and display settings, and friend information.

Core Types

Generally speaking, each node of the Health Graph belongs to one of eight JSON-based core types. The core types are:

Media Type Description
application/vnd.com.runkeeper.FitnessActivity+json A completed fitness activity
application/vnd.com.runkeeper.StrengthTrainingActivity+json A completed strength training activity
application/vnd.com.runkeeper.BackgroundActivitySet+json A background activity measurement set
application/vnd.com.runkeeper.SleepSet+json A sleep measurement set
application/vnd.com.runkeeper.NutritionSet+json A nutrition measurement set
application/vnd.com.runkeeper.WeightSet+json A weight measurement set
application/vnd.com.runkeeper.GeneralMeasurementSet+json A general body measurement set
application/vnd.com.runkeeper.DiabetesMeasurementSet+json A diabetes measurement set

Each of these nodes contains complete information for an activity/measurement set for a single user. Each node also contains links to:

  • The previous node of the same core type, in chronological order, for the same user;
  • The next node of the same core type, in chronological order, for the same user; and,
  • Each node of the other core types, for the same user, nearest in time.

Additionally, for each of a user's friends who shares such information, each node contains a link to the nodes nearest in time for that friend.

Feeds and User Information

For quick navigation, the Health Graph API makes available feed resources that provide timestamps and links for up to twenty-five nodes at a time of a given type. The links appear in reverse chronological order, enabling their use as indices into a user's activity and measurement history.

The Health Graph API also provides a resource for each user, with links to feeds for each core type. These resources provide a useful starting point for navigating the Health Graph. They also contain a link to resources that provide profile, sharing and display settings, personal records, and friend information for use on runkeeper.com.