Servers API
Servers API
13/02/15 17:58
The Servers API is our fourth API and should give our users more chances to gather information about any server currently tracked by TrackBase. It is pretty simple. You supply the ServerID and will receive all relevant information. Have fun ☺
» We require you to name us with a link to our TB home page when using data from this OR any other TrackBase API

Example:
Information from & copyright at TrackBase.Net
    You have to supply basic paramaters in order to get results. Currently all supported parameters are also required so that everyone knows what paramaters are possible. The following list shows short explanations for each of the possible parameters. Note that the parameters must be supplied as lower case characters.
  • Sid: (integer)
    Self explanatory. Set pid to the server id you would like to get information of.
  • Rcv: (string)
    Either 'serverinfo', 'sessionslist' or 'playerusage'. The first option gives you the basic server information (equivalent to the index page of the serverinfo page). This includes the list of players currently playing and the server monitor + server signature links. Sessionslist gives you exactly the same result as 'serverinfo' but the result has no playerlist but a list of sessions connected to that server. 'Playerusage' is again almost the same. It holds the list of players that have already played on that server. You can order it nicely with a lot of ordering options.
    You can use the limit parameter to get only a few maps / servers / sessions, ordered by your choice.
  • Order-By: (string)
    • Serverinfo:
      • Xp
      • Rate
      • Rating
      • Ping
      • Class (only if TSP is enabled)
      • Kills (only if TSP is enabled)
      • Deaths (only if TSP is enabled)
      • Playername
    • Sessionslist:
      • Time (session end)
    • Playerusage:
      • Playername
      • Rate (gained)
      • Rating (gained, TSP)
      • Time (played on server)
      • Ratetime
      • Lastseen (if two have the same value, we are ordering by playername ascending)
  • Order: (string)
    Possible are 'asc' and 'desc'. You can choose what you want to order (order-by).
  • Limit: (integer)
    Possible are integers in range of 1 and 50. We are currently only supporting up to 50 results to keep the loading times small.
    Irrelevant when rcv is 'serverinfo'. You can supply anything that is in range.
  • Start: (integer)
    Possible are all numbers greater than 0. When you supply 10 and your limit is 10, too, you would get items 10 to 19. When you give a too high value, you may not get the exact number of results as given in the limit parameter.
    Irrelevant when rcv is 'serverinfo'. You can supply anything that is valid (> 0).
Once supplied all information under following URL
https://api.trackbase.net/servers/et.php
, you can gather all information given by us. Please note that we currently only support Wolfenstein: Enemy Territory's servers. Other games might follow in the future.
The results are transferred via JSON. You can get information via a JavaScript AJAX request or with PHP's curl extension or any other extensions supporting gathering of online source codes.
Example request
https://api.trackbase.net/servers/et.php?sid=45261&rcv=serverinfo&order-by=xp&order=desc&limit=1&start=1
We hope you like this new interface. If you do, and also if you don't, please give us feedback on the forums @ https://forum.trackbase.net/ and visit our social media web appearances for more information about TrackBase and its upcoming projects.
[ Facebook ] | [ Twitter ] | [ Google+ ]