GET /events
Description
The /events
endpoint enables retrieval of a user's event records. This includes carbohydrate intake, insulin doses, exercise, and health events that are entered in the receiver interface or through the mobile app.
Resource
GET /v2/users/self/events
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 Example
Response Example
Response Fields
Name |
Type |
Description |
---|---|---|
|
Array |
Array of events |
events
array fields are as follows
Name |
Type |
Description |
Enumeration |
---|---|---|---|
|
DateTime |
Time according to the system clock for the event; nominally UTC |
|
|
DateTime |
Time displayed on the receiving device for the event |
|
|
String |
Name of the event |
|
|
String |
Additional event description corresponding to (nullable) |
|
|
Float |
Value of input (nullable) |
|
|
String |
Unit of measurement for the (nullable) |
|
|
String |
Unique ID for the event record |
|
|
String |
Status of the event record See the Notes section below for more details |
|
Notes
The G6 app enabled the ability to delete events after they have been created. To accomodate this, the eventId
and eventStatus
fields were introduced. When an event is initially created by the user, the eventStatus
is set to "created". If the user deletes the event, the eventStatus
will be changed to "deleted". The eventId
will remain the same.
For events generated by receiving devices that do not have the ability to delete events (such as the G4 and G5 apps), the eventStatus
field will always return "created".
The documentation for an earlier version of this endpoint is available here.