GET /events

This page documents an old version of the endpoint. The newest version, v2, is documented here.

 

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.

Scopes & Access

 

Resource

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

startDate

DateTime

Beginning of the time window

endDate

DateTime

End of the time window

 

Request Example

 

Response Example

{
  "events": [
    {
      "systemTime": "2017-06-16T19:45:00",
      "displayTime": "2017-06-16T11:45:00",
      "eventType": "exercise",
      "eventSubType": "medium",
      "value": 42,
      "unit": "minutes"
    },
    {
      "systemTime": "2017-06-16T18:57:00",
      "displayTime": "2017-06-16T10:57:00",
      "eventType": "insulin",
      "eventSubType": null,
      "value": 1.25,
      "unit": "units"
    },
    {
      "systemTime": "2017-06-16T18:53:00",
      "displayTime": "2017-06-16T10:53:00",
      "eventType": "carbs",
      "eventSubType": null,
      "value": 32,
      "unit": "grams"
    },
    {
      "systemTime": "2017-06-16T17:18:00",
      "displayTime": "2017-06-16T09:18:00",
      "eventType": "health",
      "eventSubType": "lowSymptoms",
      "value": null,
      "unit": null
    }
  ]
}

 

 

Response Fields

Name

Type

Description

events

Array

Array of events

 
The events array fields are as follows
 

Name

Type

Description

Enumeration

systemTime

DateTime

Time according to the system clock for the event; nominally UTC

 

displayTime

DateTime

Time displayed on the receiving device for the event

 

eventType

String

Name of the event

  • "carbs"
  • "insulin"
  • "exercise"
  • "health"

eventSubType

String

Additional event description corresponding to eventType field

(nullable)

  • for eventType"carbs": null
  • for eventType"insulin": null
  • for eventType"exercise":
    • "light"
    • "medium"
    • "heavy"
  • for eventType"health":
    • "illness"
    • "stress"
    • "highSymptoms"
    • "lowSymptoms"
    • "cycle"
    • "alcohol"

value

Float

Value of input

(nullable)

 

unit

String

Unit of measurement for the value field

(nullable)

  • for eventType"carbs": "grams"
  • for eventType"insulin": "units"
  • for eventType"exercise": "minutes"
  • for eventType"health": null