Skip to content

Create New Binary Blob

Request

Creates a new binary blob in the user's account. The Content-Type and the Digest headers must represent the media type and MD5 hash of the binary blob content, respectively.

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
Content-Typestring(MediaType)^\w+/[-+.\w]+(;.+)?$required

Content type of the resource

Example:application/octet-stream
Examples:
binary
application/octet-stream
text
text/plain
text UTF-8
text/plain; charset=utf-8
HTML
text/html
JSON
application/json
XML
application/xml
XML text
text/xml
JPEG image
image/jpeg
PNG image
image/png
MPEG4 video
video/mp4
PDF
application/pdf
ZIP
application/zip
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==
Body*/*required

Binary blob

string, (binary)(Blob content)read-only

Binary data.

curl -i -X POST \
  'https://tidepool.redocly.app/_mock/reference/blob.v1/v1/users/{userId}/blobs' \
  -H 'Content-Type: */*' \
  -H 'Digest: md5=HUXZLQLMuI/KZ5KDcJPcOA==' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d string

Responses

Binary blob 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, = 24 characters(MD5 Digest)^(?:[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=="
mediaTypestring(MediaType)^\w+/[-+.\w]+(;.+)?$required

Media type as defined in RFC 2045.

Example:"application/octet-stream"
sizeinteger, (int64)(Blob Size)read-onlyrequired

Size of the binary blob, in bytes

Example:1024
statusstring(Blob status)read-onlyrequired

Blob status

Enum:"created""available"
Example:"created"
createdTimestring, (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"
deletedTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
revisioninteger, (int32), >= 0(Blob Revision)required

Revision number of the blob

Example:42
Response
{ "id": "97a9fae8a19b4da58bb48dc90c9562c9", "userId": "string", "digestMD5": "HUXZLQLMuI/KZ5KDcJPcOA==", "mediaType": "application/octet-stream", "size": 1024, "status": "created", "createdTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z", "deletedTime": "2017-02-06T02:37:46Z", "revision": 42 }