API Usage and Methods

img Hunter Day

Mar 28, 2019


OnePortal 7

API Usage

All customers can use POST or GET to obtain or send data to our API. In addition, any customer that chooses to use the API must add the IP address of the system attempting to access the API in the Control Panel -> Administrative -> API portion of their control panel. After adding an IP to the list of authorized hosts in your API control panel you will see the API key next to the IP address in the list. This API key is specific to this IP address and your server control panel account.

You MUST edit the privileges of the newly added IP if you want it to be able to access the API's methods.

The base URL is: :


An example would be: :


The request above from an authorized host would return your account's current balance.

Returned Data Samples

Data returned from the API is in basic XML format. The following are examples of the data returned for each of the methods and their respective actions.


The 'getbalance' action will return your client ID and account balance, the value expressed is USD. :

<source lang="xml">
    <client id="2XXX">

The 'history' action will return a list of invoices. Each invoice includes the date of invoice, due date, short description, status, and list of payments pertaining to each invoice. A paid invoice will have an invoices->invoice->status of completed. :

  <invoice id="1XXX1">
    <created>2008-12-17 15:04:44</created>
    <description>New Server Order</description>
      <payment id="1XXXX2">


The 'list' action will return the list of servers available in the control panel. The list includes each server's ID, display name, public/private ips, power/port status, and bandwidth usage. :

 <server id="LSN-D0000">

Code Samples

The following are some simple examples of how to query data from the API.

Simple PHP Example

The following example requires the simplexml_load_file function which is included with PHP5 but not PHP4. :

$apiKeyList = array(

foreach ($apiKeyList as $apiKey) {
   $apiData = "https://one.limestonenetworks.com/webservices/clientapi.php?key=".$apiKey."&mod=servers&action=list"

   $serverList = simplexml_load_file($apiData)

   foreach ($serverList->server as $serverItem) {
       print "<ul>"
       ."<li>Server ID = {$serverItem->attributes()->id}"
       ."<li>Server Name = {$serverItem->displayname}"
       ."<li>Server Public IP = {$serverItem->publicip}"
       ."<li>Server Bandwidth Used = {$serverItem->bandwidth->actual->friendly}"