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
{
  "description": "A recorded physical activity such as a bike ride.",
  "key": "tid",
  "record": {
    "properties": {
      "avgCadence": {
        "description": "Average cadence in revolutions per minute.",
        "minimum": 0,
        "type": "integer"
      },
      "avgHeartRate": {
        "description": "Average heart rate in beats per minute.",
        "minimum": 0,
        "type": "integer"
      },
      "avgPower": {
        "description": "Average power output in watts.",
        "minimum": 0,
        "type": "integer"
      },
      "avgSpeed": {
        "description": "Average speed in meters per second. String-encoded decimal number.",
        "maxLength": 64,
        "type": "string"
      },
      "calories": {
        "description": "Estimated calories burned.",
        "minimum": 0,
        "type": "integer"
      },
      "createdAt": {
        "description": "Timestamp of when this record was created.",
        "format": "datetime",
        "type": "string"
      },
      "description": {
        "description": "User-provided description of the activity.",
        "maxLength": 3000,
        "type": "string"
      },
      "device": {
        "description": "Name of the device that recorded the activity.",
        "maxLength": 300,
        "type": "string"
      },
      "distance": {
        "description": "Total distance in meters. String-encoded decimal number, e.g. '51214.6'.",
        "maxLength": 64,
        "type": "string"
      },
      "elapsedTime": {
        "description": "Total elapsed time in seconds, including stopped time.",
        "minimum": 0,
        "type": "integer"
      },
      "elevationGain": {
        "description": "Total elevation gain in meters. String-encoded decimal number.",
        "maxLength": 64,
        "type": "string"
      },
      "elevationLoss": {
        "description": "Total elevation loss in meters. String-encoded decimal number.",
        "maxLength": 64,
        "type": "string"
      },
      "images": {
        "description": "Photos from the activity.",
        "items": {
          "ref": "#image",
          "type": "ref"
        },
        "maxLength": 8,
        "type": "array"
      },
      "maxCadence": {
        "description": "Maximum cadence in revolutions per minute.",
        "minimum": 0,
        "type": "integer"
      },
      "maxHeartRate": {
        "description": "Maximum heart rate in beats per minute.",
        "minimum": 0,
        "type": "integer"
      },
      "maxPower": {
        "description": "Maximum power output in watts.",
        "minimum": 0,
        "type": "integer"
      },
      "maxSpeed": {
        "description": "Maximum speed in meters per second. String-encoded decimal number.",
        "maxLength": 64,
        "type": "string"
      },
      "movingTime": {
        "description": "Time spent in motion in seconds.",
        "minimum": 0,
        "type": "integer"
      },
      "perceivedExertion": {
        "description": "Rate of perceived exertion (RPE), typically 1-10.",
        "minimum": 0,
        "type": "integer"
      },
      "polyline": {
        "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.",
        "maxLength": 20000,
        "type": "string"
      },
      "source": {
        "description": "Where the activity data was imported from.",
        "knownValues": [
          "garmin",
          "strava",
          "wahoo",
          "manual",
          "fit-file",
          "gpx-file"
        ],
        "maxLength": 128,
        "type": "string"
      },
      "sourceId": {
        "description": "Identifier for this activity in the source system, e.g. a Strava activity ID.",
        "maxLength": 256,
        "type": "string"
      },
      "sportType": {
        "description": "The type of activity.",
        "knownValues": [
          "ride"
        ],
        "maxLength": 128,
        "type": "string"
      },
      "startedAt": {
        "description": "When the activity started.",
        "format": "datetime",
        "type": "string"
      },
      "title": {
        "description": "User-provided name for the activity.",
        "maxLength": 300,
        "type": "string"
      },
      "totalWork": {
        "description": "Total mechanical work in kilojoules.",
        "minimum": 0,
        "type": "integer"
      },
      "weather": {
        "description": "Weather conditions during the activity.",
        "ref": "#weather",
        "type": "ref"
      },
      "weightedAvgPower": {
        "description": "Normalized/weighted average power in watts.",
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "sportType",
      "startedAt",
      "elapsedTime",
      "movingTime",
      "distance",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}
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
{
  "description": "Width and height of the image, used for layout before the image loads.",
  "properties": {
    "height": {
      "minimum": 1,
      "type": "integer"
    },
    "width": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "width",
    "height"
  ],
  "type": "object"
}
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
{
  "properties": {
    "alt": {
      "description": "Alt text for the image.",
      "maxLength": 3000,
      "type": "string"
    },
    "aspectRatio": {
      "ref": "#aspectRatio",
      "type": "ref"
    },
    "image": {
      "accept": [
        "image/jpeg",
        "image/png",
        "image/webp"
      ],
      "maxSize": 10000000,
      "type": "blob"
    }
  },
  "required": [
    "image"
  ],
  "type": "object"
}
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
{
  "description": "Weather conditions observed during the activity.",
  "properties": {
    "apparentTemperature": {
      "description": "Feels-like temperature in degrees Celsius. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "avgTemperature": {
      "description": "Average device-measured temperature in degrees Celsius. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "cloudCover": {
      "description": "Cloud cover as a percentage. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "condition": {
      "description": "General weather condition, e.g. 'Clear', 'Cloudy', 'Rain'.",
      "maxLength": 128,
      "type": "string"
    },
    "dewpoint": {
      "description": "Dewpoint in degrees Celsius. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "humidity": {
      "description": "Relative humidity as a percentage. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "maxTemperature": {
      "description": "Maximum device-measured temperature in degrees Celsius. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "precipitationIntensity": {
      "description": "Precipitation intensity in mm/hr. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "precipitationProbability": {
      "description": "Precipitation probability as a percentage. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "precipitationType": {
      "description": "Type of precipitation, e.g. 'rain', 'snow', 'sleet'.",
      "maxLength": 64,
      "type": "string"
    },
    "pressure": {
      "description": "Atmospheric pressure in hPa/mbar. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "temperature": {
      "description": "Air temperature in degrees Celsius. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "uvIndex": {
      "description": "UV index. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "visibility": {
      "description": "Visibility distance in kilometers. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "windBearing": {
      "description": "Wind direction in degrees (0-360). String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "windGust": {
      "description": "Wind gust speed in meters per second. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    },
    "windSpeed": {
      "description": "Wind speed in meters per second. String-encoded decimal.",
      "maxLength": 64,
      "type": "string"
    }
  },
  "type": "object"
}

Lexicon Garden

@