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 all spirometry tests for all 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
from_date

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

type
string
in
query
to_date

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

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
}

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
    }
  ]
}