Retrieving Mailing Lists
Use the get-list operation to retrieve preferences of specified mailing lists. Use filters to specify mailing lists by name, ID, site ID, or site name. For information on filters, refer to the Available Filters section.
Request Packet Structure
A request XML packet retrieving a mailing list preferences includes the get-list operation node:
The get-list node is presented by the MaillistGetListInputType type (
maillist.xsd), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. For information on this filter, refer to the Available Filters section. Data type: MaillistFilterType (
You can retrieve parameters of multiple mailing lists using different filtering rules in a single packet. Add as many get-list operations as the number of different filtering rules to be applied.
Response Packet Structure
The get-list node of the output XML packet is presented by type MaillistGetListOutputType (
maillist.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: ResultFilterType (
- The status node is required. It specifies the execution status of the get-list operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the get-list operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the get-list 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. It returns ID of the mailing list in Plesk database if the operation succeeds. Data type: integer.
- The name node is optional. It is required if the operation succeeds. It returns the name of the mailing list. Data type: string.
- The list-status is optional. It is required if the operation succeeds. It returns the status of the mailing list. Data type: boolean.
Retrieving information on a single mailing list
This request packet retrieves preferences of the mailing list called MyMailer.
If mailing list MyMailer was not found on the server, the response is as follows:
Retrieving information on multiple mailing lists
This request packet retrieves preferences of all mailing lists on the sites with ID 1 and ID 21.
Response (if the site with ID 21 was not found on the server, and the site with ID 1 has two active mailing lists):