Overview
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 street team membership information.
Core Types
Generally speaking, each node of the Health Graph belongs to one of seven 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.BackgroundActivity+json |
A background activity measurement |
application/vnd.com.runkeeper.Sleep+json |
A sleep measurement |
application/vnd.com.runkeeper.Nutrition+json |
A nutrition measurement |
application/vnd.com.runkeeper.Weight+json |
A weight measurement |
application/vnd.com.runkeeper.GeneralMeasurement+json |
A general body measurement |
application/vnd.com.runkeeper.DiabetesMeasurement+json |
A diabetes measurement |
Each of these nodes contains complete information for an activity/measurement 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 member of a user's street team who shares such information, each node contains a link to the nodes nearest in time for that member.
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 street team membership information for use on runkeeper.com.
Rate Limits
To help ensure the availability of the HealthGraph API, access to some resources are rate-limited. These limits are indicated in the documentation for each resource. If a request for a resource exceeds the rate limit, the request will return a 403 Forbidden response.