Retrieving Additional License Keys

The get_additional_key operation retrieves data of additional key installed on the server, such as the key name and number, key expiration date and usage (whether the key is active or not), key content and other properties.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving additional key data contains the get_additional_key operation node:

<packet version="1.6.7.0">
  <server>
    <get_additional_key>
      ...
    </get_additional_key>
  </server>
</packet>

 

The get_additional_key node is presented by complex type GetAdditionalKeyType (server_input.xsd) and structured as follows:

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is optional. It wraps the filtering rules defining which additional keys data to retrieve. Data type: GetAdditionalKeysFilter (server_input.xsd).
  • The name node is optional. It specifies the additional key in format "[key_number]/[key_name]". See the Request Samples section for examples. Data type: string.

To retrieve data of all additional keys installed on the server, use empty filter node, or omit it at all and send packet with empty get_additional_key node:

<packet version="1.6.7.0">
  <server>
    <get_additional_key>
      <filter/>
    </get_additional_key>
  </server>
</packet>

 

or

<packet version="1.6.7.0">
  <server>
    <get_additional_key/>
  </server>
</packet>
 

Response Packet Structure

The get_additional_key node of the response packet is structured as follows:

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the result of the get_additional_key operation. Data type: GetAdditionalKeyResultType (server_output.xsd).
  • The status node is required. It returns the execution status of the get_additional_key operation. Data type: string (common.xsd). Allowed values: ok | error.
  • The errcode node is optional. It returns the error code when the get_additional_key operation fails. Data type: unsignedInt.
  • The errtext node is optional. It returns the error message if the get_additional_key operation fails. Data type: string.
  • The name node is optional. It returns the value of the name node from request packet if retrieving the specified key info is impossible. Data type: string.
  • The key_info node is optional. It is required if the response successfully retrieves data of the specified key. Data type: additionalKeyType (server_output.xsd). The node structure is the following:

    • The number node is required. It returns the key number. Data type: string.
    • The name node is required. It returns the full key name in format "[key_number]/[key_name]". Data type: string.
    • The active node is required. It specifies if the key is installed and working, or if it is expired. Data type: boolean.
    • The license_update_date node is required if key expiration date is defined. It returns the date (in format YYYYMMDD) when a grace period starts, during which the key must be updated. Data type: integer.
    • The lim_date node is optional. It returns the date (in format YYYYMMDD) when the key expires. Data type: integer.
    • The content node is required. It returns the key body. Data type: base64.
    • The property node is optional. It holds the collection of data describing a particular key property. Data type: AdditionalKeyPropertyType (server_output.xsd).
      • The name node is required. It returns . Data type: string.
    • The value node is required. It returns . Data type: string.
 

Samples

Retrieving data of an additional license key

This packet retrieves data of the additional license key with number PLSK002694000000 and name antivir-drweb-4, which is the license key allowing using such additional Plesk feature as DrWeb Antivirus.

<packet version="1.6.7.0">
<server>
  <get_additional_key>
     <filter>
        <name>PLSK002694000000/antivir-drweb-4</name>
     </filter>
  </get_additional_key>
</server>
</packet>

Response:

<packet version="1.6.7.0">
<server>
<get_additional_key>
   <result>
      <status>ok</status>
      <key_info>
         <number>PLSK002694000000</number>
         <name>PLSK002694000000/antivir-drweb-4</name>
         <active>true</active>
         <license_update_date>20060506</license_update_date>
         <lim_date>20060511</lim_date>
         <content>IyEvYmluL3NoCgpQUk9EVUNUX1JPT1RfRD1gYXdrICckMSB+IC9QUk9EVUNUX1JPT1RfRC97IHByaW50ICQyfScgL2V0Yy9wc2EvcHNhLmNvbmZgCmlmIHRlc3QgLXogIiRQUk9EVUNUX1JPT1RfRCI7IHRoZW4KZWNobyAiUGxlc2sgbm90IGRldGVjdGVkIgpleGl0IDEKZmkKIiRQUk9EVUNUX1JPT1RfRC9hZG1pbi9zYmluL2tleW1uZyIgLS1pbnN0YWxsLWFkZGl0aW9uYWwgLS1zb3VyY2UtZmlsZT0iJDAiIC0tc2tpcD01CmV4aXQgJD8KCi0tLS0tQkVHSU4gUExFU0sgQURESVRJT05BTCBLRVktLS0tLQprZXlfbnVtYmVyPSdQTFNLMDAyNjk0NzMwMDAwJwprZXk9J095QkVjbGRsWWpNeUlIWTBMakUyS3lCTFpYa2dSbWxzWlEwS095QkVieUJ1YjNRZ1pXUnBkQ0VOQ2cwS095QWVIeDRmSGg4ZUh4NGZIaDhlSHg0ZkhoOGVIeDRmSGcwS0RRcGJTMlY1WFEwS1ZsSTlNREF3TURBd01EQXdNQTBLUVZBOU1EQXdNRFV5TkRNeU1BMEtRMUk5TVRFME5EY3pPVEl6T1EwS1JWZzlNVEUwTnpNek1USXpPUTBLVTBVOU1URTBOek16TVRJek9RMEtWbVZ5YzJsdmJqMUJiR3dOQ2tGd2NHeHBZMkYwYVc5dWN6MUVjbGRsWWxWdWFYZ3NUV0ZwYkVSaFpXMXZibFZ1YVhnTkNrTnlaV0YwWldROU1qQXdOaTB3TkMweE1TQW9NRGM2TURjcElGVlVRdzBLUlhod2FYSmxjejB5TURBMkxUQTFMVEV4SUNnd056b3dOeWtnVlZSRERRcFRkV0p6WTNKcGNIUnBiMjVGZUhCcGNtVnpQVEl3TURZdE1EVXRN</content>
         <property>
            <name>name</name>
            <value>antivir-drweb-4</value>
         </property>
         <property>
            <name>filename</name>
            <value>/etc/psa/key.d/keyyV1LsN</value>
         </property>
         <property>
            <name>key</name>
            <value>OyBEcldlYjMyIHY0LjE2KyBLZXkgRmlsZQ0KOyBEbyBub3QgZWRpdCENCg0KOyAeHx4fHh8eHx4fHh8eHx4fHh8eHx4fHg0KDQpbS2V5XQ0KVlI9MDAwMDAwMDAaW9ucz1EcldlYlVuaXgsTWFpbERhZW1vblVuaXgNCkNyZWF0ZWQ9MjAwNi0wNC0xMSAoMDc6MDcpIFVUQw0KRXhwaXJlcz0yMDA2LTA1LTExICgwNzowNykgVVRDDQpTdWJzY3JpcHRpb25FeHBpcmVzPTIwMDYtMDUtMTEgKDA3OjA3KSBVVEMNCg0KW0RlYWxlcl0NCk51bWJlcj0wMDEwMDAwMDAwDQpOYW1lPVBsZXNrDQpHVj00MzIwMDUNClAxPTg2MUYwRUZBNTRGMjEwMzFBRUNCODFBRUY4N0E3QTkyRUVEMzRCNTdFNzJERjk5MjNBNkYyRjZBRDY3MM3RUI0OTM4RUZFMjNGQTM4NkMwNzU5MDYzOTRGOTg1Qg0KDQpbVXNlcl0NCk51bWJlcj0wMTAwNTExNTgwDQpOYW1lPUFsZXhhbmRlciBLcmFzbm92IChTVy1Tb2Z0LCBJbmMpIChURVNUKQ0KQ29tcHV0ZXJzPTENCkdWPTQzMzAwMw0KDQpbU2V0dGluZ3NdDQpNYWlsU2VydmVyPVllcw0KRmlsZVNlcnZlcj1Obw0KSW5ldEdhdGV3YXk9Tm8NCkVtYWlsQWRkcmVzc2VzPVVubGltaXRlZA0KVHJhZmZpY0xpbWl0PVVubGltaXRlZA0KDQpbU2lnbmF0dXJlXQ0KVmFsdWU9NDdFOTg3RDQwMEU1NzFBNjM5MkFCRDVFOUQ5Qjc5NTgzRkMzMTQ2MzEzMTlGODEzOEFBQjU4QTJCQ0Q4OEM0OUMyNzIxM0NFQTVBREMyMEUNCg==</value>
         </property>
      </key_info>
   </result>
</get_additional_key>
</server>
</packet>
Retrieving data of all additional license keys

This packet retrieves data of all additional license keys installed on server:

<packet version="1.6.7.0">
<server>
  <get_additional_key/>
</server>
</packet>

Response (if no additional keys are installed):

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <server>
    <get_additional_key>
      <result>
        <status>ok</status>
      </result>
    </get_additional_key>
  </server>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.