Skip to content

Blob 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/blob.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.

Blobs

List, create, and manage binary blobs. The content format may be anything, because the blobs are treated as opaque data by the service. Each blob has a status. If a blob is created without content, then its status is created. If the blob is created with content or has been updated to include content then its status is available.

Operations

Device Logs

Create and list device logs.

Operations

Request

Uploads a new device logs json to the user's account. The Digest header must represent the MD5 hash of the json data content.

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

Tidepool User ID

Headers
Digeststring= 28 characters^md5=(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}...required

Base64-encoded MD5 hash of the resource, per RFC 3230

Example: md5=HUXZLQLMuI/KZ5KDcJPcOA==
X-Logs-Start-At-Timestring(date-time)(Date/Time)required

Starting time of device logs inside the uploaded json log

Example: 2017-02-06T02:37:46Z
X-Logs-End-At-Timestring(date-time)(Date/Time)required

End time of device logs inside the uploaded json log

Example: 2017-02-06T02:37:46Z
Bodyapplication/jsonrequired

array of JSON data

Array [
typestringrequired
Enum"send""receive""error""delegate""delegateResponse""connection"
Example: "send"
managerIdentifierstring(Device Model Name)non-emptyrequired

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.

Example: "Devicey McDeviceface"
deviceIdentifierstring(Device ID)non-emptyrequired

Globally unique to device and repeatable with each upload, e.g. device make and model with serial number

Example: "MMT-1711:12345678"
timestampstring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
messagestringnon-emptyrequired
Example: "sent something ..."
]
curl -i -X POST \
  'https://tidepool.redocly.app/_mock/reference/blob.v1/v1/users/{userId}/device_logs' \
  -H 'Content-Type: application/json' \
  -H 'Digest: md5=HUXZLQLMuI/KZ5KDcJPcOA==' \
  -H 'X-Logs-End-At-Time: 2017-02-06T02:37:46Z' \
  -H 'X-Logs-Start-At-Time: 2017-02-06T02:37:46Z' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '[
    {
      "type": "send",
      "managerIdentifier": "Devicey McDeviceface",
      "deviceIdentifier": "MMT-1711:12345678",
      "timestamp": "2017-02-06T02:37:46Z",
      "message": "sent something ..."
    }
  ]'

Responses

Device logs metadata

Bodyapplication/json
idstring(Blob ID)^[0-9a-z]{32}$read-onlyrequired

Blob ID

Example: "97a9fae8a19b4da58bb48dc90c9562c9"
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

digestMD5string(MD5 Digest)= 24 characters^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[...required

MD5 digest of the content per RFC 1321, encoded as base64 (RFC 4648).

Example: "HUXZLQLMuI/KZ5KDcJPcOA=="
mediaTypestringrequired
Value"application/json"
Example: "application/json"
sizeinteger(int64)(Blob Size)read-onlyrequired

Size of the binary blob, in bytes

Example: 1024
createdTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

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

RFC 3339 / ISO 8601 timestamp with timezone information

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

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
Response
application/json
{ "id": "97a9fae8a19b4da58bb48dc90c9562c9", "userId": "4d94a5fb-642e-48f1-89b9-c6a3e6145342", "digestMD5": "HUXZLQLMuI/KZ5KDcJPcOA==", "mediaType": "application/json", "size": 1024, "createdTime": "2017-02-06T02:35:46Z", "startAt": "2017-02-06T02:35:46Z", "endAt": "2017-02-06T02:36:46Z" }

Request

List previously uploaded device logs json data in the user's account. The list must be filtered with startAt and endAt parameters

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

Tidepool User ID

Query
startAtTimestring(date-time)(Date/Time)required

Start At Datetime

Example: startAtTime=2017-02-06T02:37:46Z
endAtTimestring(date-time)(Date/Time)required

End At Datetime

Example: endAtTime=2017-02-06T02:37:46Z
curl -i -X GET \
  'https://tidepool.redocly.app/_mock/reference/blob.v1/v1/users/{userId}/device_logs?startAtTime=2017-02-06T02%3A37%3A46Z&endAtTime=2017-02-06T02%3A37%3A46Z' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

List of device logs metadata

Bodyapplication/jsonArray [
idstring(Blob ID)^[0-9a-z]{32}$read-onlyrequired

Blob ID

Example: "97a9fae8a19b4da58bb48dc90c9562c9"
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

digestMD5string(MD5 Digest)= 24 characters^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[...required

MD5 digest of the content per RFC 1321, encoded as base64 (RFC 4648).

Example: "HUXZLQLMuI/KZ5KDcJPcOA=="
mediaTypestringrequired
Value"application/json"
Example: "application/json"
sizeinteger(int64)(Blob Size)read-onlyrequired

Size of the binary blob, in bytes

Example: 1024
createdTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

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

RFC 3339 / ISO 8601 timestamp with timezone information

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

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
]
Response
application/json
[ { "id": "97a9fae8a19b4da58bb48dc90c9562c9", "userId": "4d94a5fb-642e-48f1-89b9-c6a3e6145342", "digestMD5": "HUXZLQLMuI/KZ5KDcJPcOA==", "mediaType": "application/json", "size": 1024, "createdTime": "2017-02-06T02:35:46Z", "startAt": "2017-02-06T02:35:46Z", "endAt": "2017-02-06T02:36:46Z" } ]