Pre-made connectors
You can download our pre-made API connectors on the main API page.
Parameters
Here is a list of parameters that our API accepts. The best way to learn how to use them is to simply experiment with them. Enjoy!
| Name | Description | Example value |
|---|---|---|
| Action | The "Action" parameter is used to specify what particular data you are looking for. |
|
| Format | Used to specify what format you would like the data returned in. |
|
| IP | Used together with "Port" to query a server which you do not know the ID for. | 188.165.197.227 |
| Port | Used together with "IP" to query a server which you do not know the ID for. | 7777 |
| ServerID | Used to specify which server to retrieve data for. The ID can be found in the server page URL, example: http://monitor.sacnr.com/server-12345.html. | 12345 |
Example
All API request URL's start with http://monitor.sacnr.com/api/. Here is an example query:
http://monitor.sacnr.com/api/?IP=188.165.197.225&Port=7777&Action=info
This will return a serialized object (or array, depending on "Action"), which when unserialized, will look like this:
stdClass Object
(
[ServerID] => 53484
[IP] => 188.165.197.225
[Port] => 7777
[Hostname] => San Andreas Cops And Robbers [0.3b]
[Gamemode] => Cops And Robbers
[Map] => San Andreas
[MaxPlayers] => 450
[Players] => 77
[Version] => 0.3b
[Password] => 0
[Time] => Saturday 00:40, Week 1
[WebURL] => www.sacnr.com
[Rank] => 15
[AvgPlayers] => 95.22
[HostedTab] => 0
[LastUpdate] => 1288576318
)
