go to .NET-API documentation

Documentation Web-API

Web-based API to insert data automatically into the FS-live databases.

The API supports entering data to the database by calling competition and discipline specific URLs with POST parameters containing the actual data.
The basic syntax for the URLs is: http://fs-live.org/[COMPETITION]/api/process-[DISCIPLINE].php

[COMPETITION] has to be replaced with the country or the name of your FS/FSAE competition. It is the same as used in the links on the home page. If your competition isn't linked yet, please write an email and you will get the exact wording.

[DISCIPLINE] has to be replaced by the following abbrevations for the individual disciplines:

Discipline Abbrevation in URL
Skid Pad skid
Acceleration acc
Autocross autox
Trackdrive track
Endurance endu

Team Infos

The team's basic data must be administrated by hand in the admin area on the website.

Parameter Description Example
class C/E/D for combustion/electric/driverless respectively
case insensitive
E
D
d
car nr. The team's car number. Must be unique over all classes.
You can use class dependent prefixes and leading zeroes.
case insensitive
70
007
D329
team name The name of the team
case sensitive
Global Formula Racing
E-Agle Trento Racing
Einstein Motorsport
team uni The type(, name) and city of the university.
Type and name may be abbrevated.
case sensitive
UNI Stuttgart
ETSEIB Barcelona
Metropolia UAS
country 3-character country code according to IOC
case insensitive
AUT
CZE
CAN

POST parameters - general

You have to submit the data as POST parameters along the url call. Some parameters are the same for each discipline, some differ over the disciplines.
Make sure the car numbers are spelled in the same way as in the team infos section over all disciplines. Leading zeroes make a difference because the car numbers are handled as text. Car numbers with class prefixes are case insensitive.
Times may be entered with a comma or a point as decimal seperator.
For Skid Pad, Acceleration and Autocross use time value 888 for DNF and 999 for RERUN.
The mode parameter (Trackdrive/Endurance only) defines if a lap time gets added or the vehicle state gets changed. If the value is another than "save" the other parameters are not evaluated and don't have to be submitted.

Value Description
save Enters a new lap with the given time.
Automatically sets the vehicle state to "GO!".
GO! Sets the vehicle state to "GO!".
Use at start into first lap and after pit stop.
PIT Sets the vehicle state to "PIT".
Use when car enters driver change in Endurance.
FIN Sets the vehicle state to "FIN".
Use if car has sucessfully finished Trackdrive/Endurance.
DNF Sets the vehicle state to "DNF".
Use if car fails to complete Trackdrive/Endurance or gets disqualified.

POST parameters - Skid Pad

Parameter Description Example
car_nr The team's car number c49
right The time of the second right lap 5.678
left The time of the second left lap 5,432
passkey The event specific password ********

POST parameters - Acceleration

Parameter Description Example
car_nr The team's car number 159
time The time of the current attempt 5.08
passkey The event specific password ********

POST parameters - Autocross

Parameter Description Example
car_nr The team's car number E014
time The time of the current attempt 08.150
passkey The event specific password ********

POST parameters - Trackdrive

Parameter Description Example
car_nr The team's car number D368
time The time of the last lap 147,852
try The number of the current attempt 1
mode Input mode / vehicle status
see POST parameters - general
save, GO!, FIN, DNF
passkey The event specific password ********

POST parameters - Endurance

Parameter Description Example
car_nr The team's car number 69
time The time of the last lap 43.21
mode Input mode / vehicle status
see POST parameters - general
save, GO!, PIT, FIN, DNF
passkey The event specific password ********

possible return values

The return value is a string delivered from the webserver indicating if an error occured during script execution. Error detection and signaling isn't implemented completely yet. Possible values are:

return value Description
0 task sucessful
1 wrong passkey
2 database connection error
3 corrupt data or sql error
4 too many laps
5 no input mode provided
6 reserved
7 reserved
8 reserved
9 reserved
other strings general PHP or HTTP error; for details read the return string
check if url is correct
on recurring PHP errors please contact me with the complete error string

Documentation .NET-API

API to insert data automatically into the FS-live databases. Delivered as DLL and C# code.

The .NET-API is a wrapper for the web-API written in C#. It handles all the networking stuff and supplies easy-to-use functions to use in your timing software.

How to use the .NET-API

There are two ways how you can include the API into your project. (Description for C#-Project in Visual Studio 2015)

The first one is downloading the DLL file and add a reference to it in your project. To do this in Visual Studio right click on "References" in the Solution Explorer and choose "Add Reference...". In the opening window click on the "Browse..." button and select the dll file. Close the window with "OK".

The second one is downloading the source code file and add it to your project files. The advantage of this method is that you can customize the library to your individual needs. Keep in mind that future updates to the web-API will also result in changes in the .NET-API and you will have to merge the updated API with your customizations.

Please find a changelog and downloads of older versions here.

In both cases include "using FSlive" to your own code file. With this you can use the functions of the "PushToFSlive" and "FSliveConvert" classes.

Before you can use the other functions of PushToFSlive you have to call PushToFSlive.Init(...).

Team Infos

The team's basic data must be administrated by hand in the admin area on the website. See web-API

void PushToFSlive.Init(string key, string comp)

This function has to be called once before other functions of PushToFSlive can be used.
It initializes the API with competition dependend information.

Parameter Description Example
passkey The event specific password ********
comp The name/country/year of the competition
see [COMPETITION]
australia2018

string PushToFSlive.Skidpad(string carNr, float timeRight, float timeLeft)

Pushes Skidpad timings to the database.

Parameter Description Example
carNr The team's car number c49
timeRight The time of the second right lap 5.678
timeLeft The time of the second left lap 5,432
return Response from Webserver, see web-API 0..5

string PushToFSlive.SkidpadState(string carNr, string state)

string PushToFSlive.SkidpadState(string carNr, string stateRight, string stateLeft)

Pushes Skidpad states (or timings) to the database.
Timing data has to be formatted as string with up to 3 decimals.
The 2-parameter version sets the same state/time to both laps and the overall state/average time.
The 3-parameter version sets the states/times of the laps independently. The overall state/average time is determined automatically.

Parameter Description Example
carNr The team's car number c49
state The state of the second right lap, second left lap and overall DNF
stateRight The state or time of the second right lap 5.678
stateLeft The state or time of the second left lap 5,432
return Response from Webserver, see web-API 0..5

string PushToFSlive.Acceleration(string carNr, float time)

Pushes Acceleration timings to the database.

Parameter Description Example
carNr The team's car number c49
time The time of the current attempt 5.08
return Response from Webserver, see web-API 0..5

string PushToFSlive.AccelerationState(string carNr, string state)

Pushes Acceleration state (or timing) to the database.
Timing data has to be formatted as string with up to 3 decimals.

Parameter Description Example
carNr The team's car number c49
state The state/time of the current attempt DNF
return Response from Webserver, see web-API 0..5

string PushToFSlive.Autocross(string carNr, float time)

Pushes Autocross timings to the database.

Parameter Description Example
carNr The team's car number E014
time The time of the current attempt 08.150
return Response from Webserver, see web-API 0..5

string PushToFSlive.AutocrossState(string carNr, string state)

Pushes Autocross state (or timing) to the database.
Timing data has to be formatted as string with up to 3 decimals.

Parameter Description Example
carNr The team's car number c49
state The state/time of the current attempt RERUN
return Response from Webserver, see web-API 0..5

string PushToFSlive.Trackdrive(string carNr, int attempt, float time)

Pushes Trackdrive timings to the database. Sets the car state to "GO!" automatically.

Parameter Description Example
carNr The team's car number D368
time The time of the last lap 147,852
attempt The number of the current attempt 1
return Response from Webserver, see web-API 0..5

string PushToFSlive.TrackdriveState(string carNr, int attempt, string state)

Sets the car state during Trackdrive.

Parameter Description Example
carNr The team's car number D368
attempt The number of the current attempt 1
state vehicle state
see POST parameters - general
GO!, FIN, DNF
return Response from Webserver, see web-API 0..5

string PushToFSlive.Endurance(string carNr, float time)

Pushes Endurance timings to the database. Sets the car state to "GO!" automatically.

Parameter Description Example
carNr The team's car number 69
time The time of the last lap 43.21
return Response from Webserver, see web-API 0..5

string PushToFSlive.EnduranceState(string carNr, int attempt, string state)

Sets the car state during Endurance.

Parameter Description Example
carNr The team's car number 69
state vehicle status
see POST parameters - general
GO!, PIT, FIN, DNF
return Response from Webserver, see web-API 0..5

possible return values

see web-API