Get Athlete Stats

strava.get_athlete_stats
ActionBusiness appsconnection required

Calls the Strava API with the connection's credentials.

Read an athlete's lifetime, year-to-date and recent activity totals.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Strava
Secret shape
{"client_id": "…", "client_secret": "…", "refresh_token": "…"}
Resolved by
config.connection_id, else node.connection_id

Configuration

1 field, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
athlete_id
Numeric id of the athlete, from strava.get_athlete. Strava only returns totals for the athlete the connection's token belongs to.
stringYes——1234567

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "athlete_id": "1234567"
}

Output

One shape.

result

FieldTypeExample
biggest_ride_distance
Longest ride ever, in metres.
number—
biggest_climb_elevation_gain
Highest elevation gain in a single activity, in metres.
number—
recent_run_totals.count
Runs in the last four weeks.
number—
recent_ride_totals.count
Rides in the last four weeks.
number—
ytd_run_totals.distance
Metres run so far this year.
number—
ytd_ride_totals.distance
Metres ridden so far this year.
number—
all_run_totals.count
Runs ever recorded.
number—
all_ride_totals.count
Rides ever recorded.
number—
{
  "all_ride_totals": {
    "count": 0
  },
  "all_run_totals": {
    "count": 0
  },
  "biggest_climb_elevation_gain": 0,
  "biggest_ride_distance": 0,
  "recent_ride_totals": {
    "count": 0
  },
  "recent_run_totals": {
    "count": 0
  },
  "ytd_ride_totals": {
    "distance": 0
  },
  "ytd_run_totals": {
    "distance": 0
  }
}

See Get Athlete Stats run in a workflow.

In a technical demo we add the Strava connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.