Sprint Racing Results Service
REST API for SRRS
Welcome to the Sprint Racing Results Service REST API. This allows programmatic access to the data so that you can retrieve results or a subset of results for your club website, a personal website, or any other type of results aggregation service. You could say that it is a Raceful as opposed to Restful API.
To retrieve output from the REST API, use the URL: https://www.rocrooks.co.uk/srrs/rest/ and attach your desired query to the rest of the URL as described below.
Output is in JSON format, which can be readily processed by other programming languages, for the json_decode PHP function, see here for the PHP json_decode function for example.
To attach search parameters to your queries, use ?parameter= for your first parameter and ¶meter= for any subsequent parameters.
Retrieve a Race
To retrieve a race, attach the race/ parameter to your URL, you will also need a race ID (race=) to select a particular race
Example: https://www.rocrooks.co.uk/srrs/rest/race/?race=13563 (link opens in a new window).
The output is structured into 4 arrays:
"Regatta" contains details about the regatta the race is from
"Race" contains details about the race
"ClassCodes" contains the codes for the classes in the race, allowing you to construct an alternate race name
"Paddlers" contains the paddler details in the race
Retrieve a Regatta
To retrieve an entire regatta, attach the regatta/ parameter to your URL, you will also need a regatta ID (regatta=) to select a particular race
Example: https://www.rocrooks.co.uk/srrs/rest/regatta/?regatta=58 (link opens in a new window).
The output is structured into 2 arrays:
"Regatta" contains details about the regatta
"Races" contains each race
Within each race there is details about the race, and a "Results" array with the finishers in the race.
You can also use jsv=, mw=, ck=, spec=, abil=, ages= to select a subset of races. An individual club or paddler can be searched for using club= and paddler= details= can also be set to "Full" to give more paddler details (lane and paddler class), or set to "None" if no paddler details are requested.
Retrieve all Regattas
To retrieve all regattas, use the regattas/ parameter to your URL.
Example: https://www.rocrooks.co.uk/srrs/rest/regattas/ (link opens in a new window).
The output is structured into a single array with all one set of regatta details per element. Search can be constrained by using the club= and paddler= parameters.
You can retrieve an analytics set from the data by using the analytics/ parameter in your URL.
Example: https://www.rocrooks.co.uk/srrs/rest/analytics/ (link opens in a new window).
The output is structured into a single array with one year per line. Arrays are contain a Year field, and a field with the number of paddlers seats/knees in that type of boat/race.
The search can be constrained by using the distances=, by=, boats=, by=, jsvs=, mws=, cks=, club=, minyear= and maxyear=, parameters. Multiple parameters should be separated by commas.
by= can be by combined, distance, menwomen, canoekayak, boatsize or age. Default is combined.
boats= can be 1, 2 or 4, or a mixture
jsvs= can be J, S or V, or a mixture
mws= can be M or W, or both
cks= can be C or K, or both
club= must be a single 3 letter club code
minyear= is the minimum year to get results from
maxyear= is the maximum year to get results from
The REST API is free to use. All I ask is that if you do use it, please provide attribution and link back to my website, you may use the following HTML code to do so:
<p>Results powered by <a href="http://www.rocrooks.co.uk/srrs" target="_new">SRRS</a></p>