Skip to content

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.

Download OpenAPI description
Languages
Servers
Mock server

https://tidepool.redocly.app/_mock/reference/data.v1/

integration

https://external.integration.tidepool.org/

production

https://api.tidepool.org/

dev1

https://dev1.dev.tidepool.org/

qa1

https://qa1.development.tidepool.org/

qa2

https://qa2.development.tidepool.org/

Internal

APIs intended for internal use by Tidepool.

Operations

Data

Manages diabetes data in user's Tidepool account.

Operations

Request

Creates a new data source for the user specified by the userId. Before creating a new data source, you must first create the data provider session. See the Authentication APIs for the details on how to create data provider sessions.

Security
serverToken
Path
userIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-onlyrequired

Tidepool User ID

Bodyapplication/json

Create New Data Source

providerNamestring(Provider Name)[ 1 .. 100 ] charactersrequired
Example: "dexcom"
providerSessionIdstring(Provider Session ID)^[0-9a-z]{32}$required
providerTypestring(Provider Type)required
Value"oauth"
Example: "oauth"
statestring(Data Source State)required

State of the data source.

Enum"connected""disconnected""error"
Example: "connected"
curl -i -X POST \
  'https://tidepool.redocly.app/_mock/reference/data.v1/v1/users/{userId}/data_sources' \
  -H 'Content-Type: application/json' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '{
    "providerName": "dexcom",
    "providerSessionId": "string",
    "providerType": "oauth",
    "state": "connected"
  }'

Responses

Data Source

Bodyapplication/json
createdTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
dataSetIdsArray of strings(Data Set ID Array)non-emptyuniquerequired

An array of data set IDs. The IDs in the array must be unique.

Example: ["ce8cc5f7595575945f91fc6710db6fef"]
earliestDataTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
idstring(Data Source ID)= 32 characters^[0-9a-f]{32}$required
Example: "c0ce05326529c6b35b0f4a568a344026"
lastImportTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
latestDataTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
providerNamestring(Provider Name)[ 1 .. 100 ] charactersrequired
Example: "dexcom"
providerSessionIdstring(Provider Session ID)^[0-9a-z]{32}$required
providerTypestring(Provider Type)required
Value"oauth"
Example: "oauth"
revisioninteger(int32)
statestring(Data Source State)required

State of the data source.

Enum"connected""disconnected""error"
Example: "connected"
userIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-onlyrequired

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

Response
application/json
{ "createdTime": "2017-02-06T02:37:46Z", "dataSetIds": [ "ce8cc5f7595575945f91fc6710db6fef" ], "earliestDataTime": "2017-02-06T02:37:46Z", "id": "c0ce05326529c6b35b0f4a568a344026", "lastImportTime": "2017-02-06T02:37:46Z", "latestDataTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z", "providerName": "dexcom", "providerSessionId": "string", "providerType": "oauth", "revision": 0, "state": "connected", "userId": "string" }

Request

Deletes all data sources for the user specified by the userId. This does not delete the corresponding data provider sessions. See the Authentication APIs for the details on how to delete data provider sessions.

Security
serverToken
Path
userIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-onlyrequired

Tidepool User ID

curl -i -X DELETE \
  'https://tidepool.redocly.app/_mock/reference/data.v1/v1/users/{userId}/data_sources' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Success

Response
No content

Request

Returns the data source specified by the dataSourceId.

Security
sessionToken
Path
dataSourceIdstring(Data Source ID)= 32 characters^[0-9a-f]{32}$required

Data Source ID

Example: c0ce05326529c6b35b0f4a568a344026
curl -i -X GET \
  https://tidepool.redocly.app/_mock/reference/data.v1/v1/data_sources/c0ce05326529c6b35b0f4a568a344026 \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Data Source

Bodyapplication/json
createdTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
dataSetIdsArray of strings(Data Set ID Array)non-emptyuniquerequired

An array of data set IDs. The IDs in the array must be unique.

Example: ["ce8cc5f7595575945f91fc6710db6fef"]
earliestDataTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
idstring(Data Source ID)= 32 characters^[0-9a-f]{32}$required
Example: "c0ce05326529c6b35b0f4a568a344026"
lastImportTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
latestDataTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
providerNamestring(Provider Name)[ 1 .. 100 ] charactersrequired
Example: "dexcom"
providerSessionIdstring(Provider Session ID)^[0-9a-z]{32}$required
providerTypestring(Provider Type)required
Value"oauth"
Example: "oauth"
revisioninteger(int32)
statestring(Data Source State)required

State of the data source.

Enum"connected""disconnected""error"
Example: "connected"
userIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-onlyrequired

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

Response
application/json
{ "createdTime": "2017-02-06T02:37:46Z", "dataSetIds": [ "ce8cc5f7595575945f91fc6710db6fef" ], "earliestDataTime": "2017-02-06T02:37:46Z", "id": "c0ce05326529c6b35b0f4a568a344026", "lastImportTime": "2017-02-06T02:37:46Z", "latestDataTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z", "providerName": "dexcom", "providerSessionId": "string", "providerType": "oauth", "revision": 0, "state": "connected", "userId": "string" }