Skip to content

WorkoutLog Schema

A WorkoutLog represents a completed strength training session with actual performance data.

Interactive Explorer

Loading schema...

Top-Level Properties

FieldTypeRequiredDescription
datestring (date-time)YesWhen the workout occurred (ISO 8601 with timezone)
exercisesExerciseLog[]YesThe exercises performed
namestringNoUser-defined workout name (max 200 chars)
notesstringNoFree-form session notes (max 10,000 chars)
durationSecondsintegerNoTotal workout duration in seconds
templateIdstringNoReference to the template this log was created from

ExerciseLog

A single exercise performed within a workout.

FieldTypeRequiredDescription
exerciseExerciseYesWhich exercise was performed
setsSetLog[]YesThe sets performed (min 1)
orderintegerNoPosition in workout (1-indexed)
notesstringNoNotes specific to this exercise
supersetIdintegerNoGroups exercises into supersets

Exercise

Describes which exercise was performed.

FieldTypeRequiredDescription
namestringYesHuman-readable exercise name (1-200 chars)
equipmentstringNoEquipment used (see recommended values)
categorystringNoBody part or category
musclesWorkedstring[]NoSpecific muscles targeted

barbell, dumbbell, kettlebell, cable, machine, bodyweight, ez-bar, trap-bar, smith-machine, resistance-band, suspension

chest, back, shoulders, arms, legs, core, full-body, olympic, cardio

SetLog

A single set within an exercise.

FieldTypeRequiredDescription
repsintegerNoRepetitions completed (0 = failed attempt)
weightnumberNoWeight used
unit"kg" | "lb"ConditionalRequired if weight is present
durationSecondsintegerNoTime for timed exercises
distancenumberNoDistance for carries, sled work
distanceUnit"m" | "km" | "ft" | "mi" | "yd"ConditionalRequired if distance is present
rpenumber (0-10)NoRate of Perceived Exertion
ririntegerNoReps In Reserve
toFailurebooleanNoWhether the set was taken to failure
typestringNoSet type (default: "working")
restSecondsintegerNoRest taken after this set
tempostringNoTempo notation (e.g., "3-1-2-0")
notesstringNoNotes for this specific set

working, warmup, dropset, backoff, amrap, cluster, myo, rest-pause, failure

Tempo Pattern

Tempo must match the pattern: eccentric-pause-concentric-pause

Examples: 3-1-2-0, 4-0-1-0, 2-0-X-0 (X = explosive)

Conditional Validation

The schema enforces these rules:

  1. If weight is present, unit must also be present
  2. If distance is present, distanceUnit must also be present

Example

json
{
  "date": "2024-01-15T09:30:00Z",
  "name": "Push Day",
  "durationSeconds": 3600,
  "exercises": [
    {
      "exercise": {
        "name": "Barbell Bench Press",
        "equipment": "barbell",
        "category": "chest"
      },
      "sets": [
        {
          "reps": 5,
          "weight": 100,
          "unit": "kg",
          "rpe": 7
        },
        {
          "reps": 5,
          "weight": 100,
          "unit": "kg",
          "rpe": 7.5
        },
        {
          "reps": 5,
          "weight": 100,
          "unit": "kg",
          "rpe": 8
        }
      ]
    },
    {
      "exercise": {
        "name": "Incline Dumbbell Press",
        "equipment": "dumbbell",
        "category": "chest"
      },
      "sets": [
        {
          "reps": 10,
          "weight": 30,
          "unit": "kg"
        },
        {
          "reps": 10,
          "weight": 30,
          "unit": "kg"
        },
        {
          "reps": 8,
          "weight": 30,
          "unit": "kg"
        }
      ]
    }
  ],
  "notes": "Felt strong today. Bench press moving well."
}

Full Schema

Click to expand full JSON Schema
json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://openweight.org/schemas/workout-log.schema.json",
  "title": "WorkoutLog",
  "description": "A completed strength training session",
  "type": "object",
  "required": [
    "date",
    "exercises"
  ],
  "additionalProperties": true
}

See the full schema on GitHub.

Released under the Apache 2.0 License.