Automobilista 2 and Project Cars 2 Server Managers have a few read-only API endpoints available that can be used to read some data. API endpoint access can be controlled by the accounts permissions system.
Please note that to allow unauthenticated access to API endpoints, "Public Access" must be enabled in the accounts system.
The API is provided as-is, and may change with future releases of Server Manager. The developers of Server Manager do not provide a specific API promise/guarantee or API versioning, but will aim not to change or remove values unless absolutely necessary. Future updates to Server Manager may also add more data to these endpoints.
API endpoints are rate limited to a maximum of 5 requests per 20 seconds. You will receive a "Too Many Requests" error if you exceed the limit. We recommend that you do not request data from the API more than twice per minute.
This endpoint returns the standings for a given Championship.
GET /api/championship/{championshipID}/standings.json
Championships - Api Standings
Sample request: GET /api/championship/17bc8991-eaf5-4cb6-953c-0d4ec85a28a1/standings.json
Sample output:
{
"DriverStandings": {
"": [
{
"DriverName": "Apt Drake",
"DriverGUID": "60000000000000002",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": true,
"TeamPoints": {},
"Points": 98,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Lee Chorley (AI)",
"DriverGUID": "ai-3",
"CarModel": "Mercedes-Benz 190E 2.5-16 Evo II DTM",
"IsPlayer": false,
"TeamPoints": {},
"Points": 64,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Gregory Boundy (AI)",
"DriverGUID": "ai-7",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": false,
"TeamPoints": {},
"Points": 55,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Ilya Malyuev (AI)",
"DriverGUID": "ai-2",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": false,
"TeamPoints": {},
"Points": 52,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Thiago Izequiel (AI)",
"DriverGUID": "ai-5",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": false,
"TeamPoints": {},
"Points": 41,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Dave Stephenson (AI)",
"DriverGUID": "ai-1",
"CarModel": "Mercedes-Benz 190E 2.5-16 Evo II DTM",
"IsPlayer": false,
"TeamPoints": {},
"Points": 41,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Giancarlo Rampanelli (AI)",
"DriverGUID": "ai-4",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": false,
"TeamPoints": {},
"Points": 41,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Jose Lopez (AI)",
"DriverGUID": "ai-6",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": false,
"TeamPoints": {},
"Points": 28,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Joint Stinkbug",
"DriverGUID": "60000000000000005",
"CarModel": "BMW M3 Sport Evo Group A",
"IsPlayer": true,
"TeamPoints": {},
"Points": 26,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Jose Lopez (AI)",
"DriverGUID": "ai-18",
"CarModel": "Chevrolet Corvette C3",
"IsPlayer": false,
"TeamPoints": {},
"Points": 26,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
{
"DriverName": "Driving Cod",
"DriverGUID": "60000000000000007",
"CarModel": "BMW 2002 Turbo",
"IsPlayer": true,
"TeamPoints": {},
"Points": 25,
"PointsPenalty": 0,
"IgnoredEventIDs": {}
},
// etc...
]
},
"TeamStandings": {
"": null
}
}
This endpoint returns a full JSON output of all results from the Automobilista 2/Project Cars 2 server.
GET /results/download
Results - Download All
Sample request: GET /results/download
Sample output:
// Persistent data for addon 'sms_stats', addon version 2.0
// Automatically maintained by the addon, do not edit!
{
"next_history_index" : 182,
"stats" : {
"history" : [
{
"end_time" : 1626199790,
"finished" : false,
"index" : 1,
"members" : {},
"participants" : {},
"setup" : {
"AllowedCutsBeforePenalty" : 0,
"AllowedViews" : 0,
"DamageType" : 1,
"DriveThroughPenalty" : 1,
"Flags" : 151650746,
"FuelUsageType" : 0,
"GridLayout" : 0,
"GridSize" : 20,
"ManualPitStops" : 1,
"ManualRollingStarts" : 0,
"MaxPlayers" : 10,
"MinimumOnlineRank" : 0,
"MinimumOnlineStrength" : 100,
"MultiClassSlot1" : -1,
"MultiClassSlot2" : -1,
"MultiClassSlot3" : -1,
"MultiClassSlot4" : -1,
"MultiClassSlot5" : -1,
"MultiClassSlot6" : -1,
"MultiClassSlot7" : -1,
"MultiClassSlot8" : -1,
// etc...
// output truncated due to large amounts of data
// to find the full structure, make a request to your server and inspect the output.
}
Lists the results files on the server, optionally matching a search query. This endpoint is paginated, so multiple requests may need to be made to retrieve all results files.
GET /api/results/list.json
Results - Api List
q
- search query, URL encoded. Syntax must match that of the search box on the results list page. Can be left blank, which returns all results, paginated.page
- page number, indexed from 0 (first page). The API response lists the number of pages, so you can paginate correctly.sort
- Sort type, either date
or relevance
. If left blank, date
is used.Sample request: GET /api/results/list.json?q=%2Bspa&sort=date&page=0
Sample output:
{
"num_pages": 6,
"current_page": 0,
"sort_type": "date",
"results": [
{
"track": "735562025",
"manager_session_type": "Race",
"date": "2023-12-01T16:00:18Z",
"server_manager_results_json_url": "/server/0/result/download/2023-12-01_16-00-18_RACE.json",
"results_page_url": "/server/0/results/2023-12-01_16-00-18_RACE",
"server_id": 0
},
{
"track": "735562025",
"manager_session_type": "Qualifying",
"date": "2023-12-01T15:55:30Z",
"server_manager_results_json_url": "/server/0/result/download/2023-12-01_15-55-30_QUALIFYING.json",
"results_page_url": "/server/0/results/2023-12-01_15-55-30_QUALIFYING",
"server_id": 0
},
{
"track": "735562025",
"manager_session_type": "Qualifying",
"date": "2022-10-26T15:50:17Z",
"server_manager_results_json_url": "/server/0/result/download/2022-10-26_15-50-17_QUALIFYING.json",
"results_page_url": "/server/0/results/2022-10-26_15-50-17_QUALIFYING",
"server_id": 0
},
// etc...
]
}
This endpoint returns a full JSON output of the results file from the Automobilista 2. To find results file names, use the Results List endpoint above.
GET /server/{serverID}/result/download/{filename}.json
Results - Export
Sample request: GET /server/0/result/download/2022-10-26_15-50-17_QUALIFYING.json
Sample output:
{
"Type": 1,
"Date": "2022-10-26T15:50:17Z",
"ServerID": 0,
"TrackID": "735562025",
"TrackLayoutID": "",
"PresetID": "",
"ChampionshipID": "",
"OriginalFileName": "",
"FullURL": "",
"Places": [
{
"ID": "a15843ed-4a52-4872-92bb-0060c5b362ec",
"Team": "",
"CarModelID": "95104745",
"CarModel": "MCR S2000",
"Class": "P4",
"CupCategory": -1,
"RaceNumber": 0,
"Position": 1,
"TotalRaceTime": 287804000000,
"TimePenalty": 0,
"Disqualified": false,
"Ballast": 0,
"Drivers": [
{
"GUID": "60977968813116466",
"IsPlayer": false,
"Name": "AI #5",
"Penalties": null
}
],
"Laps": [
{
"Time": 191062000000,
"Valid": true,
"NumCuts": 0,
"RacePositionOnLap": 10,
"Sectors": [
{
"Time": 22211000000,
"Valid": true,
"NumCuts": 0,
"LapID": 20944
},
{
"Time": 136526000000,
"Valid": true,
"NumCuts": 0,
"LapID": 20944
},
{
"Time": 32325000000,
"Valid": true,
"NumCuts": 0,
"LapID": 20944
}
],
"DriverGUID": "60977968813116466",
"DriverName": "AI #5"
},
// etc ...
This endpoint returns information about the machine running Server Manager, and a few other tools useful for debugging.
GET /healthcheck.json
Sample request: GET /healthcheck.json
Sample output:
{
"OK": true,
"Version": "v1.2.17",
"IsHosted": false,
"LicenseID": "XXXX-XXXX-XXXX-XXXX",
"OS": "linux/amd64",
"NumCPU": 10,
"NumGoroutines": 26,
"Uptime": "4m8.53507975s",
"GoVersion": "go1.21.6",
"Game": "Automobilista 2",
"ServerName": "AMS2 Server Test",
"EventInProgress": false,
"MaxClientsOverride": 256,
"ServerDirectoryIsWritable": true
}