Request

The Metrics API gives you access to cycling specific weather metrics. The processing of your request may take a few seconds. This is due to the processing and retrieval of route and forecast data. We recommend to you prefetch and store the output, or display the output asynchronously, so as to avoid page loading issues.

Endpoint

POST | GET

https://mywindsock.com/api/metrics/v1/

Passing Credentials

Every request must include your access credentials. These can be passed by either in the request string. If you do not have an API Client ID you must apply here.

client_id

api_key

Passing Source Data

source
Required. Defines the type of source data
Allowed inputs: gpx | tcx | course | strava_segment | strava_route | strava_activity

url
Required for GPX or TCX sources.

id
Required for, Strava, Course or CTT sources.

timestamp (unix time)
Not required for TCX files unless the TCX route is to be used as a forecast. UTC timestamp for the forecast start. Timestamps that are in the past, will source observed conditions. Timestamps in the future will source forecast conditions.

Passing Athlete Parameters

For a customised forecast a Virtual Athlete must be defined. For forecasts this allows our models to calculate anticipated progress. For past rides this allows us to calculate metrics personalised to the athlete.

va=JSON Virtual Athlete Object

Virtual Athlete JSON Object

weight (float)
Required. In Kg the total weight of rider, bike and equipment combined.

watts_up (float)
Power in Watts, when ascending hills.

watts (float)
Required. Power in Watts, when riding on the flat.

watts_down (float)
Power in Watts, when descending.

dtl (float)
Expected losses from the drivetrain. Only required where power has been determined above the bicycle transmission.
Expected Value: 0-100

cda (float)
The average CdA, Aerodynamic efficiency.
Expected Value: >0.000

rr (float)
Rolling Resistnace Coefficient.
Expected Value: >0.0000

Selecting Output

output (comma separated list)

As default the following objects will be returned, averages, minvalues, maxvalues and totals. You can customise the output by including the ‘output’ parameter in your request. Note: the ‘totals object’ is always returned.

“&output=averages,totals” will include only the averages and totals objects.

Available objects are:

  • averages
  • minvalues
  • maxvalues
  • totals
  • stream_time
  • stream_distance
  • stream_temperature
  • stream_elevation
  • climbs
  • headwinds

Choosing Units

unit_speed (string)
Any speed values will be provided in the chosen unit. Default is kmh.
Expected Values: kmh | mph

unit_wind_speed (string)
Any wind speed values will be provided in the chosen unit. Default is ms.
Expected Values: ms | kmh | mph

Other Parmeters

tag (string)
Allows you to group your access requests in our reports.