Name Return Value Description
   "authentication token",



The class is used for execute WebForce API calls.

The library is available everywhere within the WebForce context.

The authentication token can be null when the calls are executed in administrator mode. If it's null, the current session ID is used.

The request_params are a hash of parameters which are passed to Request.JSON

By default all API calls are executed asynchronously.

   "API command",
      <param1>: <value1>,
      <param2>: <value2>,

Executes the request.

The command parameters are a hash with key = parameter name, value = the appropriate value.

The callback has the following interface:
function( success, message, data )
where "success" is true or false, the "message" is used when success is false and the "data" is the value of the "data" key from the returned JSON by the API call.


Request.JSON object which should be executed manually after that

Generates a MooTools Request.JSON object. The parameters are the same as for the "execute". Note that by default the request is using a "post" method, so make sure you invoke "send". If you set the method to be "get", you should invoke "get" to the Request.JSON object instance.


Getting all databases for an account

<script type="text/javascript">
   new SK.API(
      null, // Will use the current session ID
      null  // Leave the default properties
          // No parameters for this API call
      function( success, message, data ) {
         if ( ! success ) { alert( message ); return; }

         // Inject the name of each database in the "databases" div below
         data.databases.each( function( db ) {
            var name =;
            new Element( 'div', { text: name } ).inject( $( 'databases' ) );
         } );
<div id="databases"></div>