The get operation is used to retrieve info on site aliases from Plesk database that includes the following parameters:
A request XML packet retrieving a site alias settings from Plesk database includes the get operation node:
<packet version="1.6.3.0">
<site-alias>
<get>
...
</get>
</site-alias>
</packet>
The get node graphical representation is as follows:
domainalias_input.xsd
).The get node of the output XML packet is structured as follows:
common.xsd
). The status node is required. Specifies the execution status of the get operation. Data type: string. Allowed values: ok | error.
plesk_domainalias.xsd
).This packet retrieves preferences of the site alias called MyAlias.com.
<packet>
<site-alias>
<get>
<filter>
<name>MyAlias.com</name>
</filter>
</get>
</site-alias>
</packet>
A positive response received from the server after retrieving info on the site alias can look as follows:
<packet>
<site-alias>
<get>
<result>
<status>ok</status>
<info>
<prefs>
<web>true</web>
<mail>false</mail>
<tomcat>false</tomcat>
</prefs>
<site-id>3</site-id>
<name>MyAlias.com</name>
<ascii-name>MyAlias.com</ascii-name>
</info>
</result>
</get>
</site-alias>
</packet>
This packet retrieves preferences of the site aliases called MyAlias.com and MySecondAlias.com.
<packet>
<site-alias>
<get>
<filter>
<name>MyAlias.com</name>
<name>MySecondAlias.com</name>
</filter>
</get>
</site-alias>
</packet>
A positive response got from the server can look as follows (two site aliases exist for this site name):
<packet>
<site-alias>
<get>
<result>
<status>ok</status>
<info>
<prefs>
<web>false</web>
<mail>false</mail>
<tomcat>false</tomcat>
</prefs>
<site-id>3</site-id>
<name>MyAlias.com</name>
<ascii-name>MyAlias.com</ascii-name>
</info>
</result>
<result>
<status>ok</status>
<info>
<prefs>
<web>true</web>
<mail>false</mail>
<tomcat>false</tomcat>
</prefs>
<site-id>3</site-id>
<name>My2Alias.com</name>
<ascii-name>My2Alias.com</ascii-name>
</info>
</result>
</get>
</site-alias>
</packet>
The following packet is wrong because both name and site-id are used for identification.
<packet>
<site-alias>
<get>
<filter>
<name>MyAlias.com</name>
<site-id>12</site-id>
</filter>
</get>
</site-alias>
</packet>
This packet retrieves preferences of all site aliases on the server.
<packet>
<site-alias>
<get>
<filter/>
</get>
</site-alias>
</packet>