RESTful API   

Introduction

Anyone can access and use VitalDB dataset by programming. All API’s can be called by GET method on the HTTP standard protocol and downloaded by entering an address in the web browser; the file is a compressed csv gzip file.

Endpoints

Endpoint

Method

Description

https://api.vitaldb.net/cases

GET

Download clinical information

https://api.vitaldb.net/trks

GET

Download track list

https://api.vitaldb.net/trks/{tid}

GET

Download track data

{tid} : track identifier in track list

https://api.vitaldb.net/labs

GET

Download laboratory results

Case list

URL: https://api.vitaldb.net/cases

The case list receives the Clinical Information related to the case; the first row has variable names and the variable name is all lowercase. The important variables are as follows, and the definition of other variables is summarized in the parameter list.

Variable Name

Description

caseid

case identifier

casestart

case start time

caseend

case end time

All time is displayed in seconds based on casestart, so be careful; therefore, the casestart becomes zero and the caseend becomes the length (second) of the entire case.

Track list

URL: https://api.vitaldb.net/trks

The track list contains information related to the track; the first row has variable names and the variable name is all lowercase; the definition of each variable is as follows.

Variable Name

Description

tid

track identifier

caseid

case identifier

ttype

type of track. N=numeric; S=string; W=waveform

tname

track name

unit

physiologic unit

srate

sampling rate. only meaningful when ttype=’W’

gain

ADC gain. only meaningful when ttype=’W’

bias

ADC bias. only meaningful when ttype=’W’

Waveform data is stored as an ADC count (integer), and the following formula should be used to convert the data into actual physical quantity.

Measured Physiologic Value = ADC count * gain + bias

Track data

URL: https://api.vitaldb.net/trks/{tid}

To download data including the actual measurements of the track, you can send a GET request to the address. For {tid}, you can add a tid value on the track list. This data contains actual data of the track; be careful, the data shows instantly without a variable name in the first row.

Depending on the track type (ttype), the stored form varies.

For wave track, each row contains an ADC count (integer) and the row without a sample is empty. Since the start time of the track is casestart, the exact time of the nth row is as follows.

time = casestart + n / srate

At this time, casestart should be taken from case list and srate should be taken from track list.

Numeric track and string track have two columns from the first row without header; the first column is the number of seconds since casestart. The second column has the measured value and the string value respectively. The string is encoded as UTF-8 and follows the RFC 4180 standard CSV format, which is enclosed by quotes when the line is included. Therefore, in the case of string track, the number of rows may not be the number of measurements, and it should be parsed using CSV parser for each language.

Lab Results

URL: https://api.vitaldb.net/labs

This file contains the test result.

Variable Name

Description

caseid

case identifier

dt

test time (seconds based on casestart)

name

test name

result

test result