Updating an Additional Service
The update operation is used to edit a custom option of service plans (additional service).
Request Packet Structure
A request XML packet editing an additional service includes the update operation node:
<packet> <plan-item> <update> ... </update> </plan-item> </packet>
The update node does not have a separate data type, it is nested within the complex type (
plan_item.xsd). The update node has the following graphics representation:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/22.214.171.124/agent_input.svg.
- The filter node is required. It specifies the criteria by which the necessary additional service will be selected from the database. Data type: PlanItemFilterType (
plan_item.xsd). To see the structure of this node, proceed to topic Available Filters.
- The visible node is optional. It specifies whether the additional service is available for adding to subscriptions. Data type: boolean.
- The label node is optional. It specifies the additional service name. Data type: text.
- The tooltip node is optional. It specifies additional service description. Data type: text.
- The url node is optional. It specifies the URL attached to the custom button created for the additional service. Data type: urlType.
- The internal node is optional. It defines if the URL is opened in the right Plesk frame or in the new window. Data type: boolean.
- The noframe node is optional. If the URL leads to a Plesk extension or web app, this option specifies how the extension/app should be displayed on the Plesk page: in a frame or as a part of the Plesk GUI. The latter is recommended as the extension/app is seamlessly integrated into the Plesk GUI. Note that the noframe option is relevant only for the extensions/apps that support this feature. If an extension/app does not support the integration with the Plesk GUI, it will be displayed in a frame regardless of the noframe value. Data type: boolean.
- The url-components node is optional. It specifies what information is included into HTTP request when a customer clicks a custom button for the additional service. Data type: PlanItemUrlComponentsType (
plan_item.xsd). To see the structure of this node, proceed to topic url-components.
- The image-file node is optional. It specifies the path to background image for the custom button. Data type: string.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The update node of the output XML packet is structured as follows:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/126.96.36.199/agent_output.svg.
- The result node is required. It wraps the information about the operation execution and the list of webmail services. Data type: PlanItemResultType (
- The status node is required. It specifies the execution status of the operation. Data type: result_status (string). Allowed values: ok | error.
- The errcode node is optional. It returns the error code. Data type: unsignedInt.
- The errtext node is optional. It returns the error message. Data type: string.
- The name node is required. It specifies the additional service name. Data type: string.
Editing an additional service
This packet edits an additional service plan-item with the following information: the additional service is called New Service, its description is Additional service description, the additional service is available for adding to subscriptions, the URL attached to a custom button created for this additional service is http://domain.com, site ID and name, FTP user name and password is included into HTTP request when a customer clicks the custom button, the filename.png file is used as a background image for the custom button.
<packet> <plan-item> <update> <filter> <name>plan-item</name> </filter> <visible>true</visible> <label>New Service</label> <tooltip>Additional service description.</tooltip> <url>http://domain.com</url> <internal>true</internal> <url-components> <dom-id>true</dom-id> <dom-name>true</dom-name> <ftp-user>true</ftp-user> <ftp-pass>true</ftp-pass> <cl-id>false</cl-id> <cname>false</cname> <pname>false</pname> <email>false</email> </url-components> <image-file>filename.png</image-file> </update> </plan-item> </packet>
<packet> <plan-item> <update> <result> <status>ok</status> <name>plan-item</name> </result> </update> </plan-item> </packet>
Leave your feedback on this topic here
If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.