Automatic import from KB #115751

Scope

This article is applicable to APS applications of theShared Web Server provisioning type provided in SaaS mode and applications of theExternal System type with the scalar _domain-name_setting.

Note: An APS application setting (declared in the APP-META.xml file) with theclass="domain-name" is related to the customer's domain. The domain-name setting with type="list" allows you to attach several domains to an application instance, and its implementation differs from the not-list type. This article is not applicable to the domain-name setting with the_list _type.

A shared APS application in SaaS mode uses the resource type of class,Application(as opposed to Site Application). When the shared APS application is installed on the customer's domain, it means that a new website for the domain is created in the PA environment and that the application is installed in the website root.

For anExternal Systemapplication, installation on the customer's domainusually means that some DNS record (usually the "A" or "MX" record) is added to the domain zone, and that some service (website, eshop, etc.) is provided for the domain in an external system, outside of the PA environment.

Desired Behavior

An APS application purchased in the PA Online Store together with a domain is installed on the domain automatically.

Resolution

To achieve automatic installation of an APS application on a customer's domain, the following activation parameters should be enabled in the corresponding "Application" resource type:

  • Provision application on account's domain
  • Auto host domains
  • Automatically provision application
  • Provision application on vendor's domain.

Using POA OpenAPI

To achieve automatic installation of an APS application on a customer's domain via POA OpenAPI, two API calls should be performed: pem.activateSubscription followed by pem.addDomain.

So, the domain is added after a hosting subscription is activated, and we also need to pass the domain name in the pem.activateSubscription call. After the second call (pem.addDomain), while the domain is being added, the application is also installed on this domain.

See the example below.

pem.activateSubscription request: <?xml version='1.0'?><methodCall><methodName>pem.activateSubscription</methodName><params><param><value><struct><member><name>service_template_id</name><value><i4>2711</i4></value></member><member><name>parameters</name><value><array><data><value><struct><member><name>var_name</name><value><string>DomainID</string></value></member><member><name>var_value</name><value><string>customer.com</string></value></member></struct></value></data></array></value></member><member><name>subscription_name</name><value><string>GoMoBi3</string></value></member><member><name>account_id</name><value><i4>1000075</i4></value></member></struct></value></param></params></methodCall> Response: <?xml version='1.0'?><methodResponse><params><param><value><struct><member><name>result</name><value><struct><member><name>subscription_id</name><value><i4>14584</i4></value></member><member><name>auto_provisioning_result</name><value><array><data /></array></value></member></struct></value></member><member><name>status</name><value><i4></i4></value></member></struct></value></param></params></methodResponse> pem.addDomain request: <?xml version='1.0'?><methodCall><methodName>pem.addDomain</methodName><params><param><value><struct><member><name>subscription_id</name><value><i4>14584</i4></value></member><member><name>domain_name</name><value><string>customer.com</string></value></member></struct></value></param></params></methodCall> Response: <?xml version='1.0'?><methodResponse><params><param><value><struct><member><name>result</name><value><struct><member><name>domain_id</name><value><i4>8791</i4></value></member></struct></value></member><member><name>status</name><value><i4></i4></value></member></struct></value></param></params></methodResponse>

Internal content