WebForce API (version 1.0)

WebForce enables resellers and licensees to manage accounts using simple RESTful interface (HTTP GET/POST  requests). You can open, close, update, suspend an account, log-in and others.
 

Interfaces

Each API call has a HTTP interface with the following format:
     http://$domain/api?cmd=$command[&version=$version]&$param=$value

Where

  • $domain- the domain of the reseller
  • $command- command denoting which API call should be executed
  • $version - version number. By default it's 1.0
  • $param - API call parameters

 
The API calls require authorization to use. This authorization is on 3 levels:

  1. API should be turned on for the installation
  2. IP of the one who requests the API should be allowed to use it*
  3. The api_key parameter should match the reseller API Key**. The API key is not available to the general public, but is a private key known to the reseller.


NOTES:
* Some API calls do not have IP restriction
** Some API calls do not require an API key


The API calls return either a raw HTTP content as a response (such as the login API call), or a JSON structure. In case of errors or failures the response is always a JSON structure. The format of the JSON is:
{
   "return_code": "",
   "message": "",
   "data": {
      ......
   }
}


Where

  • return_code- either "SUCCESS" or "FAILURE"
  • message- a human readable representation of the result from the API call
  • data- JSON structure with data related to the API call


There are API calls that require a special token in order to authorize the operation. This token is denoted by the "auth_token" parameter. It is usually available for anybody to use without any IP restriction. The value of that token is either the current session ID of a logged user or a special application-related sequence. The session of a logged user can be taken via the following JavaScript call — SK.Singletons.env.get( "session_id" ).