Article ID: 119712, created on Jan 18, 2014, last review on May 23, 2016

  • Applies to:
  • Plesk Automation 11.1
  • Plesk Automation 11.5

Question

How to create subscriptions using PA API request?

Answer

Use pem.activateSubscription method to create subscription via API:

<?xml version="1.0"?> 
<methodCall> 
  <methodName>pem.activateSubscription</methodName>  
  <params>  
    <param> 
      <value> 
         <struct>  
          <member>  
            <name>subscription_id</name> 
            <value><int>${theSubscriptionID}</int></value > 
          </member> 
          <member>  
            <name>service_template_id</name> 
            <value><int>${theServiceTemplateID}</int></value> 
          </member> 
          <member>  
            <name>account_id</name> 
            <value><int>${theAccountID}</int></value> 
          </member> 
          <member>  
            <name>resource_limits</name> 
            <value> 
              <array> 
                <data> 
                   <value>  
                    <struct>  
                      <member>  
                        <name>resource_id</name> 
                        <value><int>${rt_id1}</int></value> 
                      </member> 
                      <member>  
                        <name>resource_limit </name> 
                        <value><int>${Limit_1}</int></value> 
                      </member> 
                    </struct> 
                   </value>  
                   ...  
                   <value> 
                    <struct>  
                      <member>  
                        <name>resource_id</name> 
                        <value><int>${rt_idN}</int></value> 
                      </member> 
                      <member>  
                        <name>resource_limit </name> 
                        <value><int>${Limit_N}</int></value> 
                      </member> 
                    </struct> 
                   </value>  
                </data> 
              </array>  
            </value>  
          </member> 
         <member>  
            <name>parameters</name> 
            <value> 
               <array> 
                <data> 
                   <value> 
                    <struct>  
                      <member>  
                        <name>var_name</name> 
                        <value><string>domain_name</string></value> 
                      </member> 
                      <member>  
                        <name>var_value</name> 
                        <value><string>example.com</string></value> 
                      </member> 
                    </struct> 
                   </value>  
                  ...  
                   <value> 
                    <struct>  
                      <member>  
                        <name>var_name</name> 
                        <value><string>${Name_N}</string></value> 
                      </member> 
                       <member>  
                        <name>var_value</name> 
                        <value><string>${Value_N}</string></value> 
                      </member> 
                    </struct> 
                   </value>  
                </data> 
              </array> 
            </value>  
          </member>           
         </struct> 
      </value>  
    </param>  
  </params> 
</methodCall> 

Refer to Integration Guide for additional information.

Search Words

Integration Api

Plesk API

c1ecc6010feff26cb42d1d14a7881dd6 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065 33a70544d00d562bbc5b17762c4ed2b3

Email subscription for changes to this article
Save as PDF