Retrieving Components List
The get-components operation is used in the following situations:
- to retrieve list of available for installation components
- to check status of already installed components
Note: This operation is supported only in Plesk for Unix.
Request Packet
A request XML packet retrieving status of Plesk Updater includes the get-components operation node:
<packet version="1.5.0.0">
<updater>
<get-components>
...
</get-components>
</updater>
</packet>
The graphical representation of the get-components node is 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 update-id node is required. It specifies the update ID. For info on how to retrieve the update ID, refer to the Retrieving Plesk Updates section. Data type: string.
Response Packet Structure
The get-components node of the output XML packet is presented by
type UpdaterGetComponentsOutputType (updater.xsd
) and 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 response retrieved from the server. Data type: resultType (
common.xsd
). -
The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
-
The errcode node is optional. Is returns the error code if the get-components operation fails. Data type: integer.
-
The errtext node is optional. It returns the error message if the get-components operation fails. Data type: string.
-
The component node is optional. It holds info on new and existing components. Data type: ComponentType (
updater.xsd
).If the component node is present in the response packet, the following nodes are required:
- The id node specifies the component ID. Data type: string.
- The action node specifies what to do with the component. It can be installed or upgraded. The unknown value is reserved for actions that are not supported in the current version of the protocol. The up2day value tells that component is up to date. Data type: string. Allowed values: install | upgrade | up2date | unknown.
- The description node holds a brief description of the component. Data type: string.
- The server-build-time node specifies time of last build of the version containing the component. Here we consider version of Plesk on the update server. Data type: timestamp.
- The local-build-time node specifies time of last build of the version containing the component. Here we consider version of Plesk on your server.
- The server-version node specifies Plesk version on the update server. Data type: string.
- The local-version node specifies your current Plesk version. Data type: string.
Samples
This request packet retrieves components of the update with ID 8.
<packet version="1.5.0.0">
<updater>
<get-components>
<update-id>PLESK_8_1_1</update-id>
</get-components>
</updater>
</packet>
Response:
<packet version="1.5.0.0">
<updater>
<get-components>
<result>
<status>ok</status>
<component>
<id>base</id>
<action>upgrade</action>
<description>Base packages of Plesk</description>
<server-build-time>1172072935</server-build-time>
<local-build-time>1171899420</local-build-time>
<server-version>8.1.1-suse9.3.build81070219.20</server-version>
<local-version>8.1.1-suse9.3.build81070221.20</local-version>
</component>
...
<id>ja-JP-locale</id>
<action>up2date</action>
<description>Japanese language pack</description>
<server-build-time>1171545168</server-build-time>
<local-build-time>1171545168</local-build-time>
<server-version>8.1-build81070215.19</server-version>
<local-version>8.1-build81070215.19</local-version>
</component>
</result>
</get-components>
</updater>
</packet>