OpenSplitTime API
Standard Individual Record Queries
Individual records are generally more useful and response times will be much faster. You can query for an individual record using its id.
Most records in OpenSplitTime have both a numeric id (the unique database id) and a "slug" or "friendly" id,
which is used in the URL for easy readability by humans. The OpenSplitTime API will respond to either the numeric
id or the slug. For example, the following two queries (remember to use your own API Key in place of
your.api.key
):
$ curl -H "Authorization: bearer your.api.key" https://www.opensplittime.org/api/v1/events/5
or
$ curl -H "Authorization: bearer your.api.key"
https://www.opensplittime.org/api/v1/events/hardrock-100-2013
will return exactly the same result.
Inclusions
Most record queries will return relationships that include the type and id of related records. You can include
full data for these relationships using an include
parameter in your query (remember to use your own
API Key in place of your.api.key
):
$ curl -H "Authorization: bearer your.api.key"
https://www.opensplittime.org/api/v1/events/5?include=efforts