Version 3 by Pete Onni
on Mar 10, 2010 22:41.

compared with
Current by Nata Ramanenka
on Nov 07, 2012 05:49.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (19)

View Page History
{page-title}
h3. XML-RPC Method Calls

----
{toc-zone:location=top|maxLevel=3|minLevel=3|type=flat|separator=pipe|style=border:1}


| {{licensing.createPooledLicense}} | {{struct createPooledLicense(string poolID, string product, Map features)}} |
| {{licensing.disableLicense}} | {{struct disableLicense(String licenseID)}} |
| {{licensing.enableLicense}} | {{struct enableLicense(String licenseID)}} |
| {{licensing.getLicense}} | {{struct getLicense(String licenseID)}} |
| {{licensing.getLicensePool}} | {{struct getLicensePool(String poolID)}} |
| {{licensing.getLicensePools}} | * {{array getLicensePools()}}
* {{array getLicensePools(Map filter)}} |
| {{licensing.getLicenses}} | * {{array getLicenses()}}
* {{array getLicenses(Map filter)}}
* {{array getLicenses(String poolID)}}
* {{array getLicenses(String poolID, Map filter)}} |
| {{licensing.returnPooledLicenseFeatures}} | {{struct returnPooledLicenseFeatures(String licenseID, Map features)}} |
| {{licensing.upgradePooledLicense}} | {{struct upgradePooledLicense(String licenseID, Map features)}} |
| {{licensing.deletePooledLicense}} | {{boolean deletePooledLicense(String poolID, String licenseID)}} |



{panel:title=Licensing API Examples}

{children:excerpt=true}

{panel}


h4. Method Parameter Descriptions

* {{Map features}} \- Key/value map of features and their quantity value.
* {{Map filter}} \- Key/value map of filters and their value.
* {{String poolID}} \- ID (UUID) of the license pool you allocate CDP licenses from.
* {{String licenseID}} \- ID (UUID) of the CDP license key you created from a pool.
* {{String product}} \- The product type of the license ('CDP Server Stand Alone (Windows)', 'CDP Server Stand Alone (Linux)').

Many of the methods return Maps or take Maps as arguments. These maps may have different key/value mappings depending on the context. The maps basically represent different objects. These objects and their corresponding key/value mappings are described below.

----
h3. Objects
{toc-zone:location=top|maxLevel=5|minLevel=5|type=flat|separator=pipe|style=border:1}

Here is a description of the objects passed around. Many of the methods return Maps or take Maps as arguments. These maps may have different key/value mappings depending  on the context. The maps basically represent different objects. These objects and their corresponding key/value mappings are described below.
----

h4. License
h5. License Map

|| Name || Type || Description ||
| CDP for Control Panels Add-on | Boolean | Whether or not the license has the CDP for Control Panels add-on. |

h4. License Pool
h5. License Pool Map

|| Name || Type || Description ||
| CDP for Control Panels Add-on | Boolean | Whether or not the license has the CDP for Control Panels add-on. |

h4. Filter
h5. Filter Map

|| Name || Type || Description ||
| Product | String | Product type of the license ('CDP Server Stand Alone (Windows)', 'CDP Server Stand Alone (Linux)'). |

h4. Features
h5. Features Map

|| Name || Type || Description ||
| Archiving Add-ons | Integer | Number of Archiving add-ons. |

h3. Method Calls

{color:blue}licensing.createPooledLicense : struct createPooledLicense(string, string, struct){color}
{color:blue}licensing.disableLicense : struct disableLicense(string){color}
{color:blue}licensing.enableLicense : struct enableLicense(string){color}
{color:blue}licensing.getLicense : struct getLicense(string){color}
{color:blue}licensing.getLicensePool : struct getLicensePool(string){color}
{color:blue}licensing.getLicensePools : 1: array getLicensePools() 2: array getLicensePools(struct){color}
{color:blue}licensing.getLicenses : 1: array getLicenses() 2: array getLicenses(struct) 3: array getLicenses(string) 4: array getLicenses(string, struct){color}
{color:blue}licensing.returnPooledLicenseFeatures : struct returnPooledLicenseFeatures(string, struct){color}
{color:blue}licensing.upgradePooledLicense : struct upgradePooledLicense(string, struct){color}

h3. Examples (PHP)

*Connection*:
{code}
$accOwner = 'USERNAME';
$accPass = 'PASSWORD';
$client = new xmlrpc_client('https://api.r1soft.com/xmlrpc');
$client->setCredentials($accOwner, $accPass);
{code}
*Call*: {color:blue}licensing.getLicense : struct getLicense(string){color}
{code}
$licPool = 'LICENSE-POOL-KEY ';
$xmlrpc_msg = new xmlrpcmsg('licensing.getLicense', array(
new xmlrpcval($licPool, 'string')
));
{code}
*Returns*: Array
{code}
Array
(
[Enabled] => 1
[Archiving Add-ons Capacity] => 100
[Archiving Add-ons Available] => 87
[Service Provider API Add-on] => 1
[CDP for MySQL Add-ons Available] => 83
[CDP for Control Panels Add-on] => 1
[Windows Agents Available] => 69
[Windows Agents Capacity] => 100
[Linux Agents Capacity] => 125
[CDP for MySQL Add-ons Capacity] => 102
[ID] => 5c3dc847-5dbd-454a-9a5c-1545a02e68ee
[Linux Agents Available] => 94
)
{code}
{toc-zone} {excerpt:hidden=true}Description of objects and their corresponding key/value mappings. Method calls. Examples (PHP).{excerpt}
{toc-zone}{excerpt:hidden=true}Description of XML-RPC method calls for CDP 2.0.{excerpt}