Activities are specific types of physical activities that occur during a given period of time.

Get a list of activities the user has
GET https://api.humanapi.co/v1/human/activities

Returns a single activity
GET https://api.humanapi.co/v1/human/activities/{id}

# Returns a json array of activities:
[{
  "id": "5510259685cc310900f67753",
  "userId": "52e20cb2fff56aac62000001",
  "startTime": "2015-03-23T14:29:34.000Z",
  "endTime": "2015-03-23T14:30:17.000Z",
  "tzOffset": "-04:00",
  "type": "walking",
  "source": "moves",
  "duration": 43,
  "distance": 29,
  "steps": 57,
  "calories": 0,
  "sourceData": {
    "manual": false
  },
  "createdAt": "2015-03-23T14:39:19.065Z",
  "updatedAt": "2015-03-23T14:39:19.065Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}, {
  "id": "550fe4b58c34cc6661f46f66",
  "userId": "52e20cb2fff56aac62000001",
  "startTime": "2015-03-23T08:19:24.000Z",
  "endTime": "2015-03-23T08:31:26.000Z",
  "tzOffset": "+00:00",
  "type": "running",
  "source": "runkeeper",
  "duration": 722,
  "distance": 1506.71611260169,
  "steps": 0,
  "calories": 118,
  "sourceData": {},
  "createdAt": "2015-03-23T14:32:27.978Z",
  "updatedAt": "2015-03-23T14:32:27.978Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}, {
  "id": "550fbaa568d29c4133b6531a",
  "userId": "52e20cb2fff56aac62000001",
  "startTime": "2015-03-23T00:01:00.000Z",
  "endTime": "2015-03-23T06:32:00.000Z",
  "tzOffset": "-07:00",
  "type": "unknown",
  "source": "jawbone",
  "duration": 480,
  "distance": 669,
  "steps": 949,
  "calories": 25.2287654541,
  "sourceData": {},
  "createdAt": "2015-03-23T07:03:01.454Z",
  "updatedAt": "2015-03-23T13:36:29.756Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}]
# Get an activity by id
curl "https://api.humanapi.co/v1/human/activities/52e20cb2fff56aac62000001?access_token=demo"

# Returns a json object as activity:
{
  "id": "550fbaa568d29c4133b6531a",
  "userId": "52e20cb2fff56aac62000001",
  "startTime": "2015-03-23T00:01:00.000Z",
  "endTime": "2015-03-23T06:32:00.000Z",
  "tzOffset": "-07:00",
  "type": "unknown",
  "source": "jawbone",
  "duration": 480,
  "distance": 669,
  "steps": 949,
  "calories": 25.2287654541,
  "sourceData": {},
  "createdAt": "2015-03-23T07:03:01.454Z",
  "updatedAt": "2015-03-23T13:36:29.756Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}
# Get all activities associated with the user
curl -H "Authorization: Bearer demo" "https://api.humanapi.co/v1/human/activities"

Query Parameters

ParameterDescription
time_seriesAdd time_series=true to get time series data for activities. See below for details.

Response Properties

PropertyTypeDescription
idStringThe id of the resource.
userIdString[deprecated - use humanId]
humanIdStringUnique user identifier
startTimeDateThe start time of the activity in UTC time
endTimeDateThe end time of the activity in UTC time
tzOffsetStringThe offset from UTC time in +/-hh:mm (e.g. -04:00)
typeStringThe type of activity, such as walking, running, cycling
sourceStringThe name of the originating service
durationNumberThe duration in seconds
distanceNumberThe distance in meters
stepsNumberThe number of steps taken during the activity
caloriesNumberThe number of estimated calories burned during the activity
sourceDataObjectAdditional data from the source that does not fit into the Human API model
timeSeriesObjectTime series of data such as heart rate, gps location, distance, etc. See below for details.

Time Series

Add the query parameter time_series=true to retrieve the time series data if available.

The timeSeries object can have multiple embedded objects. Examples of possible objects include properties such as “heartRate”, “gps”, and “distance”.

The embedded objects have the following properties: