Deleting Service Plans
The del operation is used to remove service plans.
Request Packet Structure
A request XML packet deleting service plans from Plesk database includes the del operation node:
<packet>
<service-plan>
<del>
...
</del>
</service-plan>
</packet>
The del node is presented by type DomainTemplateDeleteInputType
(domain_template.xsd
). Its graphical representation is as follows:
- The filter node is required. It serves to specify the criteria
by which the necessary service plans will be deleted from the
database. Data type: DomainTemplateFilterType
(
domain_template.xsd
). For details on the criteria, see the Available Filters section. - The owner-id node is optional. It specifies the ID of the service plan owner. Data type: integer.
- The owner-login node is optional. It specifies the login name of the service plan owner. Data type: string.
Note: When creating request packets, put nodes and elements in the order they follow in the 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.
Response Packet Structure
The del node of the output XML packet is of type
DomainTemplateDeleteOutputType (domain_template.xsd
) which is
structured as follows:
- The result node is required. It wraps the result of the del
operation for a single service plan. Data type: resultType
(
common.xsd
). - The status node is required. Specifies the execution status of the del operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is required if the del operation fails. Returns the error code. Data type: unsignedInt.
- The errtext node is optional. Returns the error message. Data type: string.
- The id node is optional. If the request packet fails before the execution, this node is missing in the response packet. In all other cases it holds the identifier of the service plan (if this ID was specified in the request packet). Data type: integer.
- The name node is optional. If the request packet fails before the execution, this node is missing in the response packet. In all other cases it holds the name of the service plan (if this name was specified in the request packet). Data type: string.
- The guid node is optional. It holds the GUID of the service plan. Data type: string.
- The external-id node is optional. It holds the ID of the service plan in the Panel components (for example, Business Manager). Data type: string.
- The problems node is optional. It holds the description of conflicts occurred on completion of the operation. Data type: string.
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.
Samples
This request packet deletes two service plans specified by ID.
<packet version="1.6.3.0">
<service-plan>
<del>
<filter>
<id>11</id>
<id>12</id>
</filter>
<owner-login>JDoe</owner-login>
</del>
</service-plan>
</packet>
Response:
<packet version="1.6.3.0">
<service-plan>
<del>
<result>
<status>ok</status>
<id>11</id>
</result>
<result>
<status>ok</status>
<id>12</id>
</result>
</del>
</service-plan>
</packet>