This documentation has moved

XML API documentation can now be found at developer.openprovider.com. This page will remain available until September 2026, but will no longer be updated.

The XML API itself is not changing. Your existing integration continues to work.

API License Module createPleskLicenseRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Using PHP class)
m (Using PHP class)
 
(7 intermediate revisions not shown)
Line 15: Line 15:
*'''title''' ''text''
*'''title''' ''text''
*'''comment''' ''text''
*'''comment''' ''text''
-
*'''[[API Format License Options#License_items_for_Plesk|items]]'''
+
*'''[[API Format License Options##License_items_for_Plesk|items]]''' ''License Items for Plesk''
 +
*'''[[API Format License Options#License_features|features]]''' ''Features for Plesk''
 +
*'''[[API Format License Options#License_features|attachedKeys]]''' ''Third-party extension keys''
 +
*'''parentKeyId''' ''key number of a parent license(optional)''
*'''period''' = ''1, 12, 24''
*'''period''' = ''1, 12, 24''
*'''ipAddressBinding''' ''ipv4/ipv6 address''
*'''ipAddressBinding''' ''ipv4/ipv6 address''
Line 29: Line 32:
  $request = new OP_Request;
  $request = new OP_Request;
  $request->setCommand('createPleskLicenseRequest')
  $request->setCommand('createPleskLicenseRequest')
-
  ->setAuth(array('username' => 'username', 'password' => 'password'))
+
    ->setAuth(['username' => 'username', 'hash' => 'hash'])
-
  ->setArgs(array(
+
    ->setArgs([
-
      'productId' => 7,
+
            'period' => 1,
-
      'title' => 'Linux server APOLLO',
+
            'title' => 'Plesk Web Admin with features',
-
      'options' => array(
+
            'items' => [
-
        'version' => 12,
+
                'PLESK-12-WEB-ADMIN-1M',
-
        'type' => 'webHost',
+
                'FT-PLESK-DEVELOPER-PACK-1M',
-
        'period' => 12,
+
                'FT-PLESK-WPB-10-SITES-1M',
-
        'langPacks' => 1,
+
                'FT-PLESK-DISABLE-SITEBUILDER',
-
        'pack' => 'POWERPACK',
+
                'FT-PLESK-EMAIL-SECURITY-PACK-WITH-KASPERSKY-AV',
-
        'sites' => 30,
+
                'FT-PLESK-CLOUDFLARE-SERVERSHIELD-PLUS-ADVANCED',
-
        'virtualization' => 'unified'
+
                'FT-PLESK-1-LANGUAGE-PACK-1M'
-
      )
+
            ],
-
  ));
+
            'attachedKeys' => [
 +
                'ADD-DNSSEC-1M',
 +
                'ADD-ADDENDIO-DOCKER-BUSINESS-1M'
 +
            ],
 +
    ]);
===Raw XML===
===Raw XML===
Line 48: Line 55:
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
  <openXML>
  <openXML>
-
  <credentials>
+
  <credentials>
-
    <username>username</username>
+
    <username>username</username>
-
    <password>password</password>
+
    <password>password</password>
-
  </credentials>
+
  </credentials>
-
  <createLicenseRequest>
+
  <createPleskLicenseRequest>
-
    <productId>7</productId>
+
    <title>Plesk Web Admin with features</title>
-
    <title>Linux server APOLLO</title>
+
    <period>1</period>
-
    <options>
+
    <items>
-
      <version>12</version>
+
        <array>
-
      <type>webHost</type>
+
      <item>PLESK-12-WEB-ADMIN-1M</item>
-
      <period>12</period>
+
      <item>FT-PLESK-DEVELOPER-PACK-1M</item>
-
      <langPacks>1</langPacks>
+
      <item>FT-PLESK-WPB-10-SITES-1M</item>
-
      <pack>POWERPACK</pack>
+
      <item>FT-PLESK-1-LANGUAGE-PACK-1M</item>
-
      <sites>30</sites>
+
      <item>FT-PLESK-DISABLE-SITEBUILDER</item>
-
      <virtualization>unified</virtualization>
+
      <item>FT-PLESK-EMAIL-SECURITY-PACK-WITH-KASPERSKY-AV</item>
-
    </options>
+
      <item>FT-PLESK-CLOUDFLARE-SERVERSHIELD-PLUS-ADVANCED</item>
-
  </createLicenseRequest>
+
        </array>
 +
    </items>
 +
    <attachedKeys>
 +
        <array>
 +
            <item>ADD-DNSSEC-1M</item>
 +
            <item>ADD-ADDENDIO-DOCKER-BUSINESS-1M</item>
 +
        </array>
 +
    </attachedKeys>
 +
    <restrictIPBinding>true</restrictIPBinding>
 +
  </createPleskLicenseRequest>
  </openXML>
  </openXML>
Line 73: Line 89:
     <desc />
     <desc />
     <data>
     <data>
-
       <id>1446</id>
+
       <id>236278</id>
     </data>
     </data>
   </reply>
   </reply>
  </openXML>
  </openXML>

Current revision as of 12:23, 13 September 2018

Contents

License Module > Create License

Module License
Command name createPleskLicenseRequest
Use Order a new license
Input
  • title text
  • comment text
  • items License Items for Plesk
  • features Features for Plesk
  • attachedKeys Third-party extension keys
  • parentKeyId key number of a parent license(optional)
  • period = 1, 12, 24
  • ipAddressBinding ipv4/ipv6 address
  • restrictIPBinding true | false
Output
  • id

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('createPleskLicenseRequest')
   ->setAuth(['username' => 'username', 'hash' => 'hash'])
   ->setArgs([
           'period' => 1,
           'title' => 'Plesk Web Admin with features',
           'items' => [
               'PLESK-12-WEB-ADMIN-1M',
               'FT-PLESK-DEVELOPER-PACK-1M',
               'FT-PLESK-WPB-10-SITES-1M',
               'FT-PLESK-DISABLE-SITEBUILDER',
               'FT-PLESK-EMAIL-SECURITY-PACK-WITH-KASPERSKY-AV',
               'FT-PLESK-CLOUDFLARE-SERVERSHIELD-PLUS-ADVANCED',
               'FT-PLESK-1-LANGUAGE-PACK-1M'
           ],
           'attachedKeys' => [
               'ADD-DNSSEC-1M',
               'ADD-ADDENDIO-DOCKER-BUSINESS-1M'
           ],
   ]);

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>
 <createPleskLicenseRequest>
   <title>Plesk Web Admin with features</title>
   <period>1</period>
   <items>
       <array>
     <item>PLESK-12-WEB-ADMIN-1M</item>
     <item>FT-PLESK-DEVELOPER-PACK-1M</item>
     <item>FT-PLESK-WPB-10-SITES-1M</item>
     <item>FT-PLESK-1-LANGUAGE-PACK-1M</item>
     <item>FT-PLESK-DISABLE-SITEBUILDER</item>
     <item>FT-PLESK-EMAIL-SECURITY-PACK-WITH-KASPERSKY-AV</item>
     <item>FT-PLESK-CLOUDFLARE-SERVERSHIELD-PLUS-ADVANCED</item>
       </array>
   </items>
   <attachedKeys>
       <array>
           <item>ADD-DNSSEC-1M</item>
           <item>ADD-ADDENDIO-DOCKER-BUSINESS-1M</item>
       </array>
   </attachedKeys>
   <restrictIPBinding>true</restrictIPBinding>
 </createPleskLicenseRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    < code>0</code>
    <desc />
    <data>
      <id>236278</id>
    </data>
  </reply>
</openXML>
Views
Personal tools