# Metrics API 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](../docs/quick-start.md) section. Version: 1.0 License: BSD-2-Clause ## Servers 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 ``` ## Security ### sessionToken Tidepool Session Token Type: apiKey In: header Name: X-Tidepool-Session-Token ## Download OpenAPI description [Metrics API](https://tidepool.redocly.app/_spec/reference/metrics.v1.yaml) ## 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. ### Record Metrics Event for Server - [GET /metrics/server/{serverName}/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/internal/recordmetricseventforserver.md): Records a new metrics event on behalf of a server. This API requires a session token, and it must be a valid server token. Any query parameters supplied with the request will be recorded as part of the event. ### Record Metrics Event for User - [GET /metrics/user/{userId}/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/metrics/recordmetricseventfornameduser.md): Records a new metrics event for the user identified by the parameter. This API does not require a session token, but if one is provided it must be a valid token. The parameter is not validated. Any query parameters supplied with the request will be recorded as part of the event. ### Record Metrics Event for Logged-In User - [GET /metrics/thisuser/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/metrics/recordmetricseventforloggedinuser.md): 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 parameter is extracted from the session token. Any query parameters supplied with the request will be recorded as part of the event. ### Record Metrics Event for Server - [GET /metrics/server/{serverName}/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/metrics/recordmetricseventforserver.md): Records a new metrics event on behalf of a server. This API requires a session token, and it must be a valid server token. Any query parameters supplied with the request will be recorded as part of the event. ## Internal APIs intended for internal use by Tidepool. ### Record Metrics Event for Server - [GET /metrics/server/{serverName}/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/internal/recordmetricseventforserver.md): Records a new metrics event on behalf of a server. This API requires a session token, and it must be a valid server token. Any query parameters supplied with the request will be recorded as part of the event. ### Record Metrics Event for Server - [GET /metrics/server/{serverName}/{eventName}](https://tidepool.redocly.app/reference/metrics.v1/metrics/recordmetricseventforserver.md): Records a new metrics event on behalf of a server. This API requires a session token, and it must be a valid server token. Any query parameters supplied with the request will be recorded as part of the event.