The /dataRange endpoint enables retrieval of a user's earliest and latest times for calibration, EGV, and event records. This can be used to efficiently pull historical data and determine whether new data is available.
GET /v3/users/self/dataRange
OAuth 2.0 bearer token; see the Authentication section for details on this workflow.
For the systemTime and displayTime response fields, records sourced from mobile apps (with displayDevice of “iOS” or “android”) will have UTC offsets; records sourced from receivers (with displayDevice of “receiver”) will not have UTC offsets.
Ok
curl -i -X GET \ 'https://api.dexcom.com/v3/users/self/dataRange?lastSyncTime=2019-08-24T14%3A15%3A22Z' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "recordType": "dataRange",
- "recordVersion": "3.0",
- "userId": "5b329ebcfbf2f0ba7e49d4c5eb57775468f5ee657ac16fcde07e1fd08197b4c7",
- "calibrations": {
- "start": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}, - "end": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}
}, - "egvs": {
- "start": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}, - "end": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}
}, - "events": {
- "start": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}, - "end": {
- "systemTime": "2021-06-01T01:10:08",
- "displayTime": "2021-06-01T01:10:08"
}
}
}