POST /statistics
Description
The /statistics
endpoint enables retrieval of a user's summary statistics, including averages, quartiles, and measures of variance. Additionally, time in range based on customizable glycemic ranges and the hypoglycemia risk metric available to users through Dexcom CLARITY® are provided.
Resource
POST /v2/users/self/statistics
Authorization
OAuth 2.0 bearer token; see the Authentication section for details on this workflow.
Query Parameters
These query parameters specify the time window for the requested data; both are required. See the discussion of time in the Endpoint Overview section for more details on how they relate to device information.
Name 
Type 
Description 


DateTime 
Beginning of the time window 

DateTime 
End of the time window 
Request Body Example
In order to calculate the statistics based on target ranges, one or more named time ranges and associated target EGV ranges are required. These are passed in the request body in JSON format. The time ranges must cover the entire 24hour period and not overlap. If the request body is not included or violates these rules, a 400 (Bad Request) error will be returned.
Request Body Fields
Name 
Type 
Description 


String 
Reference name for the time window 

Time 
Beginning of the time window 

Time 
End of the time window 

Array 
Array containing the minimum and maximum EGV defining the target range 
egvRanges
array fields are as follows
Name 
Type 
Description 


String 
Name of for the EGV threshold used for calculations; the following must be included:


Float 
The value of the EGV threshold; must follow the rule: "urgentLow" < "low" < "high" 
Request Example
Response Example
Response Fields
Name 
Type 
Description 


String 
Risk for the patient to have future hypoglycemic events; see additional notes below (nullable) 

Float 
Minimum of all EGV data for given date range 

Float 
Maximum of all EGV data for given date range 

Float 
Mean of all EGV data for given date range 

Float 
Median of all EGV data for given date range 

Float 
Statistical variance of glucose level for given date range 

Float 
Standard deviation of all EGV data for given date range 

Float 
Sum of all EGV data for given date range 

Float 
First quartile of all EGV data for given date range 

Float 
Second quartile of all EGV data for given date range 

Float 
Third quartile of all EGV data for given date range 

Float 
Percent CGM sensor was utilized for given date range 

Float 
Mean number of calibrations per day for given date range 

Integer 
Number of calendar days contributing data to the statistics calculations; only days containing EGV data are included in this count 

Integer 
Total number of EGV observations for given date range 

Integer 
Number of EGV observations below urgentLow bound (exclusive) specified in 

Integer 
Number of EGV observations below low bound (exclusive) and above urgentLow bound (inclusive) specified in 

Integer 
Number of EGV observations between high bound (inclusive) and above low bound (inclusive) specified in 

Integer 
Number of EGV observations above high bound (exclusive) specified in 

Float 
Percentage of EGV observations below urgentLow bound (exclusive) specified in 

Float 
Percentage of EGV observations below low bound (exclusive) and above urgentLow bound (inclusive) specified in 

Float 
Percentage of EGV observations between high bound (inclusive) and above low bound (inclusive) specified in 

Float 
Percentage of EGV observations above high bound (exclusive) specified in 
Notes
Statistics are calculated using the value
field from the /egvs
endpoints. See the GET /egvs page for more details.
Additional notes for hypoglycemiaRisk
:
This calculation estimates the risk for severe hypoglycemia. It is based on a combination of the number of times glucose was low, the magnitude of the low glucose and for how long there was low glucose.
Experiencing frequent lower measured glucose values for short durations has more impact than minimal hypoglycemia for longer periods but with less frequency. Having more frequent lows for longer durations and at lower glucose levels carries a high risk for severe hypoglycemia. The hypoglycemia risk complements the patient’s A1C measurements. Patients can have low or high A1C and still be at low, medium or high hypoglycemia risk. The impact of hypoglycemic risk on patients and diabetes management should be reviewed by a healthcare professional.
The hypoglycemia risk estimation is calculated from a minimum amount of days with a minimum duration of CGM wear time as follows:
 When number of days in date range is less than 20 days, at least 12 days in date range with utilizationPercent greater than or equal to 66%.
 When number of days in date range is greater than or equal to 20 days, at least 60% of total days in date range with utilizationPercent greater than or equal to 66%.
Clinical References:
Kovatchev, B, et al. Algorithmic Evaluation of Metabolic Control and Risk of Severe Hypoglycemia in Type 1 and Type 2 Diabetes Using SelfMonitoring Blood Glucose Data. Diabetes Technology and Therapeutics, 5(5): 817828, 2003. PubMed Link
Clarke W, Kovatchev B. Statistical Tools to Analyze Continuous Glucose Monitor Data. Diabetes Technology & Therapeutics. 2009; 11(Suppl 1): S45S54. doi:10.1089/dia.2008.0138. PubMed Link
Hypoglycemia Risk corresponds to the risk categories from these studies:
 "minimal" corresponds to Minimal Risk in the studies
 "low" corresponds to Low Risk in the studies
 "moderate" corresponds to Moderate Risk in the studies
 "high" corresponds to High Risk in the studies
The documentation for an earlier version of this endpoint is available here.