Details for oura-api-version2-example.ipynb

Published by gedankenstuecke

Description

An example of how the Oura V2 data looks like

0

Tags & Data Sources

api example Oura Connect

Comments

Please log in to comment.

Notebook
Last updated 2 months ago

Using the data from the Oura V2 API

Some examples of the types of data that is now available through https://oura.openhumans.org.

The V1 integration remains unchanged and the data is stored in oura-data.json as it was before. Additionally there are now a number of new files with data as received from the V2 API, all prefixed oura-v2-.

Updating to V2 API: If you've been using the Oura integration before (authorized Oura before December 1st, 2022) you might have to remove the Oura authorization and reconnect it, in order to authorize the now larger scope of data that can be imported. To do so head to https://oura.openhumans.org, log-in with your Open Humans account and then select disconnect oura account on the dashboard and reconnect it afterwards.

Daily activity data

The daily activity data is similar to the activity data provided by the original V1 API. The file contains a long list of daily activity recordings. Below is a printout of a single data point (the last in your file).

{
  "class_5_min": "11111111111112111111211111111111111111111111111111122221122234333444443223232222222332323233332232333333223322223233",
  "score": 95,
  "active_calories": 250,
  "average_met_minutes": 1.5625,
  "contributors": {
    "meet_daily_targets": 95,
    "move_every_hour": 100,
    "recovery_time": 100,
    "stay_active": 77,
    "training_frequency": 100,
    "training_volume": 100
  },
  "equivalent_walking_distance": 4257,
  "high_activity_met_minutes": 0,
  "high_activity_time": 0,
  "inactivity_alerts": 0,
  "low_activity_met_minutes": 47,
  "low_activity_time": 5700,
  "medium_activity_met_minutes": 157,
  "medium_activity_time": 2160,
  "met": {
    "interval": 60.0,
    "items": [
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      1.1,
      1.2,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      0.9,
      0.9,
      1.4,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      1.1,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      2.6,
      1.2,
      1.2,
      1.2,
      1.3,
      1.3,
      1.2,
      1.2,
      1.2,
      1.2,
      1.2,
      1.2,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      0.9,
      1.1,
      1.0,
      1.0,
      0.9,
      1.0,
      1.1,
      5.0,
      0.9,
      0.9,
      1.1,
      1.2,
      1.2,
      1.2,
      1.2,
      1.3,
      1.2,
      1.7,
      3.2,
      1.4,
      1.9,
      1.9,
      3.6,
      5.6,
      5.2,
      7.4,
      1.9,
      1.2,
      2.6,
      3.4,
      3.6,
      2.0,
      1.6,
      1.9,
      1.7,
      4.6,
      1.7,
      2.1,
      2.1,
      6.5,
      6.6,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.8,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      3.2,
      2.5,
      2.1,
      1.2,
      1.4,
      1.6,
      1.6,
      1.4,
      1.3,
      1.3,
      1.3,
      1.4,
      1.2,
      1.4,
      1.3,
      1.2,
      1.2,
      1.5,
      1.7,
      1.8,
      1.8,
      3.0,
      1.5,
      1.7,
      1.2,
      1.4,
      1.9,
      1.7,
      1.8,
      1.7,
      1.5,
      1.7,
      1.7,
      1.5,
      1.9,
      1.6,
      1.9,
      1.5,
      1.5,
      1.5,
      1.6,
      1.7,
      1.5,
      1.6,
      1.3,
      1.4,
      1.5,
      1.3,
      1.3,
      1.3,
      1.2,
      1.2,
      1.7,
      1.5,
      1.4,
      1.8,
      1.5,
      1.6,
      2.6,
      1.5,
      1.6,
      1.6,
      1.3,
      1.6,
      1.4,
      1.5,
      1.6,
      1.9,
      1.6,
      1.9,
      2.1,
      1.7,
      1.4,
      1.8,
      1.9,
      1.7,
      1.4,
      1.4,
      1.3,
      1.4,
      1.2,
      1.5,
      2.2,
      1.8,
      1.7,
      1.7,
      1.4,
      1.6,
      1.3,
      1.9,
      1.6,
      1.6,
      1.6,
      2.1,
      2.0,
      1.7,
      1.2,
      1.2,
      1.1,
      1.2,
      1.4,
      1.9,
      3.2,
      1.9,
      1.6,
      1.9,
      1.5,
      1.8,
      1.7,
      1.8,
      1.9,
      1.9,
      1.6,
      1.9,
      1.6,
      1.5,
      1.8,
      1.9,
      1.7,
      1.9,
      1.7,
      1.9,
      1.6,
      1.5,
      1.5,
      1.7,
      1.4,
      1.5,
      1.5,
      1.6,
      1.7,
      1.9,
      1.7,
      1.5,
      1.7,
      1.9,
      1.7,
      1.6,
      1.7,
      1.3,
      1.3,
      1.8,
      1.6,
      1.9,
      1.6,
      1.2,
      1.7,
      1.9,
      1.7,
      1.9,
      1.7,
      1.9,
      1.8,
      1.9,
      1.5,
      1.8,
      1.9,
      1.6,
      1.8,
      1.5,
      1.6,
      2.0,
      1.9,
      1.9,
      1.5,
      1.7,
      1.9,
      1.2,
      1.8,
      1.4,
      1.2,
      1.2,
      1.6,
      1.7,
      1.5,
      1.6,
      1.7,
      1.5,
      1.7,
      1.4,
      1.5,
      1.9,
      1.9,
      1.9,
      1.8,
      4.1,
      5.0,
      2.1,
      1.6,
      1.2,
      1.2,
      1.3,
      1.3,
      1.6,
      1.5,
      1.6,
      1.3,
      1.5,
      1.6,
      1.5,
      1.5,
      1.5,
      1.5,
      1.5,
      1.2,
      1.2,
      1.3,
      1.4,
      1.2,
      1.3,
      1.3,
      1.3,
      1.2,
      1.2,
      1.6,
      2.9,
      1.8,
      1.6,
      1.5,
      1.5,
      1.4,
      1.7,
      1.9,
      2.1,
      1.8,
      1.9,
      1.4,
      1.7,
      1.5,
      1.5,
      1.8,
      3.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9
    ],
    "timestamp": "2022-12-01T04:00:00.000+00:00"
  },
  "meters_to_target": 6100,
  "non_wear_time": 0,
  "resting_time": 17400,
  "sedentary_met_minutes": 8,
  "sedentary_time": 9600,
  "steps": 4875,
  "target_calories": 550,
  "target_meters": 11000,
  "total_calories": 2074,
  "day": "2022-12-01",
  "timestamp": "2022-12-01T04:00:00+00:00"
}

Daily sleep & daily readiness

Similarly, the daily readiness records are quite similar to the V1 API records, but now also outline how the different metrics record to the daily score.

The daily sleep record is a lot briefer though, as a lot of the data has been outsourced into a different file, called oura-v2-sleep.json.

daily readiness:
{
  "contributors": {
    "activity_balance": 87,
    "body_temperature": 100,
    "hrv_balance": 88,
    "previous_day_activity": 100,
    "previous_night": 73,
    "recovery_index": 100,
    "resting_heart_rate": 100,
    "sleep_balance": 74
  },
  "day": "2022-12-01",
  "score": 86,
  "temperature_deviation": -0.1,
  "temperature_trend_deviation": 0.06,
  "timestamp": "2022-12-01T00:00:00+00:00"
}
daily sleep:
{
  "contributors": {
    "deep_sleep": 94,
    "efficiency": 79,
    "latency": 67,
    "rem_sleep": 96,
    "restfulness": 77,
    "timing": 47,
    "total_sleep": 72
  },
  "day": "2022-12-01",
  "score": 75,
  "timestamp": "2022-12-01T00:00:00+00:00"
}

Detailed sleep records

The detailed sleep records provide deeper insights, including all nightly heart rate recordings, the movement in 30 second intervals, and the time spent in different sleep phases.

heart rate:
{
  "average_breath": 14.5,
  "average_heart_rate": 61.125,
  "average_hrv": 48,
  "awake_time": 5070,
  "bedtime_end": "2022-12-01T08:51:00+00:00",
  "bedtime_start": "2022-12-01T00:43:00+00:00",
  "day": "2022-12-01",
  "deep_sleep_duration": 4770,
  "efficiency": 83,
  "heart_rate": {
    "interval": 300.0,
    "items": [
      56.0,
      55.0,
      54.0,
      54.0,
      54.0,
      null,
      null,
      null,
      62.0,
      53.0,
      54.0,
      55.0,
      59.0,
      58.0,
      60.0,
      59.0,
      60.0,
      59.0,
      59.0,
      59.0,
      60.0,
      63.0,
      67.0,
      65.0,
      66.0,
      65.0,
      59.0,
      60.0,
      60.0,
      59.0,
      62.0,
      63.0,
      63.0,
      64.0,
      59.0,
      57.0,
      57.0,
      58.0,
      58.0,
      57.0,
      58.0,
      56.0,
      57.0,
      58.0,
      62.0,
      63.0,
      63.0,
      63.0,
      64.0,
      61.0,
      59.0,
      58.0,
      58.0,
      56.0,
      55.0,
      55.0,
      55.0,
      56.0,
      57.0,
      56.0,
      57.0,
      59.0,
      60.0,
      64.0,
      64.0,
      62.0,
      63.0,
      61.0,
      61.0,
      62.0,
      61.0,
      62.0,
      60.0,
      64.0,
      61.0,
      64.0,
      63.0,
      61.0,
      62.0,
      61.0,
      61.0,
      59.0,
      59.0,
      58.0,
      62.0,
      60.0,
      60.0,
      59.0,
      62.0,
      59.0,
      63.0,
      57.0,
      58.0,
      58.0,
      57.0,
      60.0,
      59.0,
      57.0
    ],
    "timestamp": "2022-12-01T00:43:00.000+00:00"
  },
  "hrv": {
    "interval": 300.0,
    "items": [
      40.0,
      55.0,
      40.0,
      45.0,
      47.0,
      null,
      null,
      null,
      60.0,
      51.0,
      83.0,
      53.0,
      48.0,
      60.0,
      43.0,
      42.0,
      40.0,
      40.0,
      42.0,
      39.0,
      58.0,
      52.0,
      28.0,
      41.0,
      28.0,
      29.0,
      49.0,
      47.0,
      47.0,
      46.0,
      52.0,
      47.0,
      43.0,
      36.0,
      66.0,
      70.0,
      54.0,
      47.0,
      51.0,
      51.0,
      46.0,
      54.0,
      55.0,
      76.0,
      39.0,
      38.0,
      51.0,
      44.0,
      38.0,
      45.0,
      48.0,
      67.0,
      55.0,
      54.0,
      54.0,
      53.0,
      48.0,
      46.0,
      44.0,
      61.0,
      50.0,
      47.0,
      54.0,
      33.0,
      37.0,
      54.0,
      55.0,
      50.0,
      46.0,
      49.0,
      46.0,
      43.0,
      54.0,
      36.0,
      48.0,
      37.0,
      27.0,
      52.0,
      39.0,
      43.0,
      48.0,
      37.0,
      54.0,
      70.0,
      49.0,
      58.0,
      56.0,
      58.0,
      41.0,
      60.0,
      57.0,
      49.0,
      55.0,
      50.0,
      47.0,
      41.0,
      48.0,
      71.0
    ],
    "timestamp": "2022-12-01T00:43:00.000+00:00"
  },
  "latency": 180,
  "light_sleep_duration": 12510,
  "low_battery_alert": false,
  "lowest_heart_rate": 53,
  "movement_30_sec": "3211112222111111111111111111111113233322222122122122111111344443222122111211122122111111112221321111111111111111111111121111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111132121111111111111111111111111111121111111111111122111111322111111111111111111111111111111111111111112111111111111111111111111111111111111211321111111111111111111111111111111111111111111111111111111111111111111111111111111111111111121121111111111111111111112111111111111111111111111111111111111111111111111111113211111111111111221312111111111111111111111111111111111111111111111111111111131111122111111111111111113111111111111111111111111111111111111111111111111111111121111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111211111111112111111111111111111112111111111111111113111111111111111111211111111111111121221111111111111111133222222333333332212211121212222122222222333212322322212",
  "period": 1,
  "readiness": {
    "contributors": {
      "activity_balance": 87,
      "body_temperature": 100,
      "hrv_balance": 88,
      "previous_day_activity": 100,
      "previous_night": 78,
      "recovery_index": 100,
      "resting_heart_rate": 100,
      "sleep_balance": 74
    },
    "score": 86,
    "temperature_deviation": -0.1,
    "temperature_trend_deviation": 0.06
  },
  "readiness_score_delta": 0,
  "rem_sleep_duration": 6930,
  "restless_periods": 83,
  "sleep_phase_5_min": "42244244412222111111113332442112222422223111123332222242222142222332223333333333333223222224444444",
  "sleep_score_delta": 0,
  "time_in_bed": 29280,
  "total_sleep_duration": 24210,
  "type": "long_sleep"
}

Heartrate

The oura-v2-heartrate.json file is another new addition and includes awake heart rate data as well:

detailed sleep:
[
  {
    "bpm": 90,
    "source": "awake",
    "timestamp": "2022-12-01T10:38:25+00:00"
  },
  {
    "bpm": 81,
    "source": "awake",
    "timestamp": "2022-12-01T11:05:15+00:00"
  },
  {
    "bpm": 73,
    "source": "awake",
    "timestamp": "2022-12-01T11:05:52+00:00"
  },
  {
    "bpm": 90,
    "source": "awake",
    "timestamp": "2022-12-01T11:06:03+00:00"
  },
  {
    "bpm": 60,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:06+00:00"
  },
  {
    "bpm": 65,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:28+00:00"
  },
  {
    "bpm": 60,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:29+00:00"
  },
  {
    "bpm": 102,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:48+00:00"
  },
  {
    "bpm": 101,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:49+00:00"
  },
  {
    "bpm": 92,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:52+00:00"
  }
]

Tags

The API now also provides access to the "tags" that you can use within the Oura mobile app to annotate how given days were, see the example below:

tags:
[
  {
    "day": "2022-07-20",
    "text": "Covid positive in RAT just now",
    "timestamp": "2022-07-20T11:36:00+02:00",
    "tags": []
  },
  {
    "day": "2022-10-09",
    "text": null,
    "timestamp": "2022-10-09T19:31:00+07:00",
    "tags": [
      "tag_generic_airplane"
    ]
  },
  {
    "day": "2022-10-10",
    "text": null,
    "timestamp": "2022-10-10T09:01:00+07:00",
    "tags": [
      "tag_generic_tired",
      "tag_generic_jetlag",
      "tag_generic_hotel"
    ]
  },
  {
    "day": "2022-10-21",
    "text": null,
    "timestamp": "2022-10-21T09:34:00+02:00",
    "tags": [
      "tag_generic_jetlag"
    ]
  }
]

Workouts

workouts:
[
  {
    "activity": "walking",
    "calories": 52.816,
    "day": "2022-10-31",
    "distance": null,
    "end_datetime": "2022-10-31T18:54:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-10-31T18:38:00+00:00"
  },
  {
    "activity": "walking",
    "calories": null,
    "day": "2022-11-01",
    "distance": null,
    "end_datetime": "2022-11-01T15:58:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-01T14:42:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 145.244,
    "day": "2022-11-01",
    "distance": null,
    "end_datetime": "2022-11-01T18:24:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-01T17:40:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 184.856,
    "day": "2022-11-11",
    "distance": null,
    "end_datetime": "2022-11-11T18:50:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-11T17:54:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 115.53500000000001,
    "day": "2022-11-11",
    "distance": null,
    "end_datetime": "2022-11-11T20:44:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-11T20:09:00+00:00"
  }
]

Notebook
Last updated 2 months ago

Using the data from the Oura V2 API

Some examples of the types of data that is now available through https://oura.openhumans.org.

The V1 integration remains unchanged and the data is stored in oura-data.json as it was before. Additionally there are now a number of new files with data as received from the V2 API, all prefixed oura-v2-.

Updating to V2 API: If you've been using the Oura integration before (authorized Oura before December 1st, 2022) you might have to remove the Oura authorization and reconnect it, in order to authorize the now larger scope of data that can be imported. To do so head to https://oura.openhumans.org, log-in with your Open Humans account and then select disconnect oura account on the dashboard and reconnect it afterwards.

Daily activity data

The daily activity data is similar to the activity data provided by the original V1 API. The file contains a long list of daily activity recordings. Below is a printout of a single data point (the last in your file).

In [1]:
from ohapi import api
import os
import requests
import tempfile

user_details = api.exchange_oauth2_member(os.environ.get('OH_ACCESS_TOKEN'))
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-daily_activity.json':
        break
import json 
oura = json.loads(requests.get(i['download_url']).content)
In [2]:
print(json.dumps(oura[-1],indent=2))
{
  "class_5_min": "11111111111112111111211111111111111111111111111111122221122234333444443223232222222332323233332232333333223322223233",
  "score": 95,
  "active_calories": 250,
  "average_met_minutes": 1.5625,
  "contributors": {
    "meet_daily_targets": 95,
    "move_every_hour": 100,
    "recovery_time": 100,
    "stay_active": 77,
    "training_frequency": 100,
    "training_volume": 100
  },
  "equivalent_walking_distance": 4257,
  "high_activity_met_minutes": 0,
  "high_activity_time": 0,
  "inactivity_alerts": 0,
  "low_activity_met_minutes": 47,
  "low_activity_time": 5700,
  "medium_activity_met_minutes": 157,
  "medium_activity_time": 2160,
  "met": {
    "interval": 60.0,
    "items": [
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      1.1,
      1.2,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      0.9,
      0.9,
      1.4,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.1,
      1.1,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      2.6,
      1.2,
      1.2,
      1.2,
      1.3,
      1.3,
      1.2,
      1.2,
      1.2,
      1.2,
      1.2,
      1.2,
      1.1,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      1.2,
      0.9,
      1.1,
      1.0,
      1.0,
      0.9,
      1.0,
      1.1,
      5.0,
      0.9,
      0.9,
      1.1,
      1.2,
      1.2,
      1.2,
      1.2,
      1.3,
      1.2,
      1.7,
      3.2,
      1.4,
      1.9,
      1.9,
      3.6,
      5.6,
      5.2,
      7.4,
      1.9,
      1.2,
      2.6,
      3.4,
      3.6,
      2.0,
      1.6,
      1.9,
      1.7,
      4.6,
      1.7,
      2.1,
      2.1,
      6.5,
      6.6,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.8,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      6.5,
      3.2,
      2.5,
      2.1,
      1.2,
      1.4,
      1.6,
      1.6,
      1.4,
      1.3,
      1.3,
      1.3,
      1.4,
      1.2,
      1.4,
      1.3,
      1.2,
      1.2,
      1.5,
      1.7,
      1.8,
      1.8,
      3.0,
      1.5,
      1.7,
      1.2,
      1.4,
      1.9,
      1.7,
      1.8,
      1.7,
      1.5,
      1.7,
      1.7,
      1.5,
      1.9,
      1.6,
      1.9,
      1.5,
      1.5,
      1.5,
      1.6,
      1.7,
      1.5,
      1.6,
      1.3,
      1.4,
      1.5,
      1.3,
      1.3,
      1.3,
      1.2,
      1.2,
      1.7,
      1.5,
      1.4,
      1.8,
      1.5,
      1.6,
      2.6,
      1.5,
      1.6,
      1.6,
      1.3,
      1.6,
      1.4,
      1.5,
      1.6,
      1.9,
      1.6,
      1.9,
      2.1,
      1.7,
      1.4,
      1.8,
      1.9,
      1.7,
      1.4,
      1.4,
      1.3,
      1.4,
      1.2,
      1.5,
      2.2,
      1.8,
      1.7,
      1.7,
      1.4,
      1.6,
      1.3,
      1.9,
      1.6,
      1.6,
      1.6,
      2.1,
      2.0,
      1.7,
      1.2,
      1.2,
      1.1,
      1.2,
      1.4,
      1.9,
      3.2,
      1.9,
      1.6,
      1.9,
      1.5,
      1.8,
      1.7,
      1.8,
      1.9,
      1.9,
      1.6,
      1.9,
      1.6,
      1.5,
      1.8,
      1.9,
      1.7,
      1.9,
      1.7,
      1.9,
      1.6,
      1.5,
      1.5,
      1.7,
      1.4,
      1.5,
      1.5,
      1.6,
      1.7,
      1.9,
      1.7,
      1.5,
      1.7,
      1.9,
      1.7,
      1.6,
      1.7,
      1.3,
      1.3,
      1.8,
      1.6,
      1.9,
      1.6,
      1.2,
      1.7,
      1.9,
      1.7,
      1.9,
      1.7,
      1.9,
      1.8,
      1.9,
      1.5,
      1.8,
      1.9,
      1.6,
      1.8,
      1.5,
      1.6,
      2.0,
      1.9,
      1.9,
      1.5,
      1.7,
      1.9,
      1.2,
      1.8,
      1.4,
      1.2,
      1.2,
      1.6,
      1.7,
      1.5,
      1.6,
      1.7,
      1.5,
      1.7,
      1.4,
      1.5,
      1.9,
      1.9,
      1.9,
      1.8,
      4.1,
      5.0,
      2.1,
      1.6,
      1.2,
      1.2,
      1.3,
      1.3,
      1.6,
      1.5,
      1.6,
      1.3,
      1.5,
      1.6,
      1.5,
      1.5,
      1.5,
      1.5,
      1.5,
      1.2,
      1.2,
      1.3,
      1.4,
      1.2,
      1.3,
      1.3,
      1.3,
      1.2,
      1.2,
      1.6,
      2.9,
      1.8,
      1.6,
      1.5,
      1.5,
      1.4,
      1.7,
      1.9,
      2.1,
      1.8,
      1.9,
      1.4,
      1.7,
      1.5,
      1.5,
      1.8,
      3.0,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9,
      0.9
    ],
    "timestamp": "2022-12-01T04:00:00.000+00:00"
  },
  "meters_to_target": 6100,
  "non_wear_time": 0,
  "resting_time": 17400,
  "sedentary_met_minutes": 8,
  "sedentary_time": 9600,
  "steps": 4875,
  "target_calories": 550,
  "target_meters": 11000,
  "total_calories": 2074,
  "day": "2022-12-01",
  "timestamp": "2022-12-01T04:00:00+00:00"
}

Daily sleep & daily readiness

Similarly, the daily readiness records are quite similar to the V1 API records, but now also outline how the different metrics record to the daily score.

The daily sleep record is a lot briefer though, as a lot of the data has been outsourced into a different file, called oura-v2-sleep.json.

In [3]:
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-daily_readiness.json':
        print('daily readiness:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-1],indent=2))
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-daily_sleep.json':
        print('daily sleep:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-1],indent=2))
daily readiness:
{
  "contributors": {
    "activity_balance": 87,
    "body_temperature": 100,
    "hrv_balance": 88,
    "previous_day_activity": 100,
    "previous_night": 73,
    "recovery_index": 100,
    "resting_heart_rate": 100,
    "sleep_balance": 74
  },
  "day": "2022-12-01",
  "score": 86,
  "temperature_deviation": -0.1,
  "temperature_trend_deviation": 0.06,
  "timestamp": "2022-12-01T00:00:00+00:00"
}
daily sleep:
{
  "contributors": {
    "deep_sleep": 94,
    "efficiency": 79,
    "latency": 67,
    "rem_sleep": 96,
    "restfulness": 77,
    "timing": 47,
    "total_sleep": 72
  },
  "day": "2022-12-01",
  "score": 75,
  "timestamp": "2022-12-01T00:00:00+00:00"
}

Detailed sleep records

The detailed sleep records provide deeper insights, including all nightly heart rate recordings, the movement in 30 second intervals, and the time spent in different sleep phases.

In [4]:
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-sleep.json':
        print('heart rate:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-1],indent=2))
heart rate:
{
  "average_breath": 14.5,
  "average_heart_rate": 61.125,
  "average_hrv": 48,
  "awake_time": 5070,
  "bedtime_end": "2022-12-01T08:51:00+00:00",
  "bedtime_start": "2022-12-01T00:43:00+00:00",
  "day": "2022-12-01",
  "deep_sleep_duration": 4770,
  "efficiency": 83,
  "heart_rate": {
    "interval": 300.0,
    "items": [
      56.0,
      55.0,
      54.0,
      54.0,
      54.0,
      null,
      null,
      null,
      62.0,
      53.0,
      54.0,
      55.0,
      59.0,
      58.0,
      60.0,
      59.0,
      60.0,
      59.0,
      59.0,
      59.0,
      60.0,
      63.0,
      67.0,
      65.0,
      66.0,
      65.0,
      59.0,
      60.0,
      60.0,
      59.0,
      62.0,
      63.0,
      63.0,
      64.0,
      59.0,
      57.0,
      57.0,
      58.0,
      58.0,
      57.0,
      58.0,
      56.0,
      57.0,
      58.0,
      62.0,
      63.0,
      63.0,
      63.0,
      64.0,
      61.0,
      59.0,
      58.0,
      58.0,
      56.0,
      55.0,
      55.0,
      55.0,
      56.0,
      57.0,
      56.0,
      57.0,
      59.0,
      60.0,
      64.0,
      64.0,
      62.0,
      63.0,
      61.0,
      61.0,
      62.0,
      61.0,
      62.0,
      60.0,
      64.0,
      61.0,
      64.0,
      63.0,
      61.0,
      62.0,
      61.0,
      61.0,
      59.0,
      59.0,
      58.0,
      62.0,
      60.0,
      60.0,
      59.0,
      62.0,
      59.0,
      63.0,
      57.0,
      58.0,
      58.0,
      57.0,
      60.0,
      59.0,
      57.0
    ],
    "timestamp": "2022-12-01T00:43:00.000+00:00"
  },
  "hrv": {
    "interval": 300.0,
    "items": [
      40.0,
      55.0,
      40.0,
      45.0,
      47.0,
      null,
      null,
      null,
      60.0,
      51.0,
      83.0,
      53.0,
      48.0,
      60.0,
      43.0,
      42.0,
      40.0,
      40.0,
      42.0,
      39.0,
      58.0,
      52.0,
      28.0,
      41.0,
      28.0,
      29.0,
      49.0,
      47.0,
      47.0,
      46.0,
      52.0,
      47.0,
      43.0,
      36.0,
      66.0,
      70.0,
      54.0,
      47.0,
      51.0,
      51.0,
      46.0,
      54.0,
      55.0,
      76.0,
      39.0,
      38.0,
      51.0,
      44.0,
      38.0,
      45.0,
      48.0,
      67.0,
      55.0,
      54.0,
      54.0,
      53.0,
      48.0,
      46.0,
      44.0,
      61.0,
      50.0,
      47.0,
      54.0,
      33.0,
      37.0,
      54.0,
      55.0,
      50.0,
      46.0,
      49.0,
      46.0,
      43.0,
      54.0,
      36.0,
      48.0,
      37.0,
      27.0,
      52.0,
      39.0,
      43.0,
      48.0,
      37.0,
      54.0,
      70.0,
      49.0,
      58.0,
      56.0,
      58.0,
      41.0,
      60.0,
      57.0,
      49.0,
      55.0,
      50.0,
      47.0,
      41.0,
      48.0,
      71.0
    ],
    "timestamp": "2022-12-01T00:43:00.000+00:00"
  },
  "latency": 180,
  "light_sleep_duration": 12510,
  "low_battery_alert": false,
  "lowest_heart_rate": 53,
  "movement_30_sec": "3211112222111111111111111111111113233322222122122122111111344443222122111211122122111111112221321111111111111111111111121111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111132121111111111111111111111111111121111111111111122111111322111111111111111111111111111111111111111112111111111111111111111111111111111111211321111111111111111111111111111111111111111111111111111111111111111111111111111111111111111121121111111111111111111112111111111111111111111111111111111111111111111111111113211111111111111221312111111111111111111111111111111111111111111111111111111131111122111111111111111113111111111111111111111111111111111111111111111111111111121111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111211111111112111111111111111111112111111111111111113111111111111111111211111111111111121221111111111111111133222222333333332212211121212222122222222333212322322212",
  "period": 1,
  "readiness": {
    "contributors": {
      "activity_balance": 87,
      "body_temperature": 100,
      "hrv_balance": 88,
      "previous_day_activity": 100,
      "previous_night": 78,
      "recovery_index": 100,
      "resting_heart_rate": 100,
      "sleep_balance": 74
    },
    "score": 86,
    "temperature_deviation": -0.1,
    "temperature_trend_deviation": 0.06
  },
  "readiness_score_delta": 0,
  "rem_sleep_duration": 6930,
  "restless_periods": 83,
  "sleep_phase_5_min": "42244244412222111111113332442112222422223111123332222242222142222332223333333333333223222224444444",
  "sleep_score_delta": 0,
  "time_in_bed": 29280,
  "total_sleep_duration": 24210,
  "type": "long_sleep"
}

Heartrate

The oura-v2-heartrate.json file is another new addition and includes awake heart rate data as well:

In [5]:
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-heartrate.json':
        print('detailed sleep:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-10:],indent=2))
detailed sleep:
[
  {
    "bpm": 90,
    "source": "awake",
    "timestamp": "2022-12-01T10:38:25+00:00"
  },
  {
    "bpm": 81,
    "source": "awake",
    "timestamp": "2022-12-01T11:05:15+00:00"
  },
  {
    "bpm": 73,
    "source": "awake",
    "timestamp": "2022-12-01T11:05:52+00:00"
  },
  {
    "bpm": 90,
    "source": "awake",
    "timestamp": "2022-12-01T11:06:03+00:00"
  },
  {
    "bpm": 60,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:06+00:00"
  },
  {
    "bpm": 65,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:28+00:00"
  },
  {
    "bpm": 60,
    "source": "awake",
    "timestamp": "2022-12-01T13:27:29+00:00"
  },
  {
    "bpm": 102,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:48+00:00"
  },
  {
    "bpm": 101,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:49+00:00"
  },
  {
    "bpm": 92,
    "source": "awake",
    "timestamp": "2022-12-01T13:37:52+00:00"
  }
]

Tags

The API now also provides access to the "tags" that you can use within the Oura mobile app to annotate how given days were, see the example below:

In [6]:
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-tag.json':
        print('tags:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-4:],indent=2))
tags:
[
  {
    "day": "2022-07-20",
    "text": "Covid positive in RAT just now",
    "timestamp": "2022-07-20T11:36:00+02:00",
    "tags": []
  },
  {
    "day": "2022-10-09",
    "text": null,
    "timestamp": "2022-10-09T19:31:00+07:00",
    "tags": [
      "tag_generic_airplane"
    ]
  },
  {
    "day": "2022-10-10",
    "text": null,
    "timestamp": "2022-10-10T09:01:00+07:00",
    "tags": [
      "tag_generic_tired",
      "tag_generic_jetlag",
      "tag_generic_hotel"
    ]
  },
  {
    "day": "2022-10-21",
    "text": null,
    "timestamp": "2022-10-21T09:34:00+02:00",
    "tags": [
      "tag_generic_jetlag"
    ]
  }
]

Workouts

In [7]:
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-v2-workout.json':
        print('workouts:')
        oura = json.loads(requests.get(i['download_url']).content)
        print(json.dumps(oura[-5:],indent=2))
workouts:
[
  {
    "activity": "walking",
    "calories": 52.816,
    "day": "2022-10-31",
    "distance": null,
    "end_datetime": "2022-10-31T18:54:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-10-31T18:38:00+00:00"
  },
  {
    "activity": "walking",
    "calories": null,
    "day": "2022-11-01",
    "distance": null,
    "end_datetime": "2022-11-01T15:58:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-01T14:42:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 145.244,
    "day": "2022-11-01",
    "distance": null,
    "end_datetime": "2022-11-01T18:24:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-01T17:40:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 184.856,
    "day": "2022-11-11",
    "distance": null,
    "end_datetime": "2022-11-11T18:50:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-11T17:54:00+00:00"
  },
  {
    "activity": "walking",
    "calories": 115.53500000000001,
    "day": "2022-11-11",
    "distance": null,
    "end_datetime": "2022-11-11T20:44:00+00:00",
    "intensity": "moderate",
    "label": null,
    "source": "confirmed",
    "start_datetime": "2022-11-11T20:09:00+00:00"
  }
]