home api list

Hexostore API Documentation

trainingroutine

/api/trainingroutine/

List methods: get, post, patch

Detail methods: get, put, patch, delete

The trainingroutine resource stores lists of "steps" to create workouts that may be followed by a user via HxSolo.

Each "step" contains an activitytype and a list of attributes that together describe the goals of the step. The attributes are drawn from Garmin's FIT specification and corresponds with a FIT Workout File. The FIT specification may be downloaded from Garmin's website here: http://www.thisisant.com/resources/fit

The Workout File supports setting various kinds of performance goals and repeat instructions as described in section 8 of the document D00001309 FIT File Types Description Rev 1.6.pdf, found within the specification download.

For clarity, values for the FIT attributes are specified using string constants rather than the integers indicated by the FIT specification.

This resource may be requested in FIT format and TCX format in addition to the default, JSON. Specify the format you would like in the Accept header. FIT and TCX are represented by the application/vnd.ant.fit and application/vnd.garmin.tcx+xml mimetypes respectively.

TrainingRoutine example:

{
  "activitytype": "/api/activitytype/103/",
  "application_metadata": null,
  "description": "",
  "id": 1013,
  "last_used": null,
  "metadata": null,
  "name": "Standard Rast Test",
  "resource_uri": "/api/trainingroutine/1013/",
  "user": null,
  "steps": [
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 0,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/8/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "time",
      "duration_value": 10,
      "index": 1,
      "intensity": "rest",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 2,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/8/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "time",
      "duration_value": 10,
      "index": 3,
      "intensity": "rest",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 4,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/8/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "time",
      "duration_value": 10,
      "index": 5,
      "intensity": "rest",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 6,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/8/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "time",
      "duration_value": 10,
      "index": 7,
      "intensity": "rest",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 8,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/8/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "time",
      "duration_value": 10,
      "index": 9,
      "intensity": "rest",
      "name": "",
      "target_type": "open",
      "target_value": 0
    },
    {
      "activitytype": "/api/activitytype/24/",
      "custom_target_high": 0,
      "custom_target_low": 0,
      "description": "",
      "duration_type": "distance",
      "duration_value": 3500,
      "index": 10,
      "intensity": "active",
      "name": "",
      "target_type": "open",
      "target_value": 0
    }
  ]
}

Fields

activitytype:

A reference to the resource. Maybe specified by URI or ID. Using a URI is recommended.

This field may be blank

This field may be null

application_metadata:

An object that is associated with the parent resource for each application.

This field is returned fully populated.

This field may be null

description:

Unicode string data. Ex: "Hello World"

This field may be blank

This field will default to: '' (empty string)

id:

The primary key for this resource. Integer data. Ex: 2673

This field is readonly.

importfile:

A single related resource. Can be either a URI or set of nested resource data.

This field is readonly.

last_used:

The date that the current user last used this TrainingRoutine.

This field is readonly.

metadata:

This field may be null

name:

Unicode string data. Ex: "Hello World"

This field is required.

resource_uri:

The unique URI where the object resides.

This field is readonly.

steps:

Many related resources. Can be either a list of URIs or list of individually nested resource data.

This field is returned fully populated.

This field is required.

user:

A user. Maybe specified by URI, email, or ID. Using a URI is recommended.

This field may be null

Filtering Options

activitytype: ALL_WITH_RELATIONS

id: exact, in, gt, gte, lt, lte, range

user: exact, in, gt, gte, lt, lte, range

using: exact

Sorting Options

id, user, last_used, activitytype, name

© 2024 by CarrĂ© Technologies Inc.