APIs intended for internal use by Tidepool.
- Record Metrics Event for User
Metrics 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.
https://tidepool.redocly.app/_mock/reference/metrics.v1/
https://external.integration.tidepool.org/
https://api.tidepool.org/
https://dev1.dev.tidepool.org/
https://qa1.development.tidepool.org/
https://qa2.development.tidepool.org/
Metrics
Record metrics events.
These metrics APIs are intended for use by Tidepool products to capture free-form metrics events. The APIs have no request body, nor do they return any meaningful responses. There are very few constraints or validation of the input parameters. Any number of additional query parameters can be included in the API requests, and they are recorded along with the metrics event. It is OK to send them asynchronously in a fire-and-forget manner.
Request
Records a new metrics event for the user identified by the userId
parameter. This API does not require a session token, but if one is provided it must be a valid token. The userId
parameter is not validated. Any query parameters supplied with the request will be recorded as part of the event.
Tidepool User ID
Client-defined event name. The metrics service imposes no restrictions on the event name. The event name must be URL-safe, or encoded as such, as it is sent as part of the URL path. Current best practice is to prefix the event name with the client application name, such as blip
, followed by the actual event name, such as Viewed Care Team List
. The resulting full event name might be blip - Viewed Care Team List
, but encoded in URL-safe manner (i.e. converting spaces to %20
). This allows differentiation between recording similar events by different client applications.
- Mock server
https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/user/{userId}/{eventName}
- integration
https://external.integration.tidepool.org/metrics/user/{userId}/{eventName}
- production
https://api.tidepool.org/metrics/user/{userId}/{eventName}
- dev1
https://dev1.dev.tidepool.org/metrics/user/{userId}/{eventName}
- qa1
https://qa1.development.tidepool.org/metrics/user/{userId}/{eventName}
- qa2
https://qa2.development.tidepool.org/metrics/user/{userId}/{eventName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/user/{userId}/blip%20-%20Viewed%20Care%20Team%20List' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
Request
Records a new metrics event for the user identified by the session token. This API requires a session token, and it must be a valid user token. The userId
parameter is extracted from the session token. Any query parameters supplied with the request will be recorded as part of the event.
Client-defined event name. The metrics service imposes no restrictions on the event name. The event name must be URL-safe, or encoded as such, as it is sent as part of the URL path. Current best practice is to prefix the event name with the client application name, such as blip
, followed by the actual event name, such as Viewed Care Team List
. The resulting full event name might be blip - Viewed Care Team List
, but encoded in URL-safe manner (i.e. converting spaces to %20
). This allows differentiation between recording similar events by different client applications.
- Mock server
https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/thisuser/{eventName}
- integration
https://external.integration.tidepool.org/metrics/thisuser/{eventName}
- production
https://api.tidepool.org/metrics/thisuser/{eventName}
- dev1
https://dev1.dev.tidepool.org/metrics/thisuser/{eventName}
- qa1
https://qa1.development.tidepool.org/metrics/thisuser/{eventName}
- qa2
https://qa2.development.tidepool.org/metrics/thisuser/{eventName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/thisuser/blip%20-%20Viewed%20Care%20Team%20List \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
Server-defined server name. The metrics service imposes no restrictions on the server name. The server name must be URL-safe, or encoded as such, as it is sent as part of the URL path.
Client-defined event name. The metrics service imposes no restrictions on the event name. The event name must be URL-safe, or encoded as such, as it is sent as part of the URL path. Current best practice is to prefix the event name with the client application name, such as blip
, followed by the actual event name, such as Viewed Care Team List
. The resulting full event name might be blip - Viewed Care Team List
, but encoded in URL-safe manner (i.e. converting spaces to %20
). This allows differentiation between recording similar events by different client applications.
- Mock server
https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/server/{serverName}/{eventName}
- integration
https://external.integration.tidepool.org/metrics/server/{serverName}/{eventName}
- production
https://api.tidepool.org/metrics/server/{serverName}/{eventName}
- dev1
https://dev1.dev.tidepool.org/metrics/server/{serverName}/{eventName}
- qa1
https://qa1.development.tidepool.org/metrics/server/{serverName}/{eventName}
- qa2
https://qa2.development.tidepool.org/metrics/server/{serverName}/{eventName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://tidepool.redocly.app/_mock/reference/metrics.v1/metrics/server/hydrophone/blip%20-%20Viewed%20Care%20Team%20List \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'