NuvoAir API API Reference

This is a very concise document explaining how to extract spirometry data from our systems. At the moment you are able to extract shared profiles and the complete spirometry sessions.

DEMO API KEY

The API key for the demo is api-demo123

You should be able to test it using CURL or another simple client.

EXAMPLE

$ curl -s -H "Authorization: api-demo123" https://portal.nuvoair.com/api/v1/profiles
$ curl -s -H "Authorization: api-demo123" https://portal.nuvoair.com/api/v1/timelines
API Endpoint
https://portal.nuvoair.com/api/v1
Terms of Service: https://www.nuvoair.com
Contact: sheraz.sharif@nuvoair.com
Schemes: https
Version: 1.0.0

Authentication

ApiKeyAuth

name
Authorization
in
header

Paths

Get a list of user profiles currently shared with your organization

GET /profiles

Returns an array of profile ids. Required api_key in header

EXAMPLE

$ curl -s -H "Authorization: api-demo123" https://portal.nuvoair.com/api/v1/profiles
[{"id": "1caddf78e0e2359502600d6c", "email": "demo@nuvoair.com", "patient_name": "Lorenzo", "share_code": "demoshare123"}]
200 OK

successful operation

403 Forbidden

Access fobidden

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "id": "660efccc4f3e060001c57e74",
    "email": "bob@example.com",
    "patient_name": "Bob Smith",
    "share_code": "demoshare123"
  }
]
Response Example (403 Forbidden)
{
  "code": 403,
  "message": "You are not authorized to access this resource. Did you forget your API key in the header request?"
}

Retrieve spirometry tests for users who are sharing with you.

GET /timelines

Requires api_key in header request

EXAMPLE

$ curl -s -H "Authorization: api-demo123" https://portal.nuvoair.com/api/v1/timelines

Using optional parameters Use begin_date

$ curl -s -H "Authorization: api-demo123" "https://portal.nuvoair.com/api/v1/timelines?begin_date=2017-01-01"

Using all the optional parameters

The following query uses begin_date, profile_ids, and raw optional parameters.

$ curl -s -H "Authorization: api-demo123" "https://portal.nuvoair.com/api/v1/timelines?begin_date=2017-01-01&profile_ids=1caddf78e0e2359502600d6c&raw=true"

NOTE

Omitting begin_date and end_date will default to begin_date=<current_day> and end_date=<current_day> + 1 day. If you want yesterday's spirometry sessions then you must use begin_date=<yesterdays_date>

begin_date

Beginning date from which to extract in YYYY-MM-DD format.

type
string If omitted it will default to today in YYYY-MM-DD format
in
query
end_date

Ending date from which to extract in YYYY-MM-DD format.

type
string If omitted it will default to tomorrow in YYYY-MM-DD format
in
query
profile_ids

A comma-separated list of profile ids.

type
string If omitted it will query against all shared profiles
in
query
raw

Inlcuding this parameter will ask the API to return the full raw spirometry arrays in the result sets. NOTE -- must be raw=true -- no other formats will be recognized

type
string
in
query

successful operation

403 Forbidden

Access fobidden

Response Example (200 OK)
[
  {
    "spirometry_tests": {
      "best_test": {
        "duration": "6.466757369614513,",
        "fev1_actual": "3.625823,",
        "fev1_predicted": "4.428738,",
        "fev1_percentage": "0.8187034319934934,",
        "fvc_actual": "4.823865,",
        "fvc_predicted": "5.54989,",
        "fvc_percentage": "0.8691820918973168,",
        "pef_actual": "8.662488,",
        "pef_predicted": "10.49482,",
        "pef_percentage": "0.8254060574645395,",
        "ratio_actual": "0.7516427,",
        "ratio_predicted": "0.7979866,",
        "ratio_percentage": 0.9419239621316949
      },
      "all_tests": [
        {
          "duration": "6.466757369614513,",
          "fev1_actual": "3.625823,",
          "fev1_predicted": "4.428738,",
          "fev1_percentage": "0.8187034319934934,",
          "fvc_actual": "4.823865,",
          "fvc_predicted": "5.54989,",
          "fvc_percentage": "0.8691820918973168,",
          "pef_actual": "8.662488,",
          "pef_predicted": "10.49482,",
          "pef_percentage": "0.8254060574645395,",
          "ratio_actual": "0.7516427,",
          "ratio_predicted": "0.7979866,",
          "ratio_percentage": 0.9419239621316949
        },
        {
          "duration": "6.466757369614513,",
          "fev1_actual": "3.625823,",
          "fev1_predicted": "4.428738,",
          "fev1_percentage": "0.8187034319934934,",
          "fvc_actual": "4.823865,",
          "fvc_predicted": "5.54989,",
          "fvc_percentage": "0.8691820918973168,",
          "pef_actual": "8.662488,",
          "pef_predicted": "10.49482,",
          "pef_percentage": "0.8254060574645395,",
          "ratio_actual": "0.7516427,",
          "ratio_predicted": "0.7979866,",
          "ratio_percentage": 0.9419239621316949
        }
      ]
    },
    "weight_in_kg": 1.4658129805029452,
    "ethnicity": "ethnicity",
    "gender": "male",
    "medications": [
      "medications",
      "medications"
    ],
    "name": "name",
    "created_at": "2000-01-23T04:56:07.000+00:00",
    "id": "id",
    "diagnoses": [
      "diagnoses",
      "diagnoses"
    ],
    "email": "email",
    "age": 0.8008282,
    "height_in_cm": 6.027456183070403
  }
]
Response Example (403 Forbidden)
{
  "code": 403,
  "message": "You are not authorized to access this resource. Did you forget your API key in the header request?"
}

Schema Definitions

Error: object

code: string
message: string
Example
{
  "code": 403,
  "message": "You are not authorized to access this resource. Did you forget your API key in the header request?"
}

Profile: object

id: string
email: string (email)
patient_name: string
share_code: string
Example
{
  "id": "660efccc4f3e060001c57e74",
  "email": "bob@example.com",
  "patient_name": "Bob Smith",
  "share_code": "demoshare123"
}

SpirometrySession: object

id: string
email: string (email)
name: string
age: number (float)
height_in_cm: number (int32)
weight_in_kg: number (int32)
medications: string[]
diagnoses: string[]
ethnicity: string
gender: string , x ∈ { male , female }
created_at: string (date-time)
spirometry_tests: SpirometrySession_spirometry_tests
Example
{
  "spirometry_tests": {
    "best_test": {
      "duration": "6.466757369614513,",
      "fev1_actual": "3.625823,",
      "fev1_predicted": "4.428738,",
      "fev1_percentage": "0.8187034319934934,",
      "fvc_actual": "4.823865,",
      "fvc_predicted": "5.54989,",
      "fvc_percentage": "0.8691820918973168,",
      "pef_actual": "8.662488,",
      "pef_predicted": "10.49482,",
      "pef_percentage": "0.8254060574645395,",
      "ratio_actual": "0.7516427,",
      "ratio_predicted": "0.7979866,",
      "ratio_percentage": 0.9419239621316949
    },
    "all_tests": [
      {
        "duration": "6.466757369614513,",
        "fev1_actual": "3.625823,",
        "fev1_predicted": "4.428738,",
        "fev1_percentage": "0.8187034319934934,",
        "fvc_actual": "4.823865,",
        "fvc_predicted": "5.54989,",
        "fvc_percentage": "0.8691820918973168,",
        "pef_actual": "8.662488,",
        "pef_predicted": "10.49482,",
        "pef_percentage": "0.8254060574645395,",
        "ratio_actual": "0.7516427,",
        "ratio_predicted": "0.7979866,",
        "ratio_percentage": 0.9419239621316949
      },
      {
        "duration": "6.466757369614513,",
        "fev1_actual": "3.625823,",
        "fev1_predicted": "4.428738,",
        "fev1_percentage": "0.8187034319934934,",
        "fvc_actual": "4.823865,",
        "fvc_predicted": "5.54989,",
        "fvc_percentage": "0.8691820918973168,",
        "pef_actual": "8.662488,",
        "pef_predicted": "10.49482,",
        "pef_percentage": "0.8254060574645395,",
        "ratio_actual": "0.7516427,",
        "ratio_predicted": "0.7979866,",
        "ratio_percentage": 0.9419239621316949
      }
    ]
  },
  "weight_in_kg": 1.4658129805029452,
  "ethnicity": "ethnicity",
  "gender": "male",
  "medications": [
    "medications",
    "medications"
  ],
  "name": "name",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "id": "id",
  "diagnoses": [
    "diagnoses",
    "diagnoses"
  ],
  "email": "email",
  "age": 0.8008282,
  "height_in_cm": 6.027456183070403
}

SpirometryTest: object

duration: number (float)
fev1_actual: number (float)
fev1_predicted: number (float)
fev1_percentage: number (float)
fvc_actual: number (float)
fvc_predicted: number (float)
fvc_percentage: number (float)
pef_actual: number (float)
pef_predicted: number (float)
pef_percentage: number (float)
ratio_actual: number (float)
ratio_predicted: number (float)
ratio_percentage: number (float)
Example
{
  "duration": "6.466757369614513,",
  "fev1_actual": "3.625823,",
  "fev1_predicted": "4.428738,",
  "fev1_percentage": "0.8187034319934934,",
  "fvc_actual": "4.823865,",
  "fvc_predicted": "5.54989,",
  "fvc_percentage": "0.8691820918973168,",
  "pef_actual": "8.662488,",
  "pef_predicted": "10.49482,",
  "pef_percentage": "0.8254060574645395,",
  "ratio_actual": "0.7516427,",
  "ratio_predicted": "0.7979866,",
  "ratio_percentage": 0.9419239621316949
}

Error_2: object

code: string
message: string
Example
{
  "code": 403,
  "message": "You are not authorized to access this resource. Did you forget your API key in the header request?"
}

Profile_2: object

id: string
email: string (email)
patient_name: string
share_code: string
Example
{
  "id": "660efccc4f3e060001c57e74",
  "email": "bob@example.com",
  "patient_name": "Bob Smith",
  "share_code": "demoshare123"
}

SpirometrySession_2: object

id: string
email: string (email)
name: string
age: number (float)
height_in_cm: number (int32)
weight_in_kg: number (int32)
medications: string[]
diagnoses: string[]
ethnicity: string
gender: string , x ∈ { male , female }
created_at: string (date-time)
spirometry_tests: SpirometrySession_spirometry_tests
Example
{
  "spirometry_tests": {
    "best_test": {
      "duration": "6.466757369614513,",
      "fev1_actual": "3.625823,",
      "fev1_predicted": "4.428738,",
      "fev1_percentage": "0.8187034319934934,",
      "fvc_actual": "4.823865,",
      "fvc_predicted": "5.54989,",
      "fvc_percentage": "0.8691820918973168,",
      "pef_actual": "8.662488,",
      "pef_predicted": "10.49482,",
      "pef_percentage": "0.8254060574645395,",
      "ratio_actual": "0.7516427,",
      "ratio_predicted": "0.7979866,",
      "ratio_percentage": 0.9419239621316949
    },
    "all_tests": [
      {
        "duration": "6.466757369614513,",
        "fev1_actual": "3.625823,",
        "fev1_predicted": "4.428738,",
        "fev1_percentage": "0.8187034319934934,",
        "fvc_actual": "4.823865,",
        "fvc_predicted": "5.54989,",
        "fvc_percentage": "0.8691820918973168,",
        "pef_actual": "8.662488,",
        "pef_predicted": "10.49482,",
        "pef_percentage": "0.8254060574645395,",
        "ratio_actual": "0.7516427,",
        "ratio_predicted": "0.7979866,",
        "ratio_percentage": 0.9419239621316949
      },
      {
        "duration": "6.466757369614513,",
        "fev1_actual": "3.625823,",
        "fev1_predicted": "4.428738,",
        "fev1_percentage": "0.8187034319934934,",
        "fvc_actual": "4.823865,",
        "fvc_predicted": "5.54989,",
        "fvc_percentage": "0.8691820918973168,",
        "pef_actual": "8.662488,",
        "pef_predicted": "10.49482,",
        "pef_percentage": "0.8254060574645395,",
        "ratio_actual": "0.7516427,",
        "ratio_predicted": "0.7979866,",
        "ratio_percentage": 0.9419239621316949
      }
    ]
  },
  "weight_in_kg": 1.4658129805029452,
  "ethnicity": "ethnicity",
  "gender": "male",
  "medications": [
    "medications",
    "medications"
  ],
  "name": "name",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "id": "id",
  "diagnoses": [
    "diagnoses",
    "diagnoses"
  ],
  "email": "email",
  "age": 0.8008282,
  "height_in_cm": 6.027456183070403
}

SpirometryTest_2: object

duration: number (float)
fev1_actual: number (float)
fev1_predicted: number (float)
fev1_percentage: number (float)
fvc_actual: number (float)
fvc_predicted: number (float)
fvc_percentage: number (float)
pef_actual: number (float)
pef_predicted: number (float)
pef_percentage: number (float)
ratio_actual: number (float)
ratio_predicted: number (float)
ratio_percentage: number (float)
Example
{
  "duration": "6.466757369614513,",
  "fev1_actual": "3.625823,",
  "fev1_predicted": "4.428738,",
  "fev1_percentage": "0.8187034319934934,",
  "fvc_actual": "4.823865,",
  "fvc_predicted": "5.54989,",
  "fvc_percentage": "0.8691820918973168,",
  "pef_actual": "8.662488,",
  "pef_predicted": "10.49482,",
  "pef_percentage": "0.8254060574645395,",
  "ratio_actual": "0.7516427,",
  "ratio_predicted": "0.7979866,",
  "ratio_percentage": 0.9419239621316949
}

SpirometrySession_spirometry_tests: object

best_test: #definitons/SpirometryTest
all_tests: object[]
Example
{
  "best_test": {
    "duration": "6.466757369614513,",
    "fev1_actual": "3.625823,",
    "fev1_predicted": "4.428738,",
    "fev1_percentage": "0.8187034319934934,",
    "fvc_actual": "4.823865,",
    "fvc_predicted": "5.54989,",
    "fvc_percentage": "0.8691820918973168,",
    "pef_actual": "8.662488,",
    "pef_predicted": "10.49482,",
    "pef_percentage": "0.8254060574645395,",
    "ratio_actual": "0.7516427,",
    "ratio_predicted": "0.7979866,",
    "ratio_percentage": 0.9419239621316949
  },
  "all_tests": [
    {
      "duration": "6.466757369614513,",
      "fev1_actual": "3.625823,",
      "fev1_predicted": "4.428738,",
      "fev1_percentage": "0.8187034319934934,",
      "fvc_actual": "4.823865,",
      "fvc_predicted": "5.54989,",
      "fvc_percentage": "0.8691820918973168,",
      "pef_actual": "8.662488,",
      "pef_predicted": "10.49482,",
      "pef_percentage": "0.8254060574645395,",
      "ratio_actual": "0.7516427,",
      "ratio_predicted": "0.7979866,",
      "ratio_percentage": 0.9419239621316949
    },
    {
      "duration": "6.466757369614513,",
      "fev1_actual": "3.625823,",
      "fev1_predicted": "4.428738,",
      "fev1_percentage": "0.8187034319934934,",
      "fvc_actual": "4.823865,",
      "fvc_predicted": "5.54989,",
      "fvc_percentage": "0.8691820918973168,",
      "pef_actual": "8.662488,",
      "pef_predicted": "10.49482,",
      "pef_percentage": "0.8254060574645395,",
      "ratio_actual": "0.7516427,",
      "ratio_predicted": "0.7979866,",
      "ratio_percentage": 0.9419239621316949
    }
  ]
}