List Training Plans

GET https://api.runningahead.com/rest/logs/me/training_plans

Retrieves a list of the user's training plans. RunningAHEAD.com supports the concept of commercial plans, which can only be viewable by the user and no one else. List Training Plans will only return commercial plans created by your application. Commercial plans created by other applications will be inaccessible by your application.

Parameters

Parameter Type Description
access_token string (required) OAuth 2.0 token for the current user.

Response

Parameter Type Description
entries TrainingPlan[] An array of training plan objects.
numEntries integer Total number of training plans.

Example

Request

List all of user's training plans.

https://api.runningahead.com/rest/logs/me/training_plans?
access_token=VjU5s4dyhAPO2XiUzaNVeE&

Response

The example response contains two plans. The first is a commercial plan, which is created by the application. The second plan is private, which is similar to a commercial plan in that it is invisible to other users. Unlike a commercial plan, the private plan can be changed to be publicly viewable.

{
    "code": 0,
    "data":
    {
        "entries":
        [
            {
                "attributes":
                {
                    "commercial": true
                },
                "beginDate": "2011-12-11",
                "endDate": "2012-03-04",
                "id": "c81f794fe01a4c82be9fce12c49a6cb4",
                "name": "Lydiard Running Wizard 10k",
                "numWeeks": 12
            },
            {
                "attributes":
                {
                    "private": true
                },
                "beginDate": "2012-03-11",
                "endDate": "2012-05-30",
                "id": "dac01af798d347f993b0310bbe7030fb",
                "name": "RW Training Plan - 5K",
                "numWeeks": 12
            }
        ],
        "numEntries": 2
    }
}