Statistics API
Last updated
Last updated
The endpoint for the statistics API is: /citydriving/stats
We currently offer the following statistics APIs:
All statistics API requests default to 20 rows of returned data. Certain applications may require more rows or a range of rows. For this reason all statistics API requests can utilise the rows
and skip
parameters. With these parameters, you can request any range of rows in the top 1000 total records.
Request first 50 records: rows=50
Request records 60 to 80: skip=60
Request records 100 to 200: skip=100&rows=100
The users online API gives you basic details of all users who are online on a [TC] CityDriving server.
ENDPOINT: /citydriving/stats/online
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY&server=all
This request usually returns all connected users on a given CityDriving server. This example only shows one user for brevity. The default range is 20 users.
RESPONSE:
The Gumball API gives you access to a separate table comprising entries into the current Gumball event. Records are ordered by a user's position in the overall Gumball standings. This API will return an empty array if the event is not currently running.
ENDPOINT: /citydriving/stats/gumball
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This request returns all users currently entered into a Gumball event. This example only shows one user for brevity. The default range is 20 users.
RESPONSE:
The top distance API can return any range of the top 1000 users with the highest total driven distance. The default range is 20.
ENDPOINT: /citydriving/stats/distance
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This request usually returns all connected users on all CityDriving servers. This example only shows one user for brevity.
RESPONSE:
The top money API can return any range of the top 1000 users with the most money. The default range is 20.
ENDPOINT: /citydriving/stats/money
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The top wealth API can return any range of the top 1000 users with the most money and assets (wealth). The default range is 20.
ENDPOINT: /citydriving/stats/wealth
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The cop experience API can return any range of the top 1000 users with the highest cop experience. The default range is 20.
ENDPOINT: /citydriving/stats/cop_xp
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The robber experience API can return any range of the top 1000 users with the highest robber experience. The default range is 20.
ENDPOINT: /citydriving/stats/robber_xp
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The roleplay points API can return any range of the top 1000 users with the highest number of roleplaying points (RP). The default range is 20.
ENDPOINT: /citydriving/stats/rp
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The last tickets API can return any range of the latest 1000 issued fines. The default range is 20.
ENDPOINT: /citydriving/stats/last_tickets
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one ticket for brevity.
RESPONSE:
The top crashers API can return any range of the top 1000 with the most 'heavy contacts'. The default range is 20.
ENDPOINT: /citydriving/stats/crashers
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
The newest players API can return any range of the newest 1000 players. The default range is 20.
ENDPOINT: /citydriving/stats/new_players
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
Get all users who have a certain license. The default range is 20.
ENDPOINT: /citydriving/stats/badge
See API-Wide Optional Parameters.
These are the most common values for badge
.
REQUEST: ?key=YOUR_KEY&badge=cop
This example lists COP badges and only shows one user for brevity.
RESPONSE:
Get a list of training team members. The default range is 20 so you may need to use a higher value for the rows
parameter.
ENDPOINT: /citydriving/stats/trainer_level
See API-Wide Optional Parameters.
The levels key refers to a trainer's basic rank within the team:
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
Get a list of [TC] CityDriving admins. The default range is 20 so you may need to use a higher value for the rows
parameter.
ENDPOINT: /citydriving/stats/tcmembers
See API-Wide Optional Parameters.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
Get a list of [TC] CityDriving admins by their admin level. The default range is 20 so you may need to use a higher value for the rows
parameter.
ENDPOINT: /citydriving/stats/admins
See API-Wide Optional Parameters.
The levels key refers to an admin's basic rank within the team. Use the following levels as values for the level
parameter:
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
Get a list of [TC] Racing members. The default range is 20 so you may need to use a higher value for the rows
parameter.
ENDPOINT: /citydriving/stats/tcrmembers
See API-Wide Optional Parameters.
The levels key refers to an admin's basic rank within the team.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
Get a list of [TC] Gaming members. Note that the returned list currently only includes members who have been explicitly given a [TC] Gaming admin level and not those who have inherited [TC] Gaming membership by being a full member of [TC] CityDriving or [TC] Racing. The default range is 20 so you may need to use a higher value for the rows
parameter.
ENDPOINT: /citydriving/stats/tcgmembers
See API-Wide Optional Parameters.
The levels key refers to an admin's basic rank within the team.
REQUEST: ?key=YOUR_KEY
This example only shows one user for brevity.
RESPONSE:
API
Documentation
Users Online
Gumball
Top Distance
Top Money
Top Wealth
Cop Experience
Robber Experience
Roleplay Points
Last Tickets
Top Crashers
Newest Players
Badges & Licenses
[TC] Training Team Members
[TC] CityDriving Members
[TC] CityDriving Admins by Level
[TC] Racing Members
[TC] Gaming Members
Name
Expected Value
Default Value
rows
{integer} : Number of rows to request: 1-1000
20
skip
{integer} : Number of rows to skip/offset: 1-1000
-
prettyprint
{integer} : Use pretty print: 0 | 1
-
Name
Expected Value
key
{string} : API Key
server
{string}: one | two | three | all
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
badge
{string} : Badge Name (See list of values below)
Name
Value Code
COP
cop
TOW
tow
MED/RES
med
RACE
race
[TC] CityDriving Admin
tc
[TC] CityDriving Recruit
recruit
[TC] Trainer
tct
[CSR] Member
csr
6Speed Member
6s
[RDSR] Member
rdsr
SO Member
so
Name
Expected Value
key
{string} : API Key
Rank
Level
Leader
1
Trainer
2
Assistant
3
Civillian Assistant
4
Name
Expected Value
key
{string} : API Key
Name
Expected Value
key
{string} : API Key
level
{string} : Admin Level (See list of values below)
Rank
Level
Leader/Server Control/Chief Constable/CCiT
1
Inspector/Supervisor
2
Constable
3
Constable in Probation
4
Name
Expected Value
key
{string} : API Key
Rank
Level
[TC] Team Leader/[TC] Racing Manager
1
[TC] Racing Driver
2
Name
Expected Value
key
{string} : API Key
Rank
Level
[TC] Team Leader
1
[TC] Gaming Member
2