The /egvs endpoint enables retrieval of a user's estimated glucose value (EGV) data, including trend and status information.
GET /v2/users/self/egvs
OAuth 2.0 bearer token; see the Authentication section for details on this workflow.
The G6 generation of sensors and transmitters introduced the concept of retrospective data smoothing to estimated glucose values. This smoothing incorporates three consecutive EGVs to produce a clearer, more readable trace for the user. Because three consecutive EGVs are not always available—for example, at the beginning or end of a sensor session—some EGVs cannot be smoothed. In these cases, the realtimeValue will be populated with a number, but the smoothedValue will be null.
The rules for the value field are as follows:
The recommended method for consuming the /egvs endpoint is to use the value field.
Due to how data is uploaded and processed, some records that initially have a null smoothedValue may later have this field populated, with the value field also changing per the rules above.
For EGVs generated by G4 and G5 devices, the smoothedValue field will always return null as these systems do not have retrospective data smoothing.
startDate required | string <date-time> Beginning of the time window; see the discussion of time in the Endpoint Overview section for more details on how they relate to device information Example: startDate=2023-01-01T09:12:35 |
endDate required | string <date-time> End of the time window Example: endDate=2023-01-01T09:12:35 |
Ok
curl -i -X GET \ 'https://api.dexcom.com/v2/users/self/egvs?startDate=2023-01-01T09%3A12%3A35&endDate=2023-01-01T09%3A12%3A35' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "unit": "mg/dL",
- "rateUnit": "mg/dL/min",
- "egvs": [
- {
- "systemTime": "2019-08-24T14:15:22Z",
- "displayTime": "2019-08-24T14:15:22Z",
- "value": 122,
- "realtimeValue": 121,
- "smoothedValue": 122,
- "status": null,
- "trend": "flat",
- "trendRate": -0.5
}
]
}