Create endurance workout
create_endurance_workoutBuild running, cycling, or pool swim workouts with timed, distance, or lap-button steps and targets, then optionally schedule them on Garmin Connect.
Instructions
Create a run, ride or pool swim workout to follow on the watch.
Steps end on a time, a distance or the lap button, and can repeat. Runs and rides take a target: pace per km or mile, speed, heart-rate zone or range, power zone or watts, or cadence. Swims take a stroke, equipment and a pool length; distances must be whole lengths. Give schedule_date to put it on the calendar too; the reply then carries the schedule_id, and if scheduling fails the error gives the new workout's id. For strength workouts use create_strength_workout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The workout's title. | |
| sport | Yes | running, cycling, or swimming in a pool. | |
| steps | Yes | Steps in order; a repeat holds steps to run several times. | |
| pool_unit | No | The pool length's unit, m or yd; swims only. | m |
| description | No | Notes shown with the workout. | |
| pool_length | No | Swims only. | |
| schedule_date | No | If set, the workout is scheduled on this date after creation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | ||
| name | No | ||
| sport | No | ||
| updated | No | ||
| workout_id | Yes | ||
| description | No | ||
| schedule_id | No | Set when the workout was just scheduled: what unschedule_workout takes. | |
| scheduled_on | No | Set when the workout was just scheduled: its calendar day. | |
| estimated_duration_s | No |