The register operation is used to register an external webmail service.

Request Packet Structure

A request XML packet registering an external webmail service includes the register operation node:

<packet>
<webmail>
   <register>
   ...
   </register>
</webmail>
</packet>

The register node is presented by type RegisterInputType (webmail.xsd). Its graphical representation is as follows:

image 66993.gif

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 the criteria by which the necessary webmail service will be selected from the database.
  • The service node is required. It wraps the selected webmail service parameters. Data type: ServiceType (webmail.xsd).
  • The name node is required. It specifies the webmail service name. Data type: string.
  • The url node is required. It specifies the webmail service URL. Data type: string.
  • The status node is optional. It specifies the webmail service status. Data type: string.

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

The register node of the output XML packet is structured as follows:

image 66999.gif

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 information about the operation execution and the list of webmail services. Data type: WebmailResult (webmail.xsd).
  • 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 webmail node is required. It wraps the webmail service parameters.
  • The name node is required. It specifies the webmail service name. Data type: string.
  • The status node is optional. It specifies the webmail service status. Data type: string.
  • The url node is required. It specifies the webmail service URL. Data type: string.

Samples

This packet registers an external webmail service Horde in Plesk, the webmail service URL is http://example.com and it will be available for adding to service plans:

<packet>
<webmail>
   <register>
      <filter>
      <service>
         <name>Horde</name>
         <url>http://example.com</url>
         <status>true</status>
      </service>
      </filter>
   </register>
</webmail>
</packet>

Response:

<packet>
<webmail>
   <register>
      <result>
         <status>ok</status>
         <webmail>
            <name>Horde</name>
            <status>true</status>
            <url>http://example.com</url>
         </webmail>
      </result>
   </register>
</webmail>
</packet>