Endpoint StructureΒΆ

https://api.lumobodytech.com/v1/users/me/activities?start_time=1397708448&end_time=1397709448&data_source=LUMO_BACK&offset=1397719448&granularity=day

All activity endpoints share a common request and response structure. Every request accepts start_time,end_time,data_source,offset, and granularity parameters. The start_time and end_time parameters are Unix timestamps specifying local times for the requested user. As an example 1422296628 is Mon, 26 Jan 2015 18:23:48 GMT, if that value were used as the start_time parameter it would be interpreted as Mon, 26 Jan 2015 18:23:48 in whatever the user’s timezone was at the time that data was submitted, so if the user is in California it would be interpreted as Mon, 26 Jan 2015 18:23:48 PST

The granularity parameter allows for aggregation of data returned by a given endpoint. Currently the only allowed value is “day”, which will cause all data between start_time and end_time to be aggregated by day. If the granularity parameter is not specified, data will be returned as-is in 5 minute increments.

All responses are organized as a top level object with two sub-objects ‘data’ and ‘metadata’, the data sub-object is a list of activity objects containing the following fields (with sample values):

  • dataSource: “LUMO_BACK”
  • dataType: “BAD_SITTING_POSTURE_LEFT”
  • value: 3
  • localTime: 1391689500

The value field may either be a count(for steps), a distance, or a number of seconds (for posture).

The data_source field may be used as a request parameter to filter for data coming from a specific Lumo compatible application. Currently, the two allowed values for this parameter are LUMO_BACK and LUMO_LIFT. If you develop your own mobile Lumo app and register an app id, you will be able to specify that app id as your data_source and thus effectively use the Lumo backend to store and retrieve your app’s data.

The metadata subobject contains information about the data that was returned. Currently, it only holds a ‘next’ field which is used for pagination purposes. For any request to the /activities endpoint or it related endpoints /activities/steps,etc., an offset parameter may be passed while set to the value of this next field. This is how to iterate through paginated responses, continue until next is equal to 0.

{ "data": [
    { "dataSource": "LUMO_BACK", "dataType": "BAD_SITTING_POSTURE_LEFT", "value": 3, "localTime": 1391689500 },
    { "dataSource": "LUMO_BACK", "dataType": "RUNNING_CALORIES", "value": 111, "localTime": 1391689500 },
    { "dataSource": "LUMO_BACK", "dataType": "TOTAL_STEPS", "value": 3, "localTime": 1391689500 } ],
    "metadata": { "next": 0 } }