app.thedistance.activity

thedistance.app

Documentation

A recorded physical activity such as a bike ride.

main record

A recorded physical activity such as a bike ride.

Record Key tid Timestamp-based ID

Properties

avgCadence integer Optional

Average cadence in revolutions per minute.

minimum: 0
avgHeartRate integer Optional

Average heart rate in beats per minute.

minimum: 0
avgPower integer Optional

Average power output in watts.

minimum: 0
avgSpeed string Optional

Average speed in meters per second. String-encoded decimal number.

maxLength: 64 bytes
calories integer Optional

Estimated calories burned.

minimum: 0
createdAt string datetime Required

Timestamp of when this record was created.

description string Optional

User-provided description of the activity.

maxLength: 3000 bytes
device string Optional

Name of the device that recorded the activity.

maxLength: 300 bytes
distance string Required

Total distance in meters. String-encoded decimal number, e.g. '51214.6'.

maxLength: 64 bytes
elapsedTime integer Required

Total elapsed time in seconds, including stopped time.

minimum: 0
elevationGain string Optional

Total elevation gain in meters. String-encoded decimal number.

maxLength: 64 bytes
elevationLoss string Optional

Total elevation loss in meters. String-encoded decimal number.

maxLength: 64 bytes
images array of ref #image Optional

Photos from the activity.

maxLength: 8 items
maxCadence integer Optional

Maximum cadence in revolutions per minute.

minimum: 0
maxHeartRate integer Optional

Maximum heart rate in beats per minute.

minimum: 0
maxPower integer Optional

Maximum power output in watts.

minimum: 0
maxSpeed string Optional

Maximum speed in meters per second. String-encoded decimal number.

maxLength: 64 bytes
movingTime integer Required

Time spent in motion in seconds.

minimum: 0
perceivedExertion integer Optional

Rate of perceived exertion (RPE), typically 1-10.

minimum: 0
polyline string Optional

Encoded polyline string representing a simplified, privacy-trimmed route for map display. Uses Google's encoded polyline algorithm format. Ingestion services should simplify polylines to fit within the 20,000 byte limit. This limit may be revisited if it proves insufficient.

maxLength: 20000 bytes
source string Optional

Where the activity data was imported from.

maxLength: 128 bytes
Known values: garmin, strava, wahoo, manual, fit-file, gpx-file
sourceId string Optional

Identifier for this activity in the source system, e.g. a Strava activity ID.

maxLength: 256 bytes
sportType string Required

The type of activity.

maxLength: 128 bytes
Known values: ride
startedAt string datetime Required

When the activity started.

title string Optional

User-provided name for the activity.

maxLength: 300 bytes
totalWork integer Optional

Total mechanical work in kilojoules.

minimum: 0
weather ref #weather Optional

Weather conditions during the activity.

weightedAvgPower integer Optional

Normalized/weighted average power in watts.

minimum: 0
View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "sportType",
      "startedAt",
      "elapsedTime",
      "movingTime",
      "distance",
      "createdAt"
    ],
    "properties": {
      "title": {
        "type": "string",
        "maxLength": 300,
        "description": "User-provided name for the activity."
      },
      "device": {
        "type": "string",
        "maxLength": 300,
        "description": "Name of the device that recorded the activity."
      },
      "images": {
        "type": "array",
        "items": {
          "ref": "#image",
          "type": "ref"
        },
        "maxLength": 8,
        "description": "Photos from the activity."
      },
      "source": {
        "type": "string",
        "maxLength": 128,
        "description": "Where the activity data was imported from.",
        "knownValues": [
          "garmin",
          "strava",
          "wahoo",
          "manual",
          "fit-file",
          "gpx-file"
        ]
      },
      "weather": {
        "ref": "#weather",
        "type": "ref",
        "description": "Weather conditions during the activity."
      },
      "avgPower": {
        "type": "integer",
        "minimum": 0,
        "description": "Average power output in watts."
      },
      "avgSpeed": {
        "type": "string",
        "maxLength": 64,
        "description": "Average speed in meters per second. String-encoded decimal number."
      },
      "calories": {
        "type": "integer",
        "minimum": 0,
        "description": "Estimated calories burned."
      },
      "distance": {
        "type": "string",
        "maxLength": 64,
        "description": "Total distance in meters. String-encoded decimal number, e.g. '51214.6'."
      },
      "maxPower": {
        "type": "integer",
        "minimum": 0,
        "description": "Maximum power output in watts."
      },
      "maxSpeed": {
        "type": "string",
        "maxLength": 64,
        "description": "Maximum speed in meters per second. String-encoded decimal number."
      },
      "polyline": {
        "type": "string",
        "maxLength": 20000,
        "description": "Encoded polyline string representing a simplified, privacy-trimmed route for map display. Uses Google's encoded polyline algorithm format. Ingestion services should simplify polylines to fit within the 20,000 byte limit. This limit may be revisited if it proves insufficient."
      },
      "sourceId": {
        "type": "string",
        "maxLength": 256,
        "description": "Identifier for this activity in the source system, e.g. a Strava activity ID."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "Timestamp of when this record was created."
      },
      "sportType": {
        "type": "string",
        "maxLength": 128,
        "description": "The type of activity.",
        "knownValues": [
          "ride"
        ]
      },
      "startedAt": {
        "type": "string",
        "format": "datetime",
        "description": "When the activity started."
      },
      "totalWork": {
        "type": "integer",
        "minimum": 0,
        "description": "Total mechanical work in kilojoules."
      },
      "avgCadence": {
        "type": "integer",
        "minimum": 0,
        "description": "Average cadence in revolutions per minute."
      },
      "maxCadence": {
        "type": "integer",
        "minimum": 0,
        "description": "Maximum cadence in revolutions per minute."
      },
      "movingTime": {
        "type": "integer",
        "minimum": 0,
        "description": "Time spent in motion in seconds."
      },
      "description": {
        "type": "string",
        "maxLength": 3000,
        "description": "User-provided description of the activity."
      },
      "elapsedTime": {
        "type": "integer",
        "minimum": 0,
        "description": "Total elapsed time in seconds, including stopped time."
      },
      "avgHeartRate": {
        "type": "integer",
        "minimum": 0,
        "description": "Average heart rate in beats per minute."
      },
      "maxHeartRate": {
        "type": "integer",
        "minimum": 0,
        "description": "Maximum heart rate in beats per minute."
      },
      "elevationGain": {
        "type": "string",
        "maxLength": 64,
        "description": "Total elevation gain in meters. String-encoded decimal number."
      },
      "elevationLoss": {
        "type": "string",
        "maxLength": 64,
        "description": "Total elevation loss in meters. String-encoded decimal number."
      },
      "weightedAvgPower": {
        "type": "integer",
        "minimum": 0,
        "description": "Normalized/weighted average power in watts."
      },
      "perceivedExertion": {
        "type": "integer",
        "minimum": 0,
        "description": "Rate of perceived exertion (RPE), typically 1-10."
      }
    }
  },
  "description": "A recorded physical activity such as a bike ride."
}
aspectRatio object

Width and height of the image, used for layout before the image loads.

Properties

height integer Required

No description available.

minimum: 1
width integer Required

No description available.

minimum: 1
View raw schema
{
  "type": "object",
  "required": [
    "width",
    "height"
  ],
  "properties": {
    "width": {
      "type": "integer",
      "minimum": 1
    },
    "height": {
      "type": "integer",
      "minimum": 1
    }
  },
  "description": "Width and height of the image, used for layout before the image loads."
}
image object

No description available.

Properties

alt string Optional

Alt text for the image.

maxLength: 3000 bytes
aspectRatio ref #aspectRatio Optional

No description available.

image blob Required

No description available.

maxSize: 10.0 MB
View raw schema
{
  "type": "object",
  "required": [
    "image"
  ],
  "properties": {
    "alt": {
      "type": "string",
      "maxLength": 3000,
      "description": "Alt text for the image."
    },
    "image": {
      "type": "blob",
      "accept": [
        "image/jpeg",
        "image/png",
        "image/webp"
      ],
      "maxSize": 10000000
    },
    "aspectRatio": {
      "ref": "#aspectRatio",
      "type": "ref"
    }
  }
}
weather object

Weather conditions observed during the activity.

Properties

apparentTemperature string Optional

Feels-like temperature in degrees Celsius. String-encoded decimal.

maxLength: 64 bytes
avgTemperature string Optional

Average device-measured temperature in degrees Celsius. String-encoded decimal.

maxLength: 64 bytes
cloudCover string Optional

Cloud cover as a percentage. String-encoded decimal.

maxLength: 64 bytes
condition string Optional

General weather condition, e.g. 'Clear', 'Cloudy', 'Rain'.

maxLength: 128 bytes
dewpoint string Optional

Dewpoint in degrees Celsius. String-encoded decimal.

maxLength: 64 bytes
humidity string Optional

Relative humidity as a percentage. String-encoded decimal.

maxLength: 64 bytes
maxTemperature string Optional

Maximum device-measured temperature in degrees Celsius. String-encoded decimal.

maxLength: 64 bytes
precipitationIntensity string Optional

Precipitation intensity in mm/hr. String-encoded decimal.

maxLength: 64 bytes
precipitationProbability string Optional

Precipitation probability as a percentage. String-encoded decimal.

maxLength: 64 bytes
precipitationType string Optional

Type of precipitation, e.g. 'rain', 'snow', 'sleet'.

maxLength: 64 bytes
pressure string Optional

Atmospheric pressure in hPa/mbar. String-encoded decimal.

maxLength: 64 bytes
temperature string Optional

Air temperature in degrees Celsius. String-encoded decimal.

maxLength: 64 bytes
uvIndex string Optional

UV index. String-encoded decimal.

maxLength: 64 bytes
visibility string Optional

Visibility distance in kilometers. String-encoded decimal.

maxLength: 64 bytes
windBearing string Optional

Wind direction in degrees (0-360). String-encoded decimal.

maxLength: 64 bytes
windGust string Optional

Wind gust speed in meters per second. String-encoded decimal.

maxLength: 64 bytes
windSpeed string Optional

Wind speed in meters per second. String-encoded decimal.

maxLength: 64 bytes
View raw schema
{
  "type": "object",
  "properties": {
    "uvIndex": {
      "type": "string",
      "maxLength": 64,
      "description": "UV index. String-encoded decimal."
    },
    "dewpoint": {
      "type": "string",
      "maxLength": 64,
      "description": "Dewpoint in degrees Celsius. String-encoded decimal."
    },
    "humidity": {
      "type": "string",
      "maxLength": 64,
      "description": "Relative humidity as a percentage. String-encoded decimal."
    },
    "pressure": {
      "type": "string",
      "maxLength": 64,
      "description": "Atmospheric pressure in hPa/mbar. String-encoded decimal."
    },
    "windGust": {
      "type": "string",
      "maxLength": 64,
      "description": "Wind gust speed in meters per second. String-encoded decimal."
    },
    "condition": {
      "type": "string",
      "maxLength": 128,
      "description": "General weather condition, e.g. 'Clear', 'Cloudy', 'Rain'."
    },
    "windSpeed": {
      "type": "string",
      "maxLength": 64,
      "description": "Wind speed in meters per second. String-encoded decimal."
    },
    "cloudCover": {
      "type": "string",
      "maxLength": 64,
      "description": "Cloud cover as a percentage. String-encoded decimal."
    },
    "visibility": {
      "type": "string",
      "maxLength": 64,
      "description": "Visibility distance in kilometers. String-encoded decimal."
    },
    "temperature": {
      "type": "string",
      "maxLength": 64,
      "description": "Air temperature in degrees Celsius. String-encoded decimal."
    },
    "windBearing": {
      "type": "string",
      "maxLength": 64,
      "description": "Wind direction in degrees (0-360). String-encoded decimal."
    },
    "avgTemperature": {
      "type": "string",
      "maxLength": 64,
      "description": "Average device-measured temperature in degrees Celsius. String-encoded decimal."
    },
    "maxTemperature": {
      "type": "string",
      "maxLength": 64,
      "description": "Maximum device-measured temperature in degrees Celsius. String-encoded decimal."
    },
    "precipitationType": {
      "type": "string",
      "maxLength": 64,
      "description": "Type of precipitation, e.g. 'rain', 'snow', 'sleet'."
    },
    "apparentTemperature": {
      "type": "string",
      "maxLength": 64,
      "description": "Feels-like temperature in degrees Celsius. String-encoded decimal."
    },
    "precipitationIntensity": {
      "type": "string",
      "maxLength": 64,
      "description": "Precipitation intensity in mm/hr. String-encoded decimal."
    },
    "precipitationProbability": {
      "type": "string",
      "maxLength": 64,
      "description": "Precipitation probability as a percentage. String-encoded decimal."
    }
  },
  "description": "Weather conditions observed during the activity."
}

Lexicon Garden

@