APIs intended for internal use by Tidepool.
- Upload Data (LEGACY)
Data API (1.0)
The Tidepool API is an HTTP REST API used by Tidepool clients use to communicate with the Tidepool Platform.
For more information, see the Getting Started section.
Request
Deletes data source specified by the dataSourceId. This does not delete the corresponding data provider session. See the Authentication APIs for the details on how to delete data provider sessions.
- Mock serverhttps://tidepool.redocly.app/_mock/reference/data.v1/v1/data_sources/{dataSourceId}
- integrationhttps://external.integration.tidepool.org/v1/data_sources/{dataSourceId}
- productionhttps://api.tidepool.org/v1/data_sources/{dataSourceId}
- dev1https://dev1.dev.tidepool.org/v1/data_sources/{dataSourceId}
- qa1https://qa1.development.tidepool.org/v1/data_sources/{dataSourceId}
- qa2https://qa2.development.tidepool.org/v1/data_sources/{dataSourceId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://tidepool.redocly.app/_mock/reference/data.v1/v1/data_sources/c0ce05326529c6b35b0f4a568a344026 \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'Request
This is a legacy API for uploading diabetes data to user's account. It is deprecated and should not be used.
Upload data for the specified userId. The session token must be for userId, or identify a user who has the upload permission to the account specified by the userId.
Upload Data (LEGACY)
Tidepool diabetes data set.
An array of annotations.
Clock drift offset, expressed as milliseconds.
An ISO 8601 formatted timestamp without any timezone offset information.
The computerTime field encodes the local time at upload with no timezone offset information since we are storing timezone separately. We store this field in order to be able to audit and/or detect the correspondence between the user's browser time and the timezone they selected at the time of upload. If the user selected the timezone that was actually in effect for their browser at the time of upload, then applying the stored timezone to the UTC Zulu time field will match computerTime. If, on the other hand, the user selected a different timezone from that effective in their browser at the time of upload, applying the timezone to time will not match computerTime.
There are some use cases when it is perfectly justified to select a timezone that does not reflect the browser's current timezone. For example, some insulin pump users do not change the time on their devices when traveling for short periods of time across many timezones, but when uploading a device a user should always choose the timezone that aligns with the most recent data on the device and thus that will not match the local browser timezone.
Conversion offset, expressed as milliseconds.
Globally unique to device and repeatable with each upload, e.g. device make and model with serial number
An array of string tags indicating the manufacturer(s) of the device.
In order to avoid confusion resulting from referring to a single manufacturer with more than one name—for example, using both 'Minimed' and 'Medtronic' interchangeably—we restrict the set of strings used to refer to manufacturers to the set listed above and enforce exact string matches (including casing).
deviceManufacturers is an array of one or more string "tags" because there are devices resulting from a collaboration between more than one manufacturer, such as the Tandem G4 insulin pump with CGM integration (a collaboration between Tandem and Dexcom).
A string identifying the model of the device.
The deviceModel is a non-empty string that encodes the model of device. We endeavor to match each manufacturer's standard for how they represent model name in terms of casing, whether parts of the name are represented as one word or two, etc.
A string encoding the device's serial number.
The deviceSerialNumber is a string that encodes the serial number of the device. Note that even if a manufacturer only uses digits in its serial numbers, the SN should be stored as a string regardless.
Uniquely of string fields in the Tidepool device data models, deviceSerialNumber may be an empty string. This is essentially a compromise: having the device serial number is extremely important (especially for e.g., clinical studies) but in 2016 we came across our first case where we cannot recover the serial number of the device that generated the data: Dexcom G5 data uploaded to Tidepool through Apple iOS's HealthKit integration.
An array of string tags indicating the function(s) of the device.
The deviceTags array should be fairly self-explanatory as an array of tags indicating the function(s) of a particular device. For example, the Insulet OmniPod insulin delivery system has the tags bgm and insulin-pump since the PDM is both an insulin pump controller and includes a built-in blood glucose monitor.
Grab bag field for data that isn't yet part of the data model. The maximum size is 4K bytes.
A string indicating what variety of processing was used to create the time and related fields such as timezoneOffset on data in this upload.
For data auditing purposes, we store a string encoding the type of algorithm used to generate the time, timezoneOffset, and other related fields from the local deviceTime. At present, there are only three options for this value:
nonefor data sources that already include a UTC-anchoredtimevalue. At present, the only data source for which this is true is Dexcom G5 or Dexcom G6 data coming through Apple's iOS HealthKit integration.across-the-board-timezonefor devices (all BGMs, for example) that cannot have theirdeviceTimevalues "bootstrapped" to a UTCtimevalue; in such cases, we apply a single user-selected timezone to everydeviceTime"across the board" to generate thetimevalue.utc-bootstrappingfor devices (most insulin pumps and CGMs) where we use a combination of the user-selected timezone at time of upload, the most recent timestamp on device, and the history of display time changes on the device to infer the correcttimevalue for each record.
A string timezone name from the IANA timezone database
Time zone offset, expressed as positive or negative number of minutes from UTC.
Semantic Version Number 2.0.0. Regex from their site.
An upload identifier; this field should be the uploadId of the corresponding upload record
- Mock serverhttps://tidepool.redocly.app/_mock/reference/data.v1/data/{userId}
- integrationhttps://external.integration.tidepool.org/data/{userId}
- productionhttps://api.tidepool.org/data/{userId}
- dev1https://dev1.dev.tidepool.org/data/{userId}
- qa1https://qa1.development.tidepool.org/data/{userId}
- qa2https://qa2.development.tidepool.org/data/{userId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://tidepool.redocly.app/_mock/reference/data.v1/data/{userId}' \
-H 'Content-Type: application/json' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
-d '{}'[ 0 ]