API License Module createPleskLicenseRequest
From Openprovider API documentation
(Difference between revisions)
(→Using PHP class) |
|||
Line 29: | Line 29: | ||
->setAuth(array('username' => 'username', 'password' => 'password')) | ->setAuth(array('username' => 'username', 'password' => 'password')) | ||
->setArgs(array( | ->setArgs(array( | ||
- | 'productId' => | + | 'productId' => 7, |
'title' => 'Linux server APOLLO', | 'title' => 'Linux server APOLLO', | ||
'options' => array( | 'options' => array( |
Revision as of 06:37, 11 April 2017
Contents |
Module Licenses > Create License
Module | Licenses |
Command name | createLicenseRequest |
Use | Order a new license |
Input | |
Output |
|
Examples
Using PHP class
$request = new OP_Request; $request->setCommand('createLicenseRequest') ->setAuth(array('username' => 'username', 'password' => 'password')) ->setArgs(array( 'productId' => 7, 'title' => 'Linux server APOLLO', 'options' => array( 'version' => 10, 'os' => 'windows', 'domains' => 30, 'features' => array('POWERPACK'), 'period' => 12 ) ));
Raw XML
Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.
<?xml version="1.0" encoding="UTF-8"?> <openXML> <credentials> <username>username</username> <password>password</password> </credentials> <createLicenseRequest> <productId>1</productId> <title>Linux server APOLLO</title> <options> <version>10</version> <os>windows</os> <domains>30</domains> <features> <array> <item>POWERPACK</item> </array> </features> <period>12</period> </options> </createLicenseRequest> </openXML>
<?xml version="1.0" encoding="UTF-8"?> <openXML> <reply> < code>0</code> <desc /> <data> <id>1446</id> </data> </reply> </openXML>