Diritti di Accesso/API Semplici

Access Rights

An event file always belongs to a single customer account, and only the account owner can access the access rights settings for security reasons. 

Through the access rights you can grant access to another RACE RESULT account either by username or customer ID, you can additionally control the access to certain areas of the software for that specific event. 

 

Simple API

The Simple API serves to make data from your event file accessible through a static link without logging in to your customer account, this may be to publish results on another website. 

Settings can be accessed through Main Window->Access Rights/Simple API. Simply select what type of data you would like to make accessible and then select the listname or enter the setting name.

You can choose from different API types:

  • List allows you to publish any of the Lists set up in the Output window, in any format (TXT, JSON, JSON ext (including the formatting data of the output), HTML, PDF, XML, XSLX (Excel) or CSV).
  • Statistics creates either a PDF or XLS file of any of your Statistics set up in the Output window.
  • Settings enables access to event settings of the event file.
  • Counter outputs a count of all participants in the event, or in a given contest.
  • Custom allows you to do very specific things which would be impossible to fully document here.
  • Racemap access is designed to transmit the participants data of your event file to Racemap, for use in their tracking visualisation interface. This setting is explained in more details below.

The icon in the column Link then leads to the static link.

When calling APIs you should consider that they will be cached for between 10-30 seconds, therefore calling them more often may not result in data updating correctly.

The Simple API applies rate limiting of 1 call per second per each unique API URL from each unique address. If your client script is calling an API more than once per second then it will receive a 406 error code. If you require more frequent calls please contact support. 

Custom APIs

Custom APIs allow for further refinement of API outputs and also provide some additional functionality when working with RACE RESULT 12.

This guide will document some of the functionality that can be achieved with custom APIs, but should you have any further specific requirements then please contact support with your requirements. 

RaceMap Access

To link the participants data of a RACE RESULT 12 file to a Racemap, you need to use the simple API feature under Main Window > Access rights / Simple API

In the Type setting, select "Racemap Access".


 

An integration is automatically created, with the default settings above. These should be fine for most events, but you can edit them where needed.

Here is more information about each field, and what you should put in them:

  • Id: should contain a numerical value that is unique through the event file and does not change.
  • RaceNr: that field will be displayed on each participant's flag in the timing visualisation. It is typically the bib number, but can be anything you like (it can even include text and emojis) and does not need to be unique.
  • Transponder1 and Transponder2: chip codes assigned to a participant via the corresponding data fields. If you are using a chip file instead of these two fields to assign chips, replace Transponder1 with TransponderInChipFile in the Transponder1 field.
  • Contest: typically, the contests as set up in RACE RESULT 12. However, you can use this field to group participants into any categories relevant to Racemap, for example if participants from a given contest do not all perform the same course.
  • Visibility: leave as "public" so participants show up in the Racemap
  • Start and Finish: needs to contain the start and finish time of day (in UTC time) of the participants, or be left blank. When filled, Racemap uses these fields to ignore trackpings before / after a participant is on course, so it is critical that they are properly set up, or blank.
  • Custom: use this field to add any extra information. You will need to liaise with Racemap to make sure they can actually make any use of what you put there.


 

Webhooks

RACE RESULT 12 can be setup to send a webhook upon certain triggers, these are predominantly used to ensure the syncronisation of data between 2 separate data stores, for example if you are using your own registration platform and want to ensure participant data is updated if it is changed in the Event File. 

Webhooks are configured under Main Window - Access Rights / Simple API.

Each webhook needs to define the trigger, the desination URL, and for certain triggers a filter and fields can be defined. 

When setup and activated the webhooks will automatically be sent according to the triggers defined, there is no time limit to how long webhooks will be activated for. 

All webhooks are sent as a POST request with data in the POST body as JSON, by default the body will always contain Event ID, Webhook ID, Timestamp, additional values depend on the trigger being used. 

A call is considered successfully sent if a response code <500 is received, even if the status code is an error code it is still conidered received by the destination. If a call is unsuccessful then the server will attempt to resend it with an increased delay between or until the Server queue limit is reached at which point the message will be dropped. 

Webhooks are sent by the SES which is running the event file, if you are timing offline, even with online forwarding enabled, the webhooks will only be sent by your local SES. 

Triggers

New Participant

A call will be sent when a new participant is added, this can be either through import participants, online registration, on-site registration or directly through the participants window. 

A filter can be applied to only send the webhook if a certain filter is true, for example if a participant has selected a specific option during registration. 

The post body can also include any fields which are defined as a list of semi-colon separated values. 

Participant Update

Similar to the new participant trigger the participant update will send whenever the data fields of a participant record are changed, this will not be triggered by changes to Splits, Results calculations or User-Defined Fields.

A filter can also be applied to participant updates and the post body can be configured to include fields as well. 

New Raw Data

The new raw data trigger will be sent whenever a new raw data record is added, the record is linked to a participant record so you can optionally define a filter and fields to be included in the POST body. 

When using the New Raw Data it is recommended to link the filter to a specific result or the Finish result, for example - only send the webhook if the participant is Finished. Any calculations which depend on the raw data record will be completed first so it will send even if that time is used for the specific result you are looking at. 

Settings Changed

This applies to any event file settings which are changed, this includes for example all Event, Chip Timing and Scoring settings under the Main Window, updates to Output Lists, my.rr settings and more.

Since the settings apply to the Event file and not a participant record it cannot be filtered or include additional fields. The Post body will include the ModJobID in the Values field to allow you to track the changes. 

The ModJob ID is an integer which represents the last calculation cycle run by the SES. Whenever something is changed in an event file a unique job is run which calculates what should be updated in the database. This ID will increase for every change no matter how big or small. 

All Changes

All changes means any change to the event file. 

Since the all changes applies to the Event file and not a participant record it cannot be filtered or include additional fields. The Post body will include the ModJobID in the Values field to allow you to track the changes.