fbpx

Copernico

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.

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

If you have a .json viewer installed, copying and pasting the URL into a browser would load information like the one you see:

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

 

like / dislike formulario

Cuéntanos qué no te gusta. Ayúdanos a mejorar.

like form


Artículos relacionados