WebAPI v1.1

This is our new API that can be called internally or by POST/GET requests and is accessible by administrators, sub-administrators, users, and sub-users.

The API uses the following variables

  • apiversion - REQUIRED - The API version you wish to use (1.1 in this case)
  • apiusername - REQUIRED - The username to login as (same as your normal login account)
  • apipassword - REQUIRED - The password to login with (same as your normal login account)
  • apiformat - The format to respond with (“json” or “internal”)
  • action - The action to call, see the list below.
  • billingid - Can be used to reference a service or user if you do not have the real id

Responses

Responses will contain two sets of data, one is the status which will be “NOK” or “OK” depending on if the command and authentication was successful. The other is the response which will be the response of the command issues, this may be a string, array, integer, or another type of data. Please review the API Functions for responses.

API Format

The API can output data in two formats, the available formats are:

  • json
    • Will respond with a json encoded array
  • internal
    • Will set two API variables, $api>status and $api>response, useful for internal usage

API Actions

This is a list of all available API actions, we are always adding more commands. For parameters to these actions please view the API Functions

API action Internal Function Main Admin Sub-Admin User Sub-user
adduser User::AddClient Y Y N N
edituser User::EditClient Y Y Self N
getuserinfo User::GetClientInfo Y Y Self N
deleteuser User::DeleteUser Y Y N N
suspenduser User::SuspendClient Y Y N N
unsuspenduser User::UnsuspendClient Y Y N N
getservicecount N/A Y Y Self N
getpassword N/A Y N N N
changepassword N/A Y Self Self N
addusergame Games::AddUserGame Y Y N N
editusergame Games::EditUserGame Y Y Y N
deleteusergame Games::DeleteFromUser Y Y N N
reinstallusergame N/A Y N Y N
suspendusergame Games::SuspendServer Y Y N N
unsuspendusergame Games::UnsuspendServer Y Y N N
restartserver Games::ControlGame Y Y Y N
startserver Games::ControlGame Y Y Y N
stopserver Games::ControlGame Y Y Y N
listgameservers Games::ListGameServers Y Y Y N
getusergameinfo Games::GetGameServerInfo Y Y Y N
listgameaddons Games::ListAddons Y Y Y N
installgameaddon Games::InstallAddon Y Y Y N
listgameupdates Games::ListUpdates Y Y Y N
installgameupdate Games::InstallUpdate Y Y Y N