The Cycling Analytics API

19 September, 2013 by David Johnstone

Cycling Analytics now has an API. This provides a programatic interface to this website, which means other websites, mobile apps etc. can read, modify and create users’ data. This has been a work in progress for some time — observant users may have noticed the link to the developer page in the footer or the “developer mode” option in profile settings in the past few months — but it’s now ready for general use.

The API can be used for many things, such as mobile apps to record rides and directly upload them, websites that do novel things with ride data, scripts to automatically upload rides, and much more. The documentation is much more thorough, but here’s a few things worth noting:

  • The first step in using the API is getting an authentication key, which effectively says “this user has given you permission to use the API on their behalf”.
  • For personal use, authentication keys can be created in the API console (which is also useful for playing around with the API).
  • There are much more convenient ways to get authentication keys if you are making something that other people are going to use.
  • If those convenient ways of getting an authentication key are going to be used, an app must be registered. Developer mode must first be activated, and then the interface to register apps is made visible on the apps page.
  • The API is based on the OAuth 2.0 framework, but it’s not particularly complicated to use (and it doesn’t use advanced features like refresh tokens or anything like that).
  • There’s also plenty of documentation about what can be done with the API — what endpoints there are, how to use them, and what data they return.
  • There aren’t yet API endpoints that do everything conceivable. These will be added in time, but get in contact if you want something in particular done.
  • For those already using the API, you’ll want to change the URLs to use https instead of http. http still works, but will probably be disabled next year sometime.

This is the blog of Cycling Analytics, which aims be the most insightful, most powerful and most user friendly tool for analysing ride data and managing training. You might be interested in creating an account, or following via Facebook or Twitter.

blog comments powered by Disqus