Retrieve an activity
GET/clubs/{connection_id}/activity/{id}
Parameters
fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection
idstring required
ID of the Activity
Returns
| Response field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique identifier for this activity (not provided by ClubActivity) |
created_at | string (date-time) | No | The date that this activity was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
updated_at | string (date-time) | No | The last date that this activity was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
group_id | string | No | The group this activity was listed under (reference to HrisGroup) |
name | string | No | The name of the activity |
description | string | No | The description of the activity (DetailedActivity only) |
type | enum | No | The activity type Values: RUNNING, CYCLING, SWIMMING, TRIATHLON, WALKING, HIKING, OTHER |
athlete_id | string | No | The id of the athlete who performed the activity (DetailedActivity only) |
athlete_name | string | No | The full name of the athlete |
distance | number | No | The activity's distance, in meters |
moving_time | number | No | The activity's moving time, in seconds |
elapsed_time | number | No | The activity's elapsed time, in seconds |
total_elevation_gain | number | No | The activity's total elevation gain, in meters |
elevation_high | number | No | The activity's highest elevation, in meters (DetailedActivity only) |
elevation_low | number | No | The activity's lowest elevation, in meters (DetailedActivity only) |
start_at | string (date-time) | No | When the activity started (UTC) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
timezone | string | No | The timezone of the activity |
achievement_count | number | No | The number of achievements gained during this activity |
kudos_count | number | No | The number of kudos given for this activity |
comment_count | number | No | The number of comments for this activity |
athlete_count | number | No | The number of athletes that took part in this activity |
photo_count | number | No | The number of Instagram photos for this activity |
average_speed | number | No | The activity's average speed, in meters per second |
max_speed | number | No | The activity's max speed, in meters per second |
average_cadence | number | No | The activity's average cadence |
average_heartrate | number | No | The activity's average heart rate, in beats per minute |
max_heartrate | number | No | The activity's max heart rate, in beats per minute |
average_watts | number | No | The activity's average power output, in watts |
max_watts | number | No | The activity's max power output, in watts |
weighted_average_watts | number | No | The activity's weighted average power output, in watts |
kilojoules | number | No | The total work done, in kilojoules |
calories | number | No | The number of kilocalories consumed during this activity |
has_heartrate | boolean | No | Whether the activity has heart rate data |
is_trainer | boolean | No | Whether this activity was recorded on a training machine |
is_commute | boolean | No | Whether this activity is a commute |
is_manual | boolean | No | Whether this activity was created manually |
is_private | boolean | No | Whether this activity is private |
map_polyline | string | No | The detailed polyline of the activity's map |
map_summary_polyline | string | No | The summary polyline of the activity's map |
workout_type | number | No | The activity's workout type |
suffer_score | number | No | The activity's relative effort score |
pr_count | number | No | The number of personal records set during this activity |
Errors
Errors return the HTTP status code and a JSON body with statusCode, error (the short label) and message (a human-readable detail).
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests to unified.to API; max requests per minute: N"
}| Status | Error | Meaning |
|---|---|---|
400 | Bad Request | The request was malformed or failed validation. |
401 | Unauthorized | The connection is likely broken; re-authorize it. |
403 | Forbidden | The connection is missing permissions or scopes. |
404 | Not Found | The requested resource does not exist. |
429 | Too Many Requests | Rate limit exceeded (see the two sources below). |
500 | Internal Server Error | An unexpected error occurred. |
501 | Not Implemented | Not supported by this integration. |
Errors from the underlying integration pass through: the integration's status comes back as ours (429, 401, 403, 404 or 5xx), usually with its message. When the integration's error body is unclear, Unified extracts what it can and returns a clearer message.
429 Too Many Requests
A 429 has two possible sources:
- The integration's own rate limit, passed through.
- Unified's workspace limit: a rolling 60 seconds, set by plan, with the message
Too many requests to unified.to API; max requests per minute: N.
const options = {
method: 'GET',
url: 'https://api.unified.to/clubs/5de520f96e439b002043d8dc/activity/5de520f96e439b002043d8d8',
headers: {
authorization: 'bearer .....'
},
params: {
fields: '',
raw: '',
}
};
const results = await axios.request(options); Are we missing anything? Let us know