The (Unofficial) Concept 2 Online Logbook REST API
- Quick Start
- Frequently Asked Questions
- API Key
- Calling the API
- Response formats
- API Methods
- Roadmap
Quick Start
- Get an api key from http://powertwenty.com/c2logapi/1/accounts/register/.
- Open http://powertwenty.com/c2logapi/1/user/totalmeters?format=xml&api_key=xxx replacing xxx with your API key. Enter your Concept 2 Online Logbook user id and password when prompted.
Key
An API key is required to access the API. You can get your key by completing this simple registration form. Your key is displayed on the main api key page after confirming your email address.
Calling the API
Programmatically
The documentation for most api methods contains examples of calling them programmatically. Use basic authentication to provide the Concept 2 Online Logbook user name and password. The API will accept the normal basic-authentication string as a URL parameter ?authentication=YX......vdw== as an alternative to the standard authentication HTTP header.
Provide your API key in either a header called X-API-KEY or as a URL parameter '?api_key=xxxxxxxxxxxx'.
From a Browser
Append your API key to the URL using ?api_key=xxxxxxxxx.For example: http://powertwenty.com/c2logapi/1/currentseason/dates?api_key=xxxxxxxxx
Use your Concept 2 Online Logbook user-name and password when prompted to login.
Response Formats
The default, preferred, and fully tested format is JSON.
Alternative formats are available on some methods. These are not tested as thoroughly as JSON. Specify them by appending ?format=X to the URL. X can be one of: xml, json, or pickle. Pickle returns pickled python objects representing the response data. Important note: some functions return only JSON data independent of this format.
For example:
http://powertwenty.com/c2logapi/1/currentseason/dates?&api_key=xxxxxxxxxxxxx may return:
{
"start": "2009-05-01 00:00:00",
"end": "2010-04-30 00:00:00"
}
while http://powertwenty.com/c2logapi/1/currentseason/dates?format=xml&api_key=xxxxxxxx would return:
<response>
<start>2009-05-01 00:00:00</start>
<end>2010-04-30 00:00:00</end>
</response>
Workout Types
The list of acceptable values for the workout type field is:
- standard
- dynamic
- slide
- water
- paddle
- ski
- snow
Methods
The current methods are:
- User's Total Meters
- User's Team
- Current-Season Dates
- Current-Season Summary
- Current-Season Workouts - Get All Workouts
- Current-Season Workouts - Add New Workout
- Current-Season Workouts - Delete All
- Current-Season Workout - Get One
- Current-Season Workout - Delete
- Historical Monthly Summaries - Get All Summaries
- Historical Monthly Summaries - Add New Summary
- Historical Monthly Summaries - Delete All
- Historical Monthly Summary - Delete an Existing Summary
- Historical Workouts - Years Archived
- Historical Workouts - Given Year
- Historical Workouts - Get All
Roadmap
Implemented
- User's Total Meters
- User's Team
- Current-Season Dates
- Current-Season Summary
- Current-Season Workouts - Get All Workouts
- Current-Season Workouts - Add New Workout
- Current-Season Workouts - Delete All
- Current-Season Workout - Get One
- Current-Season Workout - Delete
- Current-Season Workouts - RANK a workout
- Historical Monthly Summaries - Get All Summaries
- Historical Monthly Summaries - Add a Summmary
- Historical Monthly Summaries - Delete All
- Historical Monthly Summary - Get
- Historical Monthly Summary - Delete
- Historical Archived Workouts - Get
Roadmap
Historical Monthly Summaries - Add a Summmary
Historical Monthly Summaries - Delete All
Historical Monthly Summary - Get
Historical Monthly Summary - Delete
Current-Season Workouts - RANK a workout
Archived Workouts - retrieve
- Current-Season Workouts - Show current RANKed workouts
|