Getting Information About Subscriptions
The get operation lets you obtain settings of given subscriptions.
Request Packet Structure
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.
A request XML packet getting information about the specified subscriptions includes the get operation node:
<packet>
<webspace>
<get>
...
</get>
</webspace>
</packet>
The get node does not have a separate data type, it is nested within
the complex type DomainTypeRequest (domain_input.xsd
). The get
node has the following graphics representation:
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 required. It specifies subscriptions whose
information will be got from Plesk database. Data type:
DomainFilterType (
domain_input.xsd
). To see the structure of this node, proceed to topic Available Filters. - The dataset node is required. It specifies what type of
information about the specified subscriptions is requested. Data
type: domainDatasetType (
plesk_domain.xsd
). It contains the following nodes:- The gen_info node is optional. It is used to request general information about the specified subscriptions. Data type: none.
- The hosting node is optional. It is used to request hosting settings of the specified subscriptions. Data type: none.
- The hosting-basic is optional. It is used to request a basic set of hosting options of the subscription (more limited than in the hosting node). Data type: none.
- The limits node is optional. It is used to request the limits on Plesk resources set for the specified subscriptions. Data type: none.
- The stat node is optional. It is used to request statistics settings of the specified subscriptions. Data type: none.
- The prefs node is optional. It is used to request preferences set for the specified subscriptions. Data type: none.
- The disk_usage node is optional. It is used to request the disk usage information for the specified subscriptions. Data type: none.
- The performance node is optional. It is used to request performance settings set for the specified subscriptions. Data type: none.
- The subscriptions node is optional. It is used to request the subscription lock and sync statuses and associated service plans and add-ons. Data type: none.
- The permissions node is optional. It is used to request permissions for the specified subscriptions. Data type: none.
- The plan-items node is optional. It is used to request associated additional services for the specified subscriptions. Data type: none.
- The php-settings node is optional. It is used to request custom PHP configuration of the specified subscription. Data type: none.
- The resource-usage node is optional. It is used to request the resources used by the subscription. Data type: none.
- The mail node is optional. It is used to request the mail settings of the subscription. Data type: none.
- The aps-filter node is optional. It is used to request the information if the application filter is switched on. The application filter allows to select only the particular applications that will be available in the subscription. Data type: boolean.
- The packages node is optional. It is used to request the list of available applications if the application filter is switched on. Data type: none.
Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The get 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 optional. It wraps the result of the
requested get operation. It can be missing if some error occurs
before the validation starts. Data type: resultType
(
common.xsd
). - The status node is required. It returns the execution status of the get operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Ii is used to return the error code when the get operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return the error message if the get operation fails. Data type: string.
- The filter-id node is optional. If supported, it is always present and used to return the parameter by which the subscription was filtered by in the request packet. Data type: anySimple.
- The id node is optional. The node is always missing if the
request packet fails before the validation on the server side. If
present, it returns the identifier of the subscription whose settings
are requested. Data type: id_type (
common.xsd
). - The data node is optional. It is used to return a collection of requested subscription settings if the get operation succeeds. Data type: none.
The data node of the response get packet is structured as follows:
- The gen_info node is optional. If specified in the request
packet, it returns a collection of general subscription settings.
Data type: domainGenInfoType (
plesk_domain.xsd
). See the General Account Information topic for details. - The hosting node is optional. If specified in the request
packet, it returns hosting settings of the specified subscription.
Data type: domainHostingAgentGet (
plesk_domain.xsd
). See the Hosting Settings topic for details. - The limits node is optional. If specified in the request
packet, it returns a collection of limits set for the specified
subscriptions. Data type: domainLimits (
plesk_domain.xsd
). See the Limits topic for details. - The stat node is optional. If specified in the request packet,
it returns a collection of statistics settings set for the specified
subscriptions. Data type: domainStat (
plesk_domain.xsd
). See the Statistics Settings topic for details. - The prefs node is optional. If specified in the request packet,
it returns a collection of preferences set for the specified
subscriptions. Data type: domainPrefs (
plesk_domain.xsd
). See the Subscription Preferences topic for details. - The disk_usage node is optional. If specified in the request packet, it returns a collection of hard disk limits set for the specified subscriptions. Data type: none. See the Disk Usage Settings topic for details.
- The performance node is optional. If specified in the request
packet, it returns a collection of performance settings set for the
specified subscriptions. Data type: DomainPerformanceType
(
plesk_domain.xsd
). See the Performance Settings topic for details. - The subscriptions node is optional. If specified in the request
packet, it returns a subscription lock and sync statuses and a
collection of associated service plans and add-ons. Data type:
SubscriptionsList (
plesk_domain.xsd
). See the section Subscription Statuses and Associated Plans for details. - The mail node is optional. It specifies the mail settings of
the subscription. Data type: MailPreferences
(
plesk_mailname.xsd
). See the section Mail Service Preferences for details.
Samples
Getting multiple subscriptions
To specify some subscriptions by id and others by name, use
different <get>
sections:
<packet>
<webspace>
<get>
<filter>
<id>123</id>
<id>124</id>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
<get>
<filter>
<name>example.com</name>
<name>sample.net</name>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
Multiple subscriptions can be specified within one filter either by id, or by name. The following packet is invalid as it uses both nodes within one filter:
<packet>
<webspace>
<get>
<filter>
<id>123</id>
<id>124</id>
<name>example.com</name>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
To get the information about all subscriptions registered in Plesk, the following packet can be used:
<packet>
<webspace>
<get>
<filter/>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
To get all subscriptions of a certain Plesk user, use ‘group’ filtering (see the Available Filters section for details). Plesk users whose subscriptions are requested can be specified within one filter either by owner-id or by owner-login.
<packet>
<webspace>
<get>
<filter>
<owner-login>JDoe</owner-login>
<owner-login>RRoe</owner-login>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
<get>
<filter>
<owner-id>1342</owner-id>
<owner-id>1452</owner-id>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
You cannot specify Plesk users by login and by id in one filter. Use
different filters (and <get>
nodes) instead.
<packet>
<webspace>
<get>
<filter>
<owner-login>JDoe</owner-login>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
<get>
<filter>
<owner-id>1342</owner-id>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
To retrieve information on all subscriptions belonging to the calling Plesk reseller, specify request packet as follows:
<packet>
<webspace>
<get>
<filter/>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
Use this packet to retrieve all subscriptions of an XML API requester.
<packet>
<webspace>
<get>
<filter/>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>
Getting different types of information
To get the whole set of information about Plesk user subscriptions, use the following packet:
<packet>
<webspace>
<get>
<filter/>
<owner-login>RRoe</owner-login>
</filter>
<dataset/>
</get>
</webspace>
</packet>
To fetch a particular kind of data (e.g. hosting settings, limits, and statistics settings), add certain child elements to in the dataset section as follows:
<packet>
<webspace>
<get>
<filter>
<id>123</id>
</filter>
<dataset>
<hosting/>
<limits/>
<stat/>
</dataset>
</get>
</webspace>
</packet>