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 /v1/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 

name 
String 
Reference name for the time window 
startTime 
Time 
Beginning of the time window 
endTime  Time  End of the time window 
egvRange  Array  Array containing the minimum and maximum EGV defining the target range 
The egvRange
array fields are as follows
Name 
Type 
Description 


Float 
Minimum value for the EGV range (inclusive) 

Float 
Maximum value for the EGV range (inclusive) 
Request Example
Response Example
Response Fields
Name 
Type 
Description 


String 
Risk for the patient to have future hypoglycemic events; see additional notes below (nullable) 
min  Float  Minimum of all EGV data for given date range 
max  Float  Maximum of all EGV data for given date range 
mean  Float  Mean of all EGV data for given date range 
median  Float  Median of all EGV data for given date range 
variance  Float  Statistical variance of glucose level for given date range 
stdDev  Float  Standard deviation of all EGV data for given date range 
sum  Float  Sum of all EGV data for given date range 
q1  Float  First quartile of all EGV data for given date range 
q2  Float  Second quartile of all EGV data for given date range 
q3  Float  Third quartile of all EGV data for given date range 
utilizationPercent  Float  Percent CGM sensor was utilized for given date range 
meanDailyCalibrations  Float  Mean number of calibrations per day for given date range 
nDays  Integer  Number of calendar days contributing data to the statistics calculations; only days containing EGV data are included in this count 
nValues  Integer  Total number of EGV observations for given date range 
nBelowRange  Integer  Number of EGV observations below min value specified in egvRange array 
nWithinRange  Integer  Number of EGV observations between min and max values specified in egvRange array (inclusive) 
nAboveRange  Integer  Number of EGV observations above max value specified in egvRange array 
percentBelowRange  Float  Percentage of EGV observations below min value specified in egvRange array 
percentWithinRange  Float  Percentage of EGV observations between min and max values specified in egvRange array (inclusive) 
percentAboveRange  Float  Percentage of EGV observations above max value specified in egvRange array 
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