API documentation (v1)

Last updated: 2015-11-15

General

Methods

GET /api/v1/participants/

The method returns all the participants.

Field Type Description
id integer Identifier of the participant.
name string Name of the participant.
active boolean Field tells if the participant is active.

Example: http://liikuntoilu.net/api/v1/participants/

GET /api/v1/events/

The method returns all the events.

Field Type Description
id integer Identifier of the event.
name string Name of the event.
active boolean Field tells if the event is active.
default_speed integer Some events where distance information is relevant have a default speed which is used in the distance estimation calculation when the distance is not explicitly given in the submitted exercice data.

Example: http://liikuntoilu.net/api/v1/events/

GET /api/v1/exercices/

The method returns all the exercices. The dataset has over 20000 rows so be patient.

Field Type Description
id integer Identifier of the exercice.
created string Moment when the exercice was stored in the database. ISO 8601 date format in UTC timezone.
started string Moment when the exercice was begun. ISO 8601 date format in UTC timezone.
participant_id integer Performer of the exercice. Foreign key to participants data.
event_id integer Event of the exercice. Foreign key to events data.
pace integer Pace of the exercice. 0 = normal, 1 = high, 2 = low.
comment string Comment about the exercice.
distance string Travelled distance of the exercice in metres when it's approriate (= event is running, swimming etc.).
duration integer Field tells how long the exercice lasted in minutes.

Example: http://liikuntoilu.net/api/v1/exercices/

GET /api/v1/participants/{id}/

The method returns one participant. The response fields are the same as in the participants data.

Example: http://liikuntoilu.net/api/v1/participants/0/

GET /api/v1/participants/{id}/events/

The method returns all the events which the participant has ever performed. The response fields are the same as in the events data.

Example: http://liikuntoilu.net/api/v1/participants/0/events/

GET /api/v1/participants/{id}/exercices/

The method returns all the exercices of the participant. The response fields are the same as in the exercices data.

Example: http://liikuntoilu.net/api/v1/participants/0/exercices/

GET /api/v1/participants/{id}/events/{id}/exercices/

The method returns all the exercices of the participant in the specific event. The response fields are the same as in the exercices data.

Example: http://liikuntoilu.net/api/v1/participants/0/events/6/exercices/

GET /api/v1/events/{id}/

The method returns one event. The response fields are the same as in the events data.

Example: http://liikuntoilu.net/api/v1/events/6/

GET /api/v1/events/{id}/participants/

The method returns all the participants who have performed at least one exercice in the specific event. The response fields are the same as in the participants data.

Example: http://liikuntoilu.net/api/v1/events/6/participants/

GET /api/v1/events/{id}/exercices/

The method returns all the exercices which have been performed in the specific event. The response fields are the same as in the exercices data.

Example: http://liikuntoilu.net/api/v1/events/6/exercices/

GET /api/v1/exercices/{id}/

The method returns one exercice. The response fields are the same as in the exercices data.

Example: http://liikuntoilu.net/api/v1/exercices/1234/