Skip to content

Metadata 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/metadata.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

Metadata

Create and update user metadata.

Operations

Get Metadata Collections

Request

Returns list of valid metadata collections.

Security
sessionToken
curl -i -X GET \
  https://tidepool.redocly.app/_mock/reference/metadata.v1/metadata/collections \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/jsonArray [
string(Metadata Collection Name)
Enum"profile""preferences""settings""groups""private"
]
Response
application/json
[ "profile", "groups", "private" ]

Get User Metadata Collection

Request

Returns the user's metadata collection corresponding to collectionName. Each metadata collection is an unbounded JSON object with client-defined fields.

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

collectionNamestring(Metadata Collection Name)required

Metadata Collection Name

Enum"profile""preferences""settings""groups""private"
Example: profile
curl -i -X GET \
  'https://tidepool.redocly.app/_mock/reference/metadata.v1/metadata/{userId}/profile' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/json
Any of:

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

fullNamestring(Full Name)
Example: "James Jellyfish"
patientobject
Response
application/json
{ "fullName": "James Jellyfish", "patient": { "diagnosisType": "type1", "diagnosisDate": "2013-05-09", "birthday": "2012-08-30", "biologicalSex": "male", "targetDevices": [], "targetTimezone": "US/Eastern", "about": "Jellyman is awesome!" } }

Update User Metadata Collection

Request

Updates the user's metadata collection corresponding to collectionName. Each metadata collection is an unbounded JSON object with client-defined fields.

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

collectionNamestring(Metadata Collection Name)required

Metadata Collection Name

Enum"profile""preferences""settings""groups""private"
Example: profile
Bodyapplication/json
Any of:

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

fullNamestring(Full Name)
Example: "James Jellyfish"
patientobject
curl -i -X POST \
  'https://tidepool.redocly.app/_mock/reference/metadata.v1/metadata/{userId}/profile' \
  -H 'Content-Type: application/json' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '{
    "fullName": "James Jellyfish",
    "patient": {
      "diagnosisType": "type1",
      "diagnosisDate": "2013-05-09",
      "birthday": "2012-08-30",
      "biologicalSex": "male",
      "targetDevices": [
        "bayercontournext"
      ],
      "targetTimezone": "US/Eastern",
      "about": "Jellyman is awesome!"
    }
  }'

Responses

Success

Bodyapplication/json
Any of:

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

fullNamestring(Full Name)
Example: "James Jellyfish"
patientobject
Response
application/json
{ "fullName": "James Jellyfish", "patient": { "diagnosisType": "type1", "diagnosisDate": "2013-05-09", "birthday": "2012-08-30", "biologicalSex": "male", "targetDevices": [], "targetTimezone": "US/Eastern", "about": "Jellyman is awesome!" } }

Update User Metadata Collection

Request

Updates the user's metadata collection corresponding to collectionName. Each metadata collection is an unbounded JSON object with client-defined fields.

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

collectionNamestring(Metadata Collection Name)required

Metadata Collection Name

Enum"profile""preferences""settings""groups""private"
Example: profile
Bodyapplication/json
Any of:

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

fullNamestring(Full Name)
Example: "James Jellyfish"
patientobject
curl -i -X PUT \
  'https://tidepool.redocly.app/_mock/reference/metadata.v1/metadata/{userId}/profile' \
  -H 'Content-Type: application/json' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '{
    "fullName": "James Jellyfish",
    "patient": {
      "diagnosisType": "type1",
      "diagnosisDate": "2013-05-09",
      "birthday": "2012-08-30",
      "biologicalSex": "male",
      "targetDevices": [
        "bayercontournext"
      ],
      "targetTimezone": "US/Eastern",
      "about": "Jellyman is awesome!"
    }
  }'

Responses

Success

Bodyapplication/json
Any of:

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

fullNamestring(Full Name)
Example: "James Jellyfish"
patientobject
Response
application/json
{ "fullName": "James Jellyfish", "patient": { "diagnosisType": "type1", "diagnosisDate": "2013-05-09", "birthday": "2012-08-30", "biologicalSex": "male", "targetDevices": [], "targetTimezone": "US/Eastern", "about": "Jellyman is awesome!" } }

Get User's Private Metadata Item

Request

Returns the named item from the user's private metadata collection.

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

fieldNamestringrequired

Metadata Field Name

curl -i -X GET \
  'https://tidepool.redocly.app/_mock/reference/metadata.v1/metadata/{userId}/private/{fieldName}' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

List Users

Request

List all users who have trustee or trustor access to the user account identified by userId.

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

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

Responses

Success

Bodyapplication/jsonArray [
Any of:
emailVerifiedboolean(User Email Verification Status)

true if the user has verified their email address. false or not present if the user has not verified their email address.

Example: true
emailsArray of strings(email)(User Email Addresses)non-emptyunique
Example: ["example@tidepool.org"]
termsAcceptedstring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
rolesArray of strings(User Roles)>= 0 itemsunique
Items Value"clinic"
Example: ["clinic"]
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

usernamestring(email)(Email Address)>= 6 characters

An email address, as specified by RFC 5322.

Example: "example@tidepool.org"
profileUser Profile (object) or Clinician Profile (object) or Patient Profile (object)(Profile)

Profiles used by Tidepool Web

Any of:

User profile used by Tidepool Web

trusteePermissionsOwner (object) or Custodian (object) or View (object) or Notes (object) or Upload (object)(User Permissions)non-emptyrequired

Access permissions granted to a single user.

Example: {"note":{},"upload":{},"view":{}}
Any of:

Full account owner access permission.

non-empty
trusteePermissions.​rootobject(Permission)

The presence of this object indicates that the user has been granted the named permission.

Example: {}
]
Response
application/json
[ { "emailVerified": true, "emails": [], "termsAccepted": "2017-02-06T02:37:46Z", "roles": [], "userid": "string", "username": "example@tidepool.org", "profile": {}, "trusteePermissions": {} } ]