=============================================================================================================== LIST EVENTS =============================================================================================================== GET http://obasen.orientering.se/winsplits/api/events?from={from}&to={to}&classifications={classifications}&since={since}&country={country}&text={text} Returns an IOF XML 3.0 EventList with events matching the search criteria given by the querystring. Max 1000 events are returned. Remember to url-encode the querystring. Parameters from (required) Start date of the date interval to search in, yyyy-mm-dd. to (required) End date of the date interval to search in, yyyy-mm-dd. classifications Comma-separated list of event classifications. Valid values: international, national, regional, local, club. since Only get events updated since a given UTC time, in yyyy-mm-dd hh:mm:ss. country Filter the events on the country code of the organiser, e.g. SWE, GBR. text Text search on event name and organiser name. =============================================================================================================== GET CLASSES IN AN EVENT =============================================================================================================== GET http://obasen.orientering.se/winsplits/api/events/{eventId}/classes Returns an IOF XML 3.0 ClassList for an event. Parameters: eventId (required) The ID of the event, as given by the Event/Id element in IOF XML 3.0. =============================================================================================================== GET RESULT LIST FOR ALL CLASSES IN AN EVENT =============================================================================================================== GET http://obasen.orientering.se/winsplits/api/events/{eventId}/resultlist/{format} Returns a WinSplits SPL file or an IOF XML 3.0 ResultList for an event. Parameters: eventId (required) The ID of the event, as given by the Event/Id element in IOF XML 3.0. format (required) spl, xml or zip. - spl returns a WinSplits SPL file - xml returns an uncompressed IOF XML 3.0 ResultList - zip returns a compressed IOF XML 3.0 ResultList (typically only 5 % of the uncompressed size) =============================================================================================================== GET RESULT LIST FROM A SINGLE CLASS IN AN EVENT =============================================================================================================== GET http://obasen.orientering.se/winsplits/api/events/{eventId}/classes/{classId}/resultlist/{format} Returns an IOF XML 3.0 ResultList for a single class in an event. Parameters: eventId (required) The ID of the event, as given by the Event/Id element in IOF XML 3.0. classId (required) The ID of the class, as given by the one-based Class/Id element of the ClassList list for the given event. format (required) spl, xml or zip. - xml returns an uncompressed IOF XML 3.0 ResultList - zip returns a compressed IOF XML 3.0 ResultList (typically only 5 % of the uncompressed size) =============================================================================================================== CREATE HTML MARKUP FOR A CLASS FROM RAW DATA =============================================================================================================== PUT http://obasen.orientering.se/winsplits/api/classes/{format}?timeLossConditionTime={timeLossConditionTime}&timeLossConditionPercent={timeLossConditionPercent}&language={language} Returns WinSplits Online-styled HTML markup for a class from raw data in IOF XML format or CSV format. No information is persisted to the database; it is just a conversion service. Parameters: format (required) xml, zip or csv. - xml reads split time information from an uncompressed IOF XML 3.0 ResultList - zip reads split time information from a compressed IOF XML 3.0 ResultList - csv reads split time information in CSV format (see below) language (optional) The language to use for texts in the markup. Available language codes: da, en (default), es, fi, fr, no, sv. timeLossConditionTime (optional) The time condition parameter to be used in time loss calculations, in seconds. Default is 20. timeLossConditionPercent (optional) The percent condition parameter to be used in time loss calculations. Default is 20. The HTTP body should contain either an IOF XML result list (either compressed (format: zip) or uncompressed (format: xml)), or data in a semicolon-separated CSV format (format: csv). CSV data should be given on the format explained below. One competitor per line. [status];[place];[name 1];[club];[start time];[control code 1];[control time 1];[control code 2];[control time 2]; ... ;[control code M];[control time M] [status];[place];[name 2];[club];[start time];[control code 1];[control time 1];[control code 2];[control time 2]; ... ;[control code M];[control time M] ... [status];[place];[name N];[club];[start time];[control code 1];[control time 1];[control code 2];[control time 2]; ... ;[control code M];[control time M] A line contains the following cells: status The status for the competitor. IOF XML 3.0 status codes (see http://www.orienteering.org/datastandard/IOF.xsd) are used: Ok, Finished, Active, Inactive, SportWithdr, OverTime, MisPunch, DidNotFinish, Disqualified, NotCompeting, DidNotStart, Moved, MovedUp, Cancelled, Unknown. place The place for the competitor. Set to an empty string if status is not Ok. name The first and last name of the competitor, separated by a space. club The competitor's club. Can be set to an empty string. start time The competitor's start time in either hh:mm or hh:mm:ss format. If the time has higher precision than seconds, hh:mm:ss.ff must be used. control code m The control code of the competitor's mth control. Use F for the finish. (1<=m<=M) control time m The time relative to the competitor's start time when the competitor punched the mth control, (1<=m<=M) in either hh:mm:ss or mm:ss format. If the time has higher precision than seconds, hh:mm:ss.ff must be used. Set to an empty string if the competitor did not punch the control. Notice that all controls in a competitor's course must be included, also the ones that the competitor haven't visited. Example: Ok;1;Mr Winner;Successful Orienteers;10:00:00;31;3:46;32;6:43;33;15:06;F;16:13 MisPunch;;Mr Loser;Failing Orienteers;10:02:00;31;4:06;32;;33;18:48;F;19:01 =============================================================================================================== CREATE AN EVENT =============================================================================================================== POST http://obasen.orientering.se/winsplits/api/events Adds split times for an event to the WinSplits database. The HTTP body should contain a result list with split times in IOF XML 3.0 format. The following elements/attributes are required: /ResultList/Event/Name /ResultList/Event/Organiser/Name /ResultList/Event/Organiser/Country[@code] /ResultList/Event/StartTime/Date /ResultList/Event/EventClassification For more information about the IOF XML 3.0 data exchange standard, please refer to https://orienteering.org/resources/it/data-standard-3-0/. On success, the API returns an IOF XML 3.0 EventList element with a single event. The event ID and password can be used to update or delete the event. /ResultList/Event/Id: The ID of the newly created event in the WinSplits database. The URL of the event's web page is http://obasen.orientering.se/winsplits/online/en/default.asp?page=classes&databaseId={eventId}, where {eventId} is the event's ID. /ResultList/Extensions/ws:Password: The password of the newly created event in the WinSplits database. =============================================================================================================== UPDATE AN EVENT =============================================================================================================== PUT http://obasen.orientering.se/winsplits/api/events/{eventId}/{password} Updates split times for an event to the WinSplits database. Parameters: eventId (required) The ID of the event to update in the WinSplits database. password (required) The password of the event to update in the WinSplits database. In analogy with event creation, the HTTP body should contain a result list with split times in IOF XML 3.0 format. =============================================================================================================== DELETE AN EVENT =============================================================================================================== DELETE http://obasen.orientering.se/winsplits/api/events/{eventId}/{password} Deletes an event in the WinSplits database. Parameters: eventId (required) The ID of the event to delete in the WinSplits database. password (required) The password of the event to delete in the WinSplits database.