fbpx

Copérnico

How to export presets via API

Did you know that you can export any preset to publish it in another website or document (Excel, Google Docs, Google Sheets…)?

To export a preset using the API you have to know how the Copérnico’s API call is formed so that you can apply it to any document or web.

There is one constant element that is always the same: https://public-api.copernico.cloud/api/races/

And a variable element: {race_id}/preset/{login email}:::{preset name}

Joining these elements together:

https://public-api.copernico.cloud/api/races/{race_id}/preset/{login email}:::{preset name}

 

Where:

  • race_id: is the race identifier that you can see in the URL displayed in Copernicus. For example: carrera-de-la-mujer-valencia-2020.
  • login email: is your email or the Copérnico’s account email in which the preset is saved.
  • preset name: is the name of the preset. It has to be identical to the name of the preset you want to show.

A real example:

https://public-api.copernico.cloud/api/races/carrera-de-la-mujer-valencia-2020/preset/service@timingsense.com:::Mujer

If you copy and paste this URL into a browser and you have a .json viewer installed, you should see a result similar to the one in the attached image.

Remember that the more complex the preset is, i.e. the more data it has to show, the slower it will be to process the information where you want to show it (another website, excel…). Also, there is a limitation of 6 Mb, if your preset exceeds this size it will not work. If it doesn’t work, consider limiting the preset using filters or removing columns.
The times are shown in milliseconds so you will have to transform this data to show times in the format you like, for example, HH:MM:SS

 

Was this information helpful?

NoSí
Loading...

Related articles