Use the get-status operation to retrieve status of mailing list service on a specified site.

Request Packet Structure

A request XML packet retrieving status of a mailing lists service includes the get-status operation node:

<packet version="1.6.7.0">
<maillist>
<get-status>
...
</get-status>
</maillist>
</packet>

The get-status node is presented by the MaillistGetStatusInputType type (maillist.xsd), and its graphical representation is as follows:

image 36502

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 filtering rule. For information on this filter, refer to the Available Filters section. Data type: MaillistToggleFilterType (maillist.xsd) .

Remarks

You can retrieve status of mailing lists service on multiple sites using different filtering rules in a single packet. Add as many get-status operations as the number of different filtering rules to be applied.

<get-status>
   ...
</get-status>
   ...
<get-status>
   ...
</get-status>

Response Packet Structure

The get-status node of the output XML packet is presented by type MaillistGetStatusOutputType (maillist.xsd) and structured as follows:

image 36507

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: resultFilterType (common.xsd).
  • The status node is required. It specifies the execution status of the get-status operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get-status operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get-statuse operation fails. Data type: string.
  • The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Available Filters section. Data type: anySimpleType.
  • The id node is optional. This node does not contain any data for this operation. Data type: integer.
  • The service-status node is optional. It specifies if the mailing lists service is activated or deactivated. Data type: boolean.

Samples

Retrieving status of mailing lists service on a single site

This request packet retrieves status of the mailing lists service on the site called Mysite.com.

<packet>
<maillist>
<get-status>
   <filter>
      <site-name>Mysite.com</site-name>
   </filter>
</get-status>
</maillist>
</packet>

Response:

<packet>
<maillist>
<get-status>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
      <service-status>true</service-status>
   </result>
</get-status>
</maillist>
</packet>

If the site was not found on the server, the result looks as follows:

<packet>
<maillist>
<get-status>
   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Domain does not exist</errtext>
      <filter-id>Mysite.com</filter-id>
   </result>
</get-status>
</maillist>
</packet>

Retrieving status of mailing lists service on multiple sites

This request packet retrieves status of mailing list service on the sites Mysite.com, My2site.com, and on the site specified by ID 5.

<packet>
<maillist>
<get-status>
   <filter>
      <site-name>Mysite.com</site-name>
      <site-name>My2site.com</site-name>
   </filter>
</get-status>
<get-status>
   <filter>
      <site-id>5</site-id>
   </filter>
</get-status>
</maillist>
</packet>

Response:

<packet>
<maillist>
<get-status>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
      <service-status>false</service-status>
   </result>
   <result>
      <status>ok</status>
      <filter-id>My2site.com</filter-id>
      <service-status>true</service-status>
   </result>
</get-status>
<get-status>
   <result>
      <status>ok</status>
      <filter-id>5</filter-id>
      <service-status>true</service-status>
   </result>
</get-status>
</maillist>
</packet>