2

Copyright Notice
ISBN: N/A SWsoft. 13755 Sunrise Valley Drive Suite 325 Herndon VA 20171 USA Phone: +1 (703) 815 5670 Fax: +1 (703) 815 5675 © Copyright 1999-2007, SWsoft Holdings, Ltd. All rights reserved Distribution of this work or derivative of this work in any form is prohibited unless prior written permission is obtained from the copyright holder. Patented hosting technology protected by U.S.Patents 7,099,948; 7,076,633. Patents pending in the U.S. Linux is a registered trademark of Linus Torvalds. ASPLinux and the ASPLinux logo are registered trademarks of SWsoft. RedHat is a registered trademark of Red Hat Software, Inc. Solaris is a registered trademark of Sun Microsystems, Inc. X Window System is a registered trademark of X Consortium, Inc. UNIX is a registered trademark of The Open Group. Intel, Pentium, and Celeron are registered trademarks of Intel Corporation. MS Windows, Windows 2003 Server, Windows XP, Windows 2000, Windows NT, Windows 98, and Windows 95 are registered trademarks of Microsoft Corporation. IBM DB2 is a registered trademark of International Business Machines Corp. SSH and Secure Shell are trademarks of SSH Communications Security, Inc. MegaRAID is a registered trademark of American Megatrends, Inc. PowerEdge is a trademark of Dell Computer Corporation. Request Tracker is a trademark of Best Practical Solutions, LLC All other trademarks and copyrights referred to are the property of their respective owners.

3

Contents
Preface 8

About This Document................................................................................................................ 8 Typographical Conventions ....................................................................................................... 8 Feedback .................................................................................................................................. 9

Before Using Reference

10

XSD Representation Conventions ........................................................................................... 10 Data Types ............................................................................................................................. 10 How to Analyze API RPC Schema .......................................................................................... 12

Representation of Object Descriptor

16

Property Descriptor ................................................................................................................. 17 Extension of Permissions Descriptor.............................................................................. 19 Extension of Hosting Settings Descriptor ....................................................................... 20 Extension of Limits Descriptor ....................................................................................... 21 Bind Parameters ..................................................................................................................... 22 Filters of Descriptors ............................................................................................................... 23

Supported Operations

24

Managing Client Accounts....................................................................................................... 25 Filtering Issues .............................................................................................................. 27 Client Settings ............................................................................................................... 28 Creating Client Account ................................................................................................. 45 Getting Information About Client Accounts..................................................................... 51 Deleting Client Accounts ............................................................................................... 58 Setting Client Account Properties .................................................................................. 61 Adding IP Addresses to Client‘s IP Pool......................................................................... 68 Removing IP Addresses from the Client‘s IP Pool .......................................................... 70 Listing Buttons Displayed on the Client‘s Page in Control Panel ..................................... 73 Retrieving Descriptor of Limits ....................................................................................... 78 Retrieving Descriptor of Permissions ............................................................................. 84 Managing Client Templates ..................................................................................................... 88 Client Template Settings ............................................................................................... 89 Filtering Client Templates .............................................................................................. 95 Creating Client Template ............................................................................................... 96 Getting Information About Client Templates ................................................................... 99 Deleting Client Templates............................................................................................ 104 Setting Client Template Settings.................................................................................. 107 Managing Database Servers ................................................................................................. 112 Adding Database Server ............................................................................................. 114 Changing Database Server Preferences ...................................................................... 119 Detaching Database Servers ....................................................................................... 123 Setting Default Database Server.................................................................................. 127 Retrieving Default Database Server Info ...................................................................... 131 Retrieving Database Server Parameters ...................................................................... 134 Retrieving Supported Types Of Databases .................................................................. 139 Retrieving Local Database Servers Info ....................................................................... 142

Preface Managing Databases ............................................................................................................ 146 Filtering Issues ............................................................................................................ 147 Creating Databases ..................................................................................................... 148 Deleting Databases ..................................................................................................... 154 Creating Database Users ............................................................................................ 158 Assigning Database Administrator ............................................................................... 163 Retrieving Database Administrator Info ........................................................................ 166 Retrieving Information About Databases ...................................................................... 170 Changing Database User Credentials .......................................................................... 177 Retrieving Database Users Info ................................................................................... 181 Deleting Database Users ............................................................................................. 185 Managing Desktop Presets ................................................................................................... 190 Changing Plesk Administrator Preset........................................................................... 191 Choosing Default Preset .............................................................................................. 194 Retrieving Preset Preferences ..................................................................................... 198 Adding Preset.............................................................................................................. 202 Removing Preset ......................................................................................................... 206 Managing DNS...................................................................................................................... 211 Filtering Issues ............................................................................................................ 213 Managing DNS Records .............................................................................................. 216 Managing ACL ............................................................................................................ 234 Managing SOA Records and Zone Parameters ........................................................... 242 Managing Name Servers ............................................................................................. 254 Managing Local or Remote DNS Servers .................................................................... 271 Managing DNS Recursion ........................................................................................... 283 Managing Domain Accounts.................................................................................................. 290 Filtering Issues ............................................................................................................ 292 Domain Settings .......................................................................................................... 295 Creating Domain Account ............................................................................................ 329 Getting Information About Domain Accounts................................................................ 334 Deleting Domain Accounts .......................................................................................... 343 Setting Domain Parameters ......................................................................................... 348 Getting the Domain Buttons List .................................................................................. 355 Getting Traffic Usage Information ................................................................................ 361 Setting Domain Traffic Settings ................................................................................... 368 Retrieving Descriptor of Limits ..................................................................................... 372 Retrieving Descriptor of Permissions ........................................................................... 378 Retrieving Descriptor of Hosting Settings ..................................................................... 382 Managing Domain Aliases ..................................................................................................... 387 Domain Alias Settings ................................................................................................. 388 Filtering Issues ............................................................................................................ 390 Creating Domain Aliases ............................................................................................. 391 Retrieving Information On Domain Aliases ................................................................... 395 Updating Domain Aliases Settings ............................................................................... 401 Deleting Domain Aliases ............................................................................................. 405 Renaming Domain Aliases .......................................................................................... 408 Retrieving Information On Manageable Services ......................................................... 411 Managing Domain Templates ................................................................................................ 412 Domain Template Settings .......................................................................................... 413 Filtering Issues ............................................................................................................ 416 Creating Domain Template .......................................................................................... 417 Getting Information On Domain Templates .................................................................. 424 Configuring Domain Template Settings........................................................................ 430 Deleting a Domain Template ....................................................................................... 440 Managing Domain-Level Mail ................................................................................................ 445 Mail Service Preferences ............................................................................................. 447 Mail Account Settings .................................................................................................. 448 Filtering Issues ............................................................................................................ 459 Creating Mail Accounts................................................................................................ 460

4

Preface Modifying Mail Account Settings .................................................................................. 464 Getting Mail Account Settings ...................................................................................... 470 Deleting Mail Accounts ................................................................................................ 475 Enabling/Disabling Mail Service on Domain ................................................................. 478 Setting Mail Service Preferences ................................................................................. 482 Getting Mail Service Preferences................................................................................. 486 Renaming Mail Accounts ............................................................................................. 489 Managing FTP Accounts ....................................................................................................... 492 FTP Account Permissions ........................................................................................... 493 Filtering Issues ............................................................................................................ 494 Creating FTP Accounts ............................................................................................... 497 Retrieving Information On FTP Accounts ..................................................................... 504 Changing FTP Account Settings .................................................................................. 511 Deleting FTP Accounts ................................................................................................ 517 Managing IP Addresses ........................................................................................................ 522 Adding IP Address....................................................................................................... 523 Retrieving IP addresses .............................................................................................. 527 Changing Type ............................................................................................................ 530 Removing IP ............................................................................................................... 534 Managing Locales ................................................................................................................. 538 LP Names ................................................................................................................... 539 Filtering Issues ............................................................................................................ 539 Retrieving List of LP's .................................................................................................. 540 Installing LP ................................................................................................................ 545 Retrieving Localized Messages ................................................................................... 547 Removing LP .............................................................................................................. 552 Enabling LP................................................................................................................. 555 Disabling LP ................................................................................................................ 559 Appendix. Locale Codes .............................................................................................. 563 Managing Log Rotation on Domain ....................................................................................... 567 Log Rotation Settings .................................................................................................. 568 Filtering Issues ............................................................................................................ 568 Changing Log Rotation Settings .................................................................................. 570 Retrieving Log Rotation Settings.................................................................................. 576 Enabling Log Rotation Service..................................................................................... 582 Disabling Log Rotation Service .................................................................................... 587 Checking Status of Log Rotation Service ..................................................................... 591 Managing Mailing Lists.......................................................................................................... 596 Filtering Issues ............................................................................................................ 598 Adding Mailing List ...................................................................................................... 601 Removing Mailing List ................................................................................................. 605 Adding Subscriber to Mailing List ................................................................................. 610 Retrieving Mailing Lists................................................................................................ 614 Retrieving Subscribers' Info ......................................................................................... 620 Removing Subscriber .................................................................................................. 625 Activating Mailing Lists Service .................................................................................... 629 Deactivating Mailing Lists Service................................................................................ 635 Enabling Mailing List ................................................................................................... 640 Disabling Mailing List................................................................................................... 645 Retrieving Status Of Mailing Lists Service .................................................................... 650 Managing Plesk Backups ...................................................................................................... 655 Remote Storage Settings............................................................................................. 656 Retrieving Remote Storage Settings ............................................................................ 657 Changing Remote Storage Settings............................................................................. 661 Creating Backup of Domain Account ........................................................................... 664 Creating Backup of Client Account .............................................................................. 668 Retrieving Backup Status ............................................................................................ 672 Retrieving List of Local Backups .................................................................................. 676 Uploading Backup to Repository .................................................................................. 680

5

Preface Downloading Backup ................................................................................................... 683 Retrieving Protocols Supported by Backup Manager ................................................... 686 Stopping Backup Process............................................................................................ 687 Retrieving List of Backup Processes ............................................................................ 690 Removing Backup ....................................................................................................... 693 Managing Plesk Server ......................................................................................................... 696 Administrator Personal Information .............................................................................. 697 Server Preferences ..................................................................................................... 699 Getting Supported Protocols ........................................................................................ 701 Performing Initial Server Setup .................................................................................... 703 Managing Plesk License.............................................................................................. 706 Getting Server Information........................................................................................... 714 Setting Up Server ........................................................................................................ 744 Managing Plesk Services ............................................................................................ 747 Managing Plesk Updates ...................................................................................................... 751 Checking Updater Status............................................................................................. 752 Retrieving Plesk Updates ............................................................................................ 753 Retrieving Components List......................................................................................... 755 Installing Components ................................................................................................. 758 Updating Plesk ............................................................................................................ 761 Managing Secret Keys .......................................................................................................... 764 Creating Secret Key .................................................................................................... 764 Retrieving Info on Secret Keys .................................................................................... 768 Removing Secret Key .................................................................................................. 772 Managing Sessions ............................................................................................................... 776 Retrieving Sessions List .............................................................................................. 776 Terminating Session.................................................................................................... 779 Managing Site Applications ................................................................................................... 781 History of Changes ...................................................................................................... 783 Site Application Properties........................................................................................... 784 Retrieving List of All Site Applications .......................................................................... 785 Viewing Application Pool ............................................................................................. 787 Adding Site Application to Application Pool .................................................................. 791 Removing Site Applications ......................................................................................... 795 Retrieving List of Packages Available For Domain ....................................................... 799 Changing Properties of Site Application ....................................................................... 803 Retrieving Site Application Requirements .................................................................... 807 Installing Site Application ............................................................................................. 812 Managing Spam Filtering Service .......................................................................................... 815 Filtering Issues ............................................................................................................ 817 About Spam Filtering ................................................................................................... 819 Adding Pattern ............................................................................................................ 823 Removing Pattern........................................................................................................ 829 Retrieving Patterns ...................................................................................................... 834 Retrieving Info on Spam Filtering service ..................................................................... 838 Setting Spam Filtering Preferences ............................................................................. 843 Retrieving Available Spam Filtering Preferences.......................................................... 849 Retrieving Allowed Lists .............................................................................................. 854 Checking Status of Spam Filtering Service .................................................................. 859 Managing SSL Certificates .................................................................................................... 861 Installing Certificate ..................................................................................................... 862 Deleting Certificate ...................................................................................................... 868 Generating Certificate.................................................................................................. 872 Managing Virtual Directories ................................................................................................. 878 Virtual Directory Settings ............................................................................................. 878 Creating Virtual Directories .......................................................................................... 884 Removing Virtual Directories ....................................................................................... 889 Managing Web Users ............................................................................................................ 891 Web User Settings and Preferences ............................................................................ 892

6

Preface Filtering Issues ............................................................................................................ 895 Creating Web Users .................................................................................................... 897 Deleting Web Users .................................................................................................... 902 Updating Web User Settings........................................................................................ 907 Retrieving Web Users Settings ................................................................................... 912 Retrieving Web Users Preferences .............................................................................. 918 Updating Web Users Preferences................................................................................ 922 Migrating Domain And Client Accounts.................................................................................. 927 IP Addresses Mapping ................................................................................................ 928 Databases Mapping .................................................................................................... 930 Checking Migration Possibility ..................................................................................... 932 Retrieving File System Information .............................................................................. 934 Starting Migration ........................................................................................................ 936 Retrieving Migration Status.......................................................................................... 946 Stopping Migration ...................................................................................................... 951 Retrieving Action Log Data .................................................................................................... 954 Retrieving Action Log .................................................................................................. 954 Retrieving ID of Last Action ......................................................................................... 958 Uploading Files to Server ...................................................................................................... 960 Uploading Files Using cURL ........................................................................................ 960 Uploading Files Using PHP ......................................................................................... 961 Uploading Files Using .NET......................................................................................... 962 Response Packet Structure ......................................................................................... 966 Response Samples ..................................................................................................... 967

7

API RPC Versions

968

API RPC Evolution ................................................................................................................ 969 v.1.4.0.0................................................................................................................................ 970 v.1.4.1.0................................................................................................................................ 972 v.1.4.1.1................................................................................................................................ 973 v.1.4.1.2................................................................................................................................ 975 v.1.4.2.0................................................................................................................................ 977 v.1.5.0.0................................................................................................................................ 980 v.1.5.1.0................................................................................................................................ 982

Error Codes

986

Complete List of Error Codes ................................................................................................ 987 Common errors ........................................................................................................... 992 Client Operations ........................................................................................................ 993 Domain Operations ..................................................................................................... 995 IP Operations .............................................................................................................. 998 DNS Operations .......................................................................................................... 999 Server Operations ..................................................................................................... 1001 Site Application Operations ....................................................................................... 1004 Email Operations ....................................................................................................... 1004 Certificate Operations ................................................................................................ 1005 UI Operations ............................................................................................................ 1005 Upload Operations .................................................................................................... 1006 Secret Key Operations .............................................................................................. 1007 Spam Filter Operations.............................................................................................. 1007 Domain Alias Operations ........................................................................................... 1008 Database Server Operations ..................................................................................... 1008 Migration Operations ................................................................................................. 1009 Reduced List of Error Codes ............................................................................................... 1010

8

CHAP

TER

1

Preface
About This Document
This part of Plesk API RPC documentation describes in detail the programming means provided by Plesk API.    Chapter Before Using Reference (see page 10) contains information required for proper reading of the reference sections. Chapter Representation of Object Descriptors (see page 16) explains in detail what object descriptors are and how they are implemented in the API RPC protocol. Chapter Supported Operations explains which Plesk objects can be managed programmatically via API RPC, how this can be done, and what particular operations are allowed to different kinds of Plesk users. Chapter API RPC Versions (see page 968) contains references on what XML Schemas are used for each API RPC operation depending on the API RPC version. Chapter Error Codes (see page 986) provides information on codes of the errors that may occur when using Plesk API RPC protocol.

 

Typographical Conventions
The following kinds of formatting in the text identify special information.
Formatting convention Special Bold Type of Information Names of operators and operations. Titles of chapters, sections, and subsections found in the other documents. Italics Emphasizes the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value. Example Go to the QoS tab. Read the Basic Administration chapter. The system supports the so called wildcard character search.

Preface

9

Monospace

The names of commands, files, and directories.

Preformatted

On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages. What you type, contrasted with on-screen computer output. Names of keys on the keyboard and names of operations on the title page of an operator. Key combinations for which the user must press and hold down one key and then press another.

The license file is located in the httpdocs/common/licens es directory. # ls –al /files total 14470

Preformatted Bold

# cd /root/rpms/php

CAPITALS

SHIFT, CTRL, ALT

KEY+KEY

CTRL+P, ALT+F4

Feedback
If you have found a mistake in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback to userdocs@swsoft.com. Please include in your report the guide's title, chapter and section titles, and the fragment of text in which you have found an error.

10

CHAP

TER

2

Before Using Reference
This section contains information required for proper reading of the reference sections.    The XSD Representation Conventions (on page 10) section explains designations used in graphical representation of XML objects described in the current document. The Data Types (on page 10) section contains classification of object types described in the current document. The How to Analyze API RPC Schema (on page 12) section explains how to read an XSD schema using user agents or text editors. This can be helpful, if you want to create a valid packet according only to XSD files.

In this chapter:
XSD Representation Conventions ................................................................... 10 Data Types .................................................................................................... 10 How to Analyze API RPC Schema .................................................................. 12

XSD Representation Conventions
The protocol functionality is described using an XSD schema. This document uses Altova XMLSpy rules and agreements to represent the scheme graphically. For details on the rules and agreements, visit the following URL: http://www.altova.com/manual2007/XMLSpy/spyenterprise/contentmodelview.htm.

Data Types
Each node of the XML schema is of a specified type. For details on XML data types, visit the following URL: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/. In API Reference, a node can be of a simple or a complex type. If the type of the node is complex and has a name, the name of the type is followed by a filename. The filename specifies the file where the type is located. If the type is not named, it is called complex in the reference. If the type is simple, it can be a standard type or its modification. A list of standard simple types presented in the following table.
Type string short Definition Sequence of 1..255 characters Examples mytext, a, ppp

Integer numbers from -2^15 to 2^15- -167, 2880, 310 1*

Before Using Reference

11

Type integer unsignedInt unsignedLong long base64 boolean byte date dateTime

Definition

Examples

Integer numbers from -2^31 to 2^31- -16007, 211880, 310010 1 Integer numbers from 0 to 2^32-1 Integer numbers from 0 to 2^64-1 1670031, 3321455232 44322344432

Integer numbers from -2^63 to 2^63- 184467440737095516 1 Base64-encoded arbitrary binary data Binary-valued logic legal literals Integer numbers from -128 to 127 Calendar date. Format YYYY-MMDD Specific instant of time. ISO 8601 extended format YYYY-MMDDThh:mm:ss GTrRddxXRGgh== true, false, 1, 0 1, 0, 126, 100 May the 31st, 1999 is: 1999-05-31 1:20 pm on May the 31st, 1999 for Eastern Standard Time which is 5 hours behind Coordinated Universal Time (UTC) looks as follows: 1999-05-31T13:20:00-05:00

none anySimple

Nodes of this type do not contain any data (so-called blank nodes) Any simple type except none 123, mytext, example123string

* - the number y^n is the number y raised to n-th power.

Before Using Reference

12

How to Analyze API RPC Schema
The following instructions can help you analyze an XML API schema.

If you use API RPC 1.4.0.0 or higher:   Start with the main agent_input.xsd schema. It lists all supported operator elements within the packet element. For example,

On the above figure, complex data type RequestPacketType lists all operator elements supported in API RPC 1.4.0.0. These operators are: server, client, domain, etc. Each operator has a matching request data type (the type attribute). This data type describes the structure of the operator. To see the structure of a certain operator, you need to find the low-level 'input' schema where its data type is defined. File agent_input.xsd lists all subsequent schemas as follows:

Before Using Reference

13

The schema name contains the name of the operator you need and the _input suffix.  Open the schema matching any operator. It will contain several complex data types, including the request data type specified for the operator. For example, here is the contents of the client_input.xsd schema (v.1.4.0.0) matching the client operator.

Before Using Reference

14

The client operator is described by type ServerOperatorType (highlighted). To see its structure, click the + sign to the left and expand the section.  Type ServerOperatorType describes the client operator as follows: It lists all operations that can be applied to Plesk Client (get_protos, get, set, srv_man, etc.). The same principle is true for any operator: its request data type (specified in the agent_input.xsd schema) declares operations that can be applied to the relevant object.

Each operation element is also presented by a special data type specified in the type attribute. Operation data types are normally defined in the same schema. For example, the set operation (type AdminSetType) is defined in the same client_input.xsd schema as follows:

All nested elements (operation parameters) are described by specific data types. You can find their definitions either in the same schema, or in the included schema:

Thus, when you analyse the schemas, the approach is as follows: start with the main schema to choose the operator and drill down to the subsequent data types that can be found in the included schemas.

Before Using Reference

15

If you use API RPC 1.3.5.1 or lower, find the required input schema by its name. The schema describes the structure of the XML packet within the packet element: It contains a single operator element that, in turn, contains some operation elements. Operations are structured as described above: Each operation is a complex data type that contains sequences of various parameters. Some parameters are fully defined within the operation element, others have just a complex data type specified against them. Such data types can be defined in the same schema or in some other schema included into this one with the include directive.

16

CHAP

TER

3

Representation of Object Descriptor
Every object descriptor is composed of a set of property descriptors and correlation between properties of the object. Its graphical representation is as follows:

The descriptor node is required. It specifies object descriptor. Data type: ObjectDescriptor (descriptor.xsd).  The property node is required. It specifies one or more property descriptors. For details, refer to the Descriptor of Property (on page 17) section. Data type: PropertyDescriptor (descriptor.xsd). The bind node is optional. It defines correlation between properties of the object. For details, refer to the Bind Parameters (on page 22) section. Data type: PropertyDescriptor (descriptor.xsd).

Before you start using descriptors, read more about descriptor filtering issues in the Filters of Descriptors (on page 23) section. For more info on descriptors, refer to the Descriptors Overview section of the Programming Guide.

In this chapter:
Property Descriptor ........................................................................................ 17 Bind Parameters............................................................................................ 22 Filters of Descriptors ...................................................................................... 23

Representation of Object Descriptor

17

Property Descriptor
Property descriptor is comprised of parameters that specify an object property. Its graphical representation is as follows:

  

The property node is required. It specifies a property descriptor. Data type: PropertyDescriptor (descriptor.xsd). The name node is required. It specifies identifier of the property. Data type: string. The type node is required. It specifies a type of property value. Data type: string. Allowed values: string | password | int | uint | float | boolean | bytes | date Where uint is an unsigned integer. Date is stored in timestamp format. In 'bytes' type -1 (value) = UNLIMITED

The enum node is optional. It specifies values of the property in case the property has limited set of values. Data type: EnumElementType (descriptor.xsd).  The value node is required if the enum node is specified. It defines a value of the property. Data type: string.

Representation of Object Descriptor

18

The label node is optional. It specifies brief explanation of the property value in Plesk CP. This value should be equal to locale key name of the property. To retrieve locale key value, use the locale operator. Data type: string. The hint value is optional. It specifies the hint that can be seen if you point cursor on the property label in Plesk CP. Data type: string.

   

The default-value node is optional. It specifies default value of the property. Data type: none. The writable-by node is optional. It specifies users who can edit the property. Data type: sting. Allowed values: none | admin | client | domain-admin. The label node is optional. It specifies brief explanation of the property in Plesk CP. This value should be equal to locale key name of the property. To retrieve locale key value, use the locale operator. Data type: string. The hint node is optional. It specifies hint that can be seen if you point cursor on the property label in Plesk CP. Data type: string. The extension node is optional. It defines data specific for the object. For details, refer to the Extension of Permissions Descriptor (on page 18), Extension of Hosting Settings Descriptor (on page 19) and Extension of Limits Descriptor (see page 20) sections. Data type: any.

 

Samples The following property descriptor specifies FTP quota.
<property> <name>ftp_quota</name> <type>int</type> <default>-1</default> <writable-by>admin</writable-by> </property>

The following property descriptor specifies PHP support.
<property> <name>php</name> <type>boolean</type> <default>1</default> <writable-by>admin</writable-by> <writable-by>client</writable-by> <writable-by>domain-admin</writable-by> </property>

Representation of Object Descriptor

19

Extension of Permissions Descriptor
This extension is used to define correlations between types of users and permissions. If you send request packet containing the get-permission-descriptor operation, the respond from the server will contain permission level in the level node nested into the extension node. The graphical representation of the construction is as follows:

This node can be empty, or contain one of the following values:    client. The parameter is visible to clients. domain. The parameter is visible to domain administrators. mail. The parameter is visible to mail account users.

Note: You can specify multiple service parameters in one extension node.

Extension node sample
<packet> <property> <name>manage_virusfilter</name> <type>boolean</type> <default-value>false</default-value> <writable-by>admin</writable-by> <label>cl_perm__manage_virusfilter</label> <extension> <level>client</level> <level>domain</level> <level>mail</level> </extension> </property>

For details on permissions, refer to the Limits and Permissions (on page 35) (client's settings), or Limits, Permissions and Hosting Settings (on page 305) (domain and domain administrator's settings) sections.

Representation of Object Descriptor

20

Extension of Hosting Settings Descriptor
This extension is used to define visible properties on managing Plesk objects. If you send a request packet containing the get-physical-hosting-descriptor operation, the service node nested into the extension node will contain if a property is visible when you manage a specified object. The graphical representation of the construction is as follows:

This node can be empty, or contain one of the following values:    domain. The parameter is visible when managing domains. subdomain. The parameter is visible when managing sub-domains. webuser. The parameter is visible when managing web users.

Note: You can specify multiple service parameters in one extension node.

Extension node sample
<property> <name>asp</name> <type>boolean</type> <writable-by>admin</writable-by> <label>__asp_unix_support</label> <extension> <service> <domain>1</domain> <subdomain>1</subdomain> <webuser>1</webuser> </service> </extension> </property>

For details on hosting settings, refer to the Limits, Permissions and Hosting Settings (on page 305) section.

the extension node can be represented in the following way: The shared node is required. Extension node sample <property> <name>max_subdom</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_subdom</label> <extension> <shared>false</shared> </extension> </property> For details on limits. or Limits. Permissions and Hosting Settings (on page 305) (domain and domain administrator's settings) sections. Data type: boolean. . mailbox quota is a shared parameter. refer to the Limits and Permissions (on page 35) (client's settings). Graphically.Representation of Object Descriptor 21 Extension of Limits Descriptor Number of limits have values equal ot users of different access levels. For instance. because it's value is equal both for a client and for domain administrator.

Typical bind parameter has the following graphical representation: The bind node is optional. The read-only node is required. It specifies the bind parameter. Data type: boolean. It defines if the property is editable for users. it contains the following parameters:   The ref node is required. It specifies name of a property to be bound with other properties. It specifies value of another property this property will depend on. The value node is required.xsd).xsd). If it is specified. Note: read-only is of higher priority than writable-by. Data type: string.Representation of Object Descriptor 22 Bind Parameters Bind parameters hold correlation between properties of the object. Data type: boolean. it contains the following parameters:    The name node is required. It specifies if the property (defined in ref node) will be editable on fulfilling conditions defined in the relevant node. Data type: RelevantType (descriptor. . Data type: string. It contains rules defining dependence of the property on another. It specifies name of another property this property will depend on. If it is specified. A depended property can be editable only if the "master" property's value (or read-only indicator) is equal to a specified value. The relevant node is optional.  The read-only node is required. Data type: BindType (descriptor.

A single filter node cannot contain filtering parameters presented by different nodes in XML schema. refer to the Descriptors section of the Programming Guide. <bind> <ref>php_isapi</ref> <relevant> <id>php</id> <read-only>0</read-only> </relevant> <relevant> <id>php</id> <value>1</value > </relevant> <read-only>0</read-only> </bind> Filters of Descriptors Filters used by descriptors differs from filters used by operators. If the filter node is not blank (<filter/>) the server will return descriptor for an object. ID. In this case there will be filter-id and id nodes in the response packet. There are client-level and domain-level filters for object descriptors. This rule tells to make PHP ISAPI support editable only if PHP support is editable and checked.Representation of Object Descriptor 23 Remarks Multiple bind nodes for a single property descriptor are treated as logical disjunction of correlations. specified by filtering rule parameters. Multiple relevant nodes are treated as logical conjunction of the rules. If the filter node is blank the server will return the server-level descriptor for a specified object. . In this case there will not be filter-id and id nodes in the response packet. or they can specify multiple domains belonging to a specified client by client ID or login name. For details on descriptors. but can contain multiple filtering parameters presented by the same node in XML schema. Client-level filters can specify a client by ID or login name. Domain-level filters can specify a domain by name.

................... For your convenience the sections are arranged in alphabetical order............................................................................................................................... 696 Managing Plesk Updates .............. In this chapter: Managing Client Accounts .................................................................................................................. 954 Uploading Files to Server ..................... 387 Managing Domain Templates................................................................................................................ 211 Managing Domain Accounts ........................................... 891 Migrating Domain And Client Accounts .................... then each operation is considered in detail with XML code samples............................................................................................................. 88 Managing Database Servers ................................................. 878 Managing Web Users ................................................................................................................................................................................. lists all operations on the objects in focus that are supported by API RPC................................................................................. 146 Managing Desktop Presets ............................................................ 815 Managing SSL Certificates ..... The detailed description touches upon the structure of the request and response packets............................... 112 Managing Databases .................... 776 Managing Site Applications ................................................................................................................................................. at first.......... Each section........................... 829 Managing Secret Keys ........................................................... 534 Managing Locales ................. 445 Managing FTP Accounts . 290 Managing Domain Aliases ................................................................................................................................................... 764 Managing Sessions ............................................. 927 Retrieving Action Log Data................................................................................................................................................................................. Each section is devoted to a particular object or range of objects.......... 861 Managing Virtual Directories ................ 781 Managing Spam Filtering Service ...................... 596 Managing Plesk Backups .............. 411 Managing Domain-Level Mail ................... 567 Managing Mailing Lists ............. 492 Managing IP Addresses ... 190 Managing DNS ...............................................24 CHAP TER 4 Supported Operations This chapter can serve as a guide on how each Plesk object can be managed programmatically via Plesk API RPC protocol............ 538 Managing Log Rotation on Domain ............................ 655 Managing Plesk Server ......................................................................................... 25 Managing Client Templates....... 960 .....................................................................................................................................................................................................................................................................................

This operation is allowed to Plesk Administrator only. domain administrators. Plesk Client can create and manage domains and user accounts that share the disk space of the 'parent' client account. client_output. or this can be done using a client template (a special object that holds a collection of predefined settings). These settings are as follows:     Limits on use of Plesk resources Plesk Client access permissions Plesk Client IP pool settings Plesk client template (if specified) Once created.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator Description The hierarchy of Plesk users includes clients. The ‗upper level‘ client account is provided to a customer whose business is reselling hosting services or hosting multiple domains/web sites. In turn. plesk_client.xsd. Creating a Plesk Client is equivalent to creating a special client account. and email users (enumerated in the descending level order).Supported Operations 25 Managing Client Accounts Operator: <client> XML Schema: client_input. refer to section Managing Client Templates (see page 88).xsd. To learn more about client templates. A client account can be created with a unique collection of settings. a client account is allotted a portion of Plesk server disk space and other Plesk resources. . Client account presents a set of Plesk Client personal data and a collection of various settings.

GET (see page 50) retrieves the information about the specified client account(s) from Plesk database DEL (see page 57) deletes the specified client account(s) from Plesk database SET (see page 61) updates/ modifies certain information about the specified client account(s) in Plesk database IPPOOL_ADD_IP (see page 67) adds IP addresses to the client‘s IP pool IPPOOL_DEL_IP (see page 70) removes IP addresses from the client‘s IP pool CFORM_BUTTONS_LIST (see page 72) retrieves the list of buttons displayed on the client page in Plesk Control Panel. GET-LIMIT-DESCRIPTOR (on page 78) retrieves client limits descriptors GET-PERMISSION-DESCRIPTOR (on page 84) retrieves client permissions descriptors .Supported Operations 26 Supported operations          ADD (see page 44) creates new client account to Plesk database.

The login node is optional.xsd).0”> <client> <del> <filter> <id>124</id> <id>125</id> <id>127</id> </filter> </del> </client> </packet> The following packet is identical except it specifies client accounts by name: <packet version=”1.4. It specifies the login name of the client account. It specifies the identifier of the client account. Data type: string.2.0”> <client> <del> <filter> <login>advent</login> <login>freescale</login> <login>talkmore</login> </filter> </del> </client> </packet> . Both the client identifier and the client login are unique in the Plesk database.4. The following packet deletes three client accounts specified by id: <packet version=”1.Supported Operations 27 Filtering Issues Filtering is the way the request‘ packets pick out clients to which the requested operation will be applied. The filter node is presented by the ClientSelectionFilterType complex type (client_input. This data type is structured as follows:   The id node is optional. Data type: integer.2.

2.0”> <client> <del> <filter> <login>advent</login> <login>talkmore</login> </filter> </del> <del> <filter> <id>125</id> </filter> </del> </client> </packet> Client Settings This section describes a collection of client account and Plesk Client settings.4.2. and retrieved from Plesk database as well. These settings are as follows:    General Client Account settings (see page 28) Limits (on page 35) on use of Plesk resources set for the client account Plesk Client permissions (on page 35) The above settings can also be read from Plesk database along with IP pool settings (see page 42) and statistics (see page 43) on use of various Plesk resources by the given Plesk Client. use two different <del> sections: <packet version=”1. . These settings can be defined when creating a new client account or later.0”> <client> <del> <filter> <login>advent</login> <id>125</id> <login>talkmore</login> </filter> </del> </client> </packet> To fix this problem.4.Supported Operations 28 The following packet is invalid as both the id node and the login node are used in the same filter: <packet version=”1.

used when retrieving the general information from Plesk database using the get operation type clientSetGenInfo (see page 33) .used when updating the client account using the set operation Type clientAddGenInfo When creating the client account.used when creating the client account with the add operation type clientGetGenInfo (see page 31) .Supported Operations 29 General Client Account Settings General client account settings are specified by three data types as follows:    type clientAddGenInfo (see page 29) .xsd). It is structured as follows: . the general client account information is specified by complex type clientAddGenInfo (plesk_client.

5.). The fax node is optional. Data type: string (1 to 60 characters long). Data type: string (1 to 60 characters long). The pcode node is optional. Data type: string (2 characters long).  The uid node is deprecated. Specifies the postal address of the client account owner. Data type: string. Specifies the company name.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <status>0</status> <phone>416 907 9944</phone> . Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). The address node is optional.xsd).0. Default value: en. Specifies the 2-character country code of the client account owner (US for United States. The state node is optional. Data type: string (0 to 30 characters long). The pname node is required.1. use four-letter locale names (RFC 1766). you will receive the error (error code 1019). Data type: objectStatus (plesk_common. The locale node is optional. Specifies the city of the client account owner. The following packet creates a client account and defines the general settings for it: <packet version="1. The status node is optional. Specifies the fax number of the client account owner. Specifies the password of the client account. CA for Canada. Specifies the zip code of the client account owner (specified for US citizens only). Specifies the US state of the client account owner (should be specified for US citizens only).          Note: In API RPC v. The email node is optional. Data type: string (0 to 50 characters long).5. Data type: string (5 to 14 characters long) . The phone node is optional. Specifies the login name of the client account. Specifies the email address of the client account owner. Specifies the phone number of the client account owner. The login node is required. Data type: string (0 to 255 characters long). The default value for the node is en-US. etc.0 and later. Specifies the locale used on the client account.Supported Operations 30      The cname node is optional.1.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. Data type: string (0 to 60 characters long). Specifies the personal name of the customer who owns the client account. Data type: string (0 to 255 characters long). Data type: string (0 to 50 characters long). The country node is optional. If you specify two-letter locale name in a request packet. The passwd node is required. Data type: string (0 to 30 characters long). Only status values 0 and 16 can be set up. Specifies the current status of the client account. The city node is optional. Data type: string (0 to 10 characters long).

Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> </add> </client> </packet> 31 Type clientGetGenInfo When getting the general client account information.Supported Operations <fax>928 752 3905</fax> <email>host@logicsoft. It is structured as follows (pared-down variant): .xsd) is used in the response get packet.net</email> <address>105 Brisbane Road. complex type clientAddGenInfo (plesk_client.

Specifies the login name of the client account. Data type: string. Allowed values: crypt | plain.5.0 and later.2 and earlier. Default value: en. The uid and the global-login nodes are deprecated.0. Data type: date. Specifies the city of the client account owner. Data type: string (0 to 50 characters long). Data type: string (2 characters long).4. Specifies the US state of the client account owner (specified for US citizens only). Data type: string. The email node is required. The login node is required. The country node is required. used by API RPC 1.0. Specifies the personal name of the customer who owns the client account. Deprecated in API RPC v. you will receive the error (error code 1019). Data type: string (0 to 30 characters long). Data type: string (1 to 20 characters long). Specifies the type of the client account password. Data type: string (0 to 30 characters long). Specifies the postal address of the client account owner. The default value for the node is en-US. use four-letter locale names (RFC 1766). etc. Data type: string (0 to 255 characters long). The locale node is required.          Note: In API RPC v. If you specify two-letter locale name in a request packet.1.Supported Operations 32      The cr_date node is required. Data type: string (0 to 10 characters long).     The password node is optional. Specifies the email address of the client account owner. The address node is required. The pname node is required.2. The cname node is required. Specifies the current status of the client account. The status node is required. Data type: string. Specifies the zip code of the client account owner (specified for US citizens only). Specifies the client account password.).xsd). Specifies the locale used on the client account. The password_type node is optional.3. Specifies the phone number of the client account owner. Default value: 0 The phone node is required. Specifies the client account password. It specifies the date when the specified client account was created. CA for Canada. Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). Data type: objectStatus (plesk_common. The pcode node is required.1. Specifies the fax number of the client account owner. Data type: string (0 to 255 characters long). Data type: string. The city node is required. Specifies the 2-character country code of the client account owner (US for United States. The state node is required. Data type: string (1 to 60 characters long). Data type: string (1 to 60 characters long). Obsolete. Specifies the company name. Data type: string (0 to 50 characters long). . The passwd node is optional. The fax node is required.

.Supported Operations 33 Type clientSetGenInfo When setting the general client account information. The passwd node is optional. complex type clientSetGenInfo (plesk_client.Data type: string. It specifies the login name of the client account. Data type: string (1 to 20 characters long). Data type: string (1 to 60 characters long). It specifies the company name. It specifies the client account password. Data type: string (1 to 60 characters long). It specifies the personal name of the customer who owns the client account. The login node is optional. The global-login and the uid nodes are deprecated.xsd) is used in the response set packet. The pname node is optional. It is structured as follows:      The cname node is optional.

Data type: string (0 to 30 characters long). Data type: string. The phone node is optional.xsd). It specifies the phone number of the client account owner. Only status values 0 and 16 can be set up. Data type: string (0 to 255 characters long). CA for Canada. The country node is optional.          . It specifies the postal address of the client account owner. Default value: 0. It specifies the US state of the client account owner (specified for US citizens only). The pcode node is optional. Data type: string (0 to 50 characters long).). The city node is optional. Data type: string (0 to 30 characters long). It specifies the city of the client account owner. Data type: string (0 to 50 characters long). It specifies the current status of the client account. Data type: string (2 characters long). It specifies the zip code of the client account owner (specified for US citizens only). It specifies the 2-character country code of the client account owner (US for United States. Data type: string (0 to 10 characters long). It specifies the locale used on the client account. The locale node is optional. Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). The fax node is optional. Data type: string (0 to 255 characters long). It specifies the fax number of the client account owner.Supported Operations 34  The status node is optional. Data type: objectStatus (plesk_common. Default value: en. The email node is optional. The address node is optional. It specifies the email address of the client account owner. etc. The state node is optional.

Supported Operations 35 Limits and Permissions This section contains limits and permissions settings for client accounts.2.0. Data type: string.0 you can manage the settings using descriptors. API RPC 1. Starting from API RPC 1. Specifies the maximum number of Tomcat web applications available for the client. It is structured as follows:  The max_webapps node is optional. .4. For details on descriptors.0 and Earlier Versions This section contains limits and permissions settings of a client account. refer to the Presentation of Object Descriptor (on page 16) section in API Reference and the Descriptors section in the Programming Guide.0 and earlier. that are available in API RPC v.5.4. Limits The limits on use of Plesk resources are defined by complex type clientLimits (plesk_client.2.1.xsd).

Specifies the maximum number of IIS application pools available for the client. Data type: string. Data type: string. Specifies the validity period of the client account in the UNIX timestamp format. Specifies the maximum disk space (in bytes) occupied by all Microsoft SQL databases belonging to the client. Makes sense for Plesk for Windows only. Specifies the maximum quantity of web users allowed for the client. Data type: string. The max_wu node is optional. The max_dom node is optional.0 and higher. The max_iis_app_pools node is optional. The mssql_dbase_space node is optional. The max_subdom node is optional. Data type: string. Data type: string. Specifies the maximum number of mailing lists available for the client. The max_traffic node is optional. Makes sense for Plesk for Windows only. Data type: string. The max_resp node is optional. Specifies the maximum number of Microsoft SQL databases available for the client. Makes sense for Plesk for Windows only. Data type: string. The max_mssql_db node is optional. Data type: string. Data type: string. The mbox_quota node is optional. The max_subftp_users node is optional. Supported in version 1. Specifies the maximum mail box size (in bytes) allowed for the client. Data type: string. Data type: string.4. Makes sense for Plesk for Windows only. Specifies the maximum number of additional FTP accounts. Data type: string. Data type: string. Specifies the maximum number of MySQL databases available for the client. Makes sense for Plesk for Windows only. Makes sense for Plesk for Windows only. Data type: string. The max_box node is optional. The mysql_dbase_space node is optional. The expiration node is optional. The total_mboxes_quota node is optional. Specifies the limit on disk space (in bytes) for the client. The max_redir node is optional. Specifies the maximum number of shared SSL links available for the client. Specifies the maximum number of redirects available for the client. Data type: string. The max_mg node is optional.1. The max_db node is optional. Data type: string. The max_shared_ssl_links node is optional. Specifies the maximum number of mailboxes allowed for the client. Data type: integer. Specifies the maximum number of subdomains available for the client. Specifies the limit on the number of domains for the client. Data type: string. Specifies the maximum number of mail groups available for the client. Data type: string.       . Specifies the maximum disk space (in bytes) occupied by all MySQL databases belonging to the client. Specifies the total size of all mailboxes (in bytes) allowed for the client. Specifies the limit (in bytes) on the traffic for the client.Supported Operations 36               The max_maillists node is optional. Specifies the maximum number of email autoresponders available for the client. The disk_space node is optional. Makes sense for Plesk for Windows only. Data type: string.

0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. Data type: integer.   The following packet creates a client account and sets the limits for it: <packet version="1.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <passwd>Jhtr66fBB</passwd> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>host@logicsoft.4.1. Data type: integer. Specifies the maximum number of ODBC connections allowed for the Plesk Client just created. Makes sense for Plesk for Windows only. Specifies the maximum number of additional Microsoft FrontPage accounts.0 and higher. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </add> </client> </packet> .0 and later. Data type: integer.2.4.2. The feature is supported by API RPC 1. Makes sense for Plesk for Windows only. Specifies the maximum number of domain aliases allowed for the Plesk Client just created.net</email> <address>105 Brisbane Road.4. The max_odbc node is optional.Supported Operations 37  The max_fpse_users node is optional. Supported in version 1. The max_dom_aliases node is optional.

Data type: Boolean. The manage_subdomains node is optional. The manage_quota node is optional.Supported Operations 38 Permissions Client permissions are presented by complex type clientPerms (plesk_client_xsd). The manage_not_chroot_shell node is optional. Data type: Boolean. Data type: Boolean. Data type: Boolean. It allows/disallows the client to manage physical hosting. Data type: Boolean. It allows/disallows the client to manage subdomains. It allows/disallows the client to change the hard disk limit. It allows/disallows the client to create domains. It is structured as follows:      The create_domains node is optional. The manage_phosting node is optional. It allows/disallows the client to manage shell without changing the mount point of the UNIX root. .

The manage_performance node is optional.Supported Operations 39          The change_limits node is optional. It allows/disallows the client to manage DNS settings.5. Data type: Boolean. Makes sense for Plesk for Windows only. It allows/disallows the client to use backup/restore functions. Data type: Boolean. Data type: Boolean. It allows/disallows the client to manage the DrWeb antivirus program.4. The manage_log node is optional.3. The manage_subftp node is optional. It allows/disallows the client to manage IIS application pool. It allows/disallows the client to manage hosting performance.1 and higher. It allows/disallows the client to manage mailing lists. not used in Plesk for UNIX beginning with version 8. It allows/disallows the client to manage the task scheduler. The cp_access node is optional. Data type: Boolean. The make_dumps node is optional.0. The manage_crontab node is optional.1 and higher if DrWeb is supported by the key. The manage_webapps node is optional. Supported beginning with version 1. It allows/disallows the client to use SiteBuilder. Data type: Boolean.1. Data type: Boolean. Supported in API RPC 1. It allows/disallows the client to change the domain limits. Data type: Boolean. The remote_access_interface node is optional. It allows/disallows the client to manage Plesk Desktop. Data type: Boolean.4 for UNIX and later. Data type: Boolean. It allows/disallows the client to manage additional FTP accounts (with access to the specified domain folders only) created on domains.5 and higher.0 of API RPC. Data type: Boolean. Data type: Boolean. The dashboard node is optional. The manage_dashboard node is optional. Data type: Boolean. API RPC 1. It allows/disallows the client to use the standard Plesk GUI. The manage_anonftp node is optional. Is used for Plesk for Windows only. Supported in Plesk 7. Data type: Boolean. Available in Plesk 7. The site_builder node is optional. It allows/disallows the client to manage domain aliases. Data type: Boolean. Data type: Boolean. Data type: Boolean. It allows/disallows the client to use API RPC. It allows/disallows the client to manage log rotation. It allows/disallows the client to manage Tomcat web applications. The manage_sh_access node is optional. Data type: Boolean. The manage_domain_aliases node is optional. The manage_iis_app_pool node is optional. It allows/disallows the client to access Plesk via Control Panel. The manage_drweb node is optional. Data type: Boolean.0.4. The stdgui node is optional. The manage_maillists node is optional. It allows/disallows the client to manage Anonymous FTP.            . Data type: Boolean. Available in Plesk 7. Data type: Boolean. Is used in Plesk for UNIX only. It allows/disallows the client to use Plesk Desktop. The manage_dns node is optional. It allows/disallows the client to use shell access and provide it to users.0 and higher.

It allows/disallows Plesk Client to use the FTP repository for backup/restore functions. The allow_ftp_backups node is optional.4.4. The allow_local_backups node is optional.2. The feature is supported by API RPC 1.4.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <passwd>Jhtr66fBB</passwd> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>host@logicsoft. Makes sense for Plesk for UNIX only.0 and later. It allows/disallows Plesk Client to use the local repository for backup/restore functions. Data type: Boolean. Data type: Boolean. It allows/disallows Plesk Client to manage spam filter settings.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. The feature is supported by API RPC 1.   The following sample packet creates a client account and sets permissions for it: <packet version="1. Makes sense for Plesk for UNIX only.2. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> <permissions> <create_domains>true</create_domains> <manage_phosting>true</manage_phosting> <manage_quota>false</manage_quota> <manage_subdomains>true</manage_subdomains> <change_limits>true</change_limits> <manage_dns>true</manage_dns> <manage_log>true</manage_log> <manage_anonftp>true</manage_anonftp> <manage_webapps>true</manage_webapps> <manage_sh_access>true</manage_sh_access> <manage_maillists>true</manage_maillists> <make_dumps>true</make_dumps> <remote_access_interface>true</remote_access_interface> <cp_access>true</cp_access> <manage_domain_aliases>true </manage_domain_aliases> </permissions> </add> </client> </packet> .2. Data type: Boolean.0 and later.4.net</email> <address>105 Brisbane Road.Supported Operations 40  The manage_spamfilter node is optional. The feature is supported by API RPC 1.2. Makes sense for Plesk for UNIX only.0 and later.

It specifies a limit value.0 and later. and its graphical representation is as follows:  The limit node is required. that are available in API RPC v. Data type: PleskLimitType (plesk_client. It specifies a limit name.0. For details.5. The following code represents maximum databases limit: <limits> <limit> <name>max_db</name> <value>100</value> </limit> </limits> Note: To manage limits.1. Data type: any. It specifies parameters of a limit. you should first retrieve limits descriptor (for a specified client). and its graphical representation is as follows:  The permission node is required.5. Data type: sting. The value node is required.Supported Operations 41 API RPC 1. It specifies a permission name. It specifies parameters of a permission.0 and Later Versions This section contains clients limits and permissions settings of a client account.xsd). Note: You can specify multiple limit parameters in one limits node.0.xsd).   The name node is required. Data type: PleskPermissionType (plesk_client.  The name node is required.xsd). Data type: sting. Limits The limits node is presented by clientLimits type (plesk_client. containing names of limits.xsd). Permissions The permissions node is presented by clientPerms type (plesk_client. refer to the Retrieving Descriptor of Limits (on page 78) section. .

The following code represents maximum databases limit: <permissions> <permission> <name>create_domains</name> <value>100</value> </permission> </limits> Note: To manage permissions. It specifies a single IP address currently available in the IP pool of the Plesk Client.Supported Operations 42  The value node is required. you should first retrieve permissions descriptor (for a specified client). Note: You can specify multiple permission parameters in one permissions node. Data type: any. refer to the Retrieving Descriptor of Permissions (on page 84) section.xsd). It is presented in XML packets by node ippool of type ipPoolType (plesk_client. Data type: ip_address (string). This node is structured as follows:  The ip-address node is optional. containing names of permissions. IP Pool Settings Every client account has its own pool of IP addresses. It specifies a permission value. For details. .

The subdomains node is required. It specifies the number of automatic response messages created by Plesk Client. Default value: 0. The postboxes node is required. Default value: 0. Default value: 0. The redirects node is required. Data type: unsignedInt. Default value: 0. Data type: unsignedInt. It specifies the number of redirects created by Plesk Client. The mail_lists node is required.xsd). Data type: unsignedInt. It specifies the number of mailing lists created by Plesk Client. Default value: 0. Default value: 0. Data type: unsignedInt. . It specifies the number of sub-domains created by Plesk Client. Default value: 0. It specifies the number of email groups created by Plesk Client. Data type: unsignedInt. It specifies the number of email boxes created by Plesk Client. Default value: 0. The mail_resps node is required. The disk_space node is required. Data type: unsignedInt. This node is structured as follows:         The active_domains node is required. Data type: unsignedInt.Supported Operations 43 Statistics The statistics requested from Plesk database for a certain Plesk Client is returned in the stat node of type clientStatType (plesk_client. It specifies the amount of disk space occupied by the given Plesk Client. The mail_groups node is required. Data type: integer. It specifies the number of active domains created by Plesk Client.

It specifies the number of databases used by Plesk Client. Default value: 0. . Data type: unsignedInt. It specifies the number of Tomcat web applications used by Plesk Client. Default value: 0. The traffic node is required. It specifies the number of web users created by Plesk Client. Default value: 0. It specifies the amount of traffic (in bytes) spent by Plesk Client during the previous day. Data type: unsignedInt. Default value: 0. The webapps node is required. Data type: integer.Supported Operations 44      The web_users node is required. The data_bases node is required. Data type: unsignedInt. The traffic_prevday node is required. It specifies the amount of traffic (in bytes) spent by Plesk Client monthly. Data type: integer. Default value: 0.

while settings can be specified later.4.0”> <client> <add> … </add> </client> </packet> The add node does not have a separate type. To learn more about client templates.2. Client account presents some general information about Plesk Client and a collection of various settings. It can be applied only when creating the client account. The only exception is a client template. it is nested within the ClientTypeRequest complex type (client_input.Supported Operations 45 Creating Client Account Client accounts can be created by Plesk Administrator only. refer to section Managing Client Templates (see page 88). These settings are as follows:     Limits on use of Plesk resources Plesk Client access permissions Plesk Client IP pool settings Client template on which the client account is based The general information is always specified when creating a client account.xsd). The add node has the following graphics representation: . Request Packet Structure A request XML packet adding a new client account to Plesk database includes the add operation node: <packet version=”1.

The feature is supported in API RPC 1.xsd).0 and later. Data type: clientAddGenInfo (plesk_client. it is defined within the add node as follows:  The package_id node is required.xsd).4. Data type: none. Data type: integer.xsd).Supported Operations 46  The gen_info node is required. Data type: clientPerms (plesk_client. See the structure of this node in the Limits and Permissions (on page 35) topic. See the structure of this node in topic General Client Account Settings (see page 29). Is used to specify the client template if the new client account must be based on any.2. Specifies the set of limits imposed on Plesk resources accessible to the new client. Data type: integer. Specifies the general information about the new client account.0 and later.0 and later. The feature is supported in API RPC 1. See the structure of this node below. . Specifies the client‘s list of permissions for using Plesk resources and managing own services.2. See the structure of this node in the Limits and Permissions (on page 35) topic.4. The limits node is optional. The feature is supported in API RPC 1. Data type: Boolean.       The add_packages_to_client_pool node doesn't have a special data type. Makes sense for Plesk for Windows only.4. The template-id node is required. The sbnet-user node is optional. Data type: string. Specifies the list of web application distributions that should be added to the client pool (to be deployed to the client's domains later). The template-name node is required.2. The add_packages_to_client_pool is optional. The permissions node is optional. It specifies the identifier of the distribution package to be added to the client pool. Data type: clientLimits (plesk_client. Is true if a SiteBuilder user should be created when creating the client template. Is used to specify the client template name if the new client account must be based on any.

.Supported Operations 47 Request Samples The following packet creates a client account and sets the collection of settings for it: <packet version="1. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> </add> </client> </packet> A client account can be created using a client template.net</email> <address>105 Brisbane Road.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <passwd>Jhtr66fBB</passwd> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>host@logicsoft.2. so this packet creates a client account with these settings set already.4.4. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> <template-name>base_template</template-name> </add> </client> </packet> Client templates normally define a collection of client settings (limits. etc).2.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd.net</email> <address>105 Brisbane Road. The following packet performs this task: <packet version="1. See the Managing Client Templates (see page 88) section for details.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <passwd>Jhtr66fBB</passwd> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>host@logicsoft.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. permissions.

Supported Operations 48 To create multiple client accounts (e.net</email> <address>122 Greenroad Valley. use a different add operations for each: <packet version="1.g.4.</cname> <pname>James Hardy</pname> <login>jhard</login> <passwd>Jk8Dhh6fBB</passwd> <status>0</status> <phone>416 907 3366</phone> <fax>928 752 3377</fax> <email>james@technosoft.</cname> <pname>Stephen Lowell</pname> <login>stevelow</login> <passwd>Jhtr66fBB</passwd> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>host@logicsoft. Unit 1</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> <template-name>base_template</template-name> </add> </client> </packet> .2. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> </add> <add> <gen_info> <cname>TechnoSoft Ltd.. using a client template).net</email> <address>105 Brisbane Road.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd.

Data type: integer. The errtext node is optional.Supported Operations 49 Response Packet Structure The add node of the response packet is structured as follows:      The result node is required. It wraps the result of the requested add operation. Is used to return the error code when the add operation fails. Data type: string.4.0”> <client> <add> <result> <status>ok</status> <id>2435</id> </result> </add> </client> </packet> If the packet created more than one client account. Data type: unsignedInt. Can be used to return an error message if the add operation fails.0”> <client> <add> <result> <status>ok</status> . The errcode node is optional. Response Samples A response packet received after the client account is created successfully looks as follows: <packet version=”1. each create operation will be reported in a separate add node: <packet version=”1. It returns the execution status of the add operation. Data type: string. The id node is optional. Data type: resultType (common. The status node is required.xsd).2. Returns the unique identifier of the client account just added to Plesk.4. It is required if the add operation succeeds. Allowed values: ok | error.2.

0”> <client> <add> <result> <status>ok</status> <id>2435</id> </result> </add> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> </result> </add> </client> </packet> The add sections will follow one another in the order they have been listed in the request packet.2.0”> <client> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.4. the negative response can look as follows: <packet version=”1.</errtext> </result> </add> </client> </packet> or: <packet version=”1.2.Supported Operations <id>2435</id> </result> </add> <add> <result> <status>ok</status> <id>2436</id> </result> </add> </client> </packet> 50 If the operation fails.4. .

0”> <client> <get> … </get> </client> </packet> The get node does not have a separate type. The get node has the following graphics representation: . send a request packet with the get operation to Plesk server.2. Request Packet Structure A request XML packet retrieving information about the client accounts from Plesk database includes the get operation node: <packet version=”1.4. company. contact data.Supported Operations 51 Getting Information About Client Accounts The get operation is used to retrieve client account settings from Plesk database.xsd). These settings are as follows:      General information about Plesk Client (name. and so on) Statistics on this Plesk Client Limits on use of Plesk resources set for this Plesk Client Access permissions set for this Plesk Client IP pool settings set for this Plesk Client To retrieve this information. it is nested within the ClientTypeRequest complex type (client_input.

specify the packet as follows: <packet version=”1. The stat node is optional. Data type: none. For details.4. Data type: none. It is used to request statistics on the specified clients. The ippool node is optional. It is used to request for the general client account settings. Data type: none. refer to the Limits and Permissions (on page 35) section.2. The permissions node is optional.xsd).0”> <client> <get> <filter> <id>1324</id> <id>1325</id> </filter> <dataset> <gen_info/> <stat/> <permissions/> <limits/> <ippool/> </dataset> </get> </client> </packet> . The limits node is optional.0”> <client> <get> <filter> <id>1324</id> </filter> <dataset> <gen_info/> <stat/> <permissions/> <limits/> <ippool/> </dataset> </get> </client> </packet> To send a similar packet for multiple client accounts. It indicates the types of information requested from Plesk database. It is used to request permissions set for the specified Plesk Clients. For details. refer to the Limits and Permissions (on page 35) section. It is used to request the limits set for the specified clients. It is used to request the IP pool configuration settings for the specified clients. Data type: clientDatasetType (plesk_client.   Request Samples To get the information about the client account.2. The gen_info node is optional.Supported Operations 52     The dataset node is required. Data type: none. Data type: none.4. use the packet as follows: <packet version=”1.

2. use multiple get sections: <packet version=”1.2.0”> <client> <get> <filter> <id>1324</id> </filter> <dataset> <gen_info/> <stat/> </dataset> </get> <get> <filter> <login>technolux</login> </filter> <dataset> <permissions/> <limits/> <ippool/> </dataset> </get> </client> </packet> .4. The following packet will be invalid: <packet version=”1.4.0”> <client> <get> <filter> <id>1324</id> <login>technolux</login> </filter> <dataset> <gen_info/> <stat/> <permissions/> <limits/> <ippool/> </dataset> </get> </client> </packet> To fix this packet.Supported Operations 53 You cannot identify multiple client accounts by different parameters (id and login) in the same filter section.

This node is available in API RPC 1. It is present if the get operation succeeds. Data type: anySimple. It is required if the get operation succeeds.xsd). It wraps the result of the requested get operation.0. Returns the name or ID of a client depending on a way of client specification in the request packet. The filter-id node is optional. The status node is required. See the structure of this node below. Returns a requested collection of Plesk Client settings.xsd).5.   . Is used to return the error code when the get operation fails. The id node is optional. The data node is optional.0 and later versions. Data type: integer. Allowed values: ok | error. Data type: string. Can be used to return an error message if the get operation fails. Data type: clientData (plesk_client. Data type: unsignedInt. Data type: resultType (common. Returns the unique identifier of the client account whose data is received from Plesk database.Supported Operations 54 Response Packet Structure The get node of the response packet is structured as follows:      The result node is required. Data type: string. The errtext node is optional. It returns the execution status of the get operation. The errcode node is optional.

The permissions node is optional. The sbnet-user node is optional.Supported Operations 55 The data node is defined by complex type clientData (plesk_client. See the structure of this node in the IP Pool Settings (see page 42) topic. It indicates whether a SiteBuilder user account was created for the given client account. Data type: clientGetGenInfo (plesk_client.xsd). For details. It is structured as follows:  The gen_info node is optional. Data type: Boolean. It returns a collection of permissions set for the specified client account. The feature is supported by API RPC 1.xsd).xsd). It returns the IP pool configuration settings for for the specified client account.xsd). The stat node is optional.2. For details. It returns a the statistics collected on the specified client account.xsd). Data type: clientPerms (plesk_client. refer to the Limits and Permissions (on page 35) section.xsd). Data type: ipPoolType (plesk_client. See the structure of this node in the Statistics (see page 43) topic. See the structure of this node in topic General Client Account Settings. Data type: clientStatType (plesk_client. The limits node is optional. The ippool node is optional.      . refer to the Limits and Permissions (on page 35) section.4.0 and later. It returns a collection of limits set for the specified client account. Data type: clientLimits (plesk_client. Makes sense for Plesk for Windows only. It returns a collection of general client account settings.

0. a positive response from the server can look as follows: <packet version=”1.5.Supported Operations 56 Response Samples If you use API RPC 1.5.0”> <client> <get> <result> <status>ok</status> <id>1324</id> <data> <limits> <limit> <name>disk_space</name> <value>209715200</value> </limit> <limit> <name>max_dom</name> <value>50</value> </limit> <limit> <name>max_subdom</name> <value>250</value> </limit> <limit> <name>max_webapps</name> <value>30</value> </limit> <limit> <name>max_traffic</name> <value>209715200</value> </limit> <limit> <name>max_db</name> <value>30</value> </limit> <limit> <name>expiration</name> <value>1134616208</value> </limit> </limits> <sbnet-user>false</sbnet-user> </data> </result> </get> </client> </packet> .0 or later versions.0.

4.</errtext> <id>1324</id> </result> </get> </client> </packet> .4.2.Supported Operations 57 If you use API RPC 1.2.4.0”> <client> <get> <result> <status>ok</status> <id>1324</id> <data> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> <sbnet-user>false</sbnet-user> </data> </result> </get> </client> </packet> A negative response can look as follows: <packet version=”1. a positive response from the server can look as follows: <packet version=”1.0 or earlier versions.0”> <client> <get> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2.

it is nested within the ClientTypeRequest complex type (client_input.2. Data type: string.2. If multiple client accounts are deleted.0”> <client> <del> <filter> <id>1324</id> <id>1325</id> </filter> . The login node is optional. The del node has the following graphics representation:    The filter node is required. Data type: integer.0”> <client> <del> … </del> </client> </packet> The del node does not have a separate type.4. Request Samples A single request packet can delete a client account or multiple client accounts. It specifies the unique identifier of the client account.4.xsd). Data type: clientSelectionFilterType (client_input.Supported Operations 58 Deleting Client Accounts The del operation is used to remove the specified client account and all its settings from Plesk database. It is used to uniquely identify the client account either by id.xsd). they can be filtered either by id or by login: <packet version=”1. Request packet Structure A request XML packet deleting a client account from Plesk database includes the del operation node: <packet version=”1. It specifies the unique login of the client account. The id node is optional. or by login.

2.0”> <client> <del> <filter> <id>1324</id> </filter> </del> <del> <filter> <login>advent</login> </filter> </del> </client> </packet> .2. use multiple del sections: <packet version=”1.4.4.0”> <client> <del> <filter> <login>technolux</login> <login>advent</login> </filter> </del> </client> </packet> The following packet is invalid as it uses both id and login in the same filter: <packet version=”1.0”> <client> <del> <filter> <id>1324</id> <login>advent</login> </filter> </del> </client> </packet> To fix this packet.2.Supported Operations </del> </client> </packet> 59 Or: <packet version=”1.4.

It wraps the result of the requested del operation. The errcode node is optional. Can be used to return an error message if the del operation fails. Is used to return the error code when the del operation fails. Returns the unique identifier of the client account just deleted from Plesk.0 and later versions. Data type: string.  Response Samples After the specified client account has been deleted successfully.2. Data type: anySimple. Data type: integer. The id node is optional. Data type: resultType (common.4.0”> <client> <del> <result> <status>ok</status> <id>1324</id> </result> </del> </client> </packet> . The errtext node is optional. Allowed values: ok | error.xsd). The status node is required. The filter-id node is optional. the response received from Plesk server can look as follows: <packet version=”1. Data type: string.5. Data type: unsignedInt. This node is available in API RPC 1. Returns the name or ID of a client depending on a way of client specification in the request packet.0. It is required if the del operation succeeds.Supported Operations 60 Response Packet Structure The del node of the response packet is structured as follows:      The result node is required. It returns the execution status of the del operation.

This update can refer to any or all of the following settings:     General Plesk Client settings Limits on use of Plesk resources Plesk Client access permissions Sitebuilder user account . the response packet is as follows: <packet version=”1.0”> <client> <del> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.2.0”> <client> <del> <result> <status>ok</status> <id>1324</id> </result> <result> <status>ok</status> <id>1325</id> </result> </del> </client> </packet> If the operations failed. the response can look as follows: <packet version=”1.</errtext> <id>1325</id> </result> </del> </client> </packet> Setting Client Account Properties A client account stored in Plesk database can be updated by Plesk Administrator.</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.4.4.2.Supported Operations 61 If multiple client accounts has been deleted successfully.

xsd). The set node has the following graphics representation:  The filter node is required.0”> <client> <set> … </set> </client> </packet> The set node does not have a separate type. The id node is optional.2. Data type: string. The login node is optional. The gen_info node is optional.xsd). See the structure of this node in topic General Client Account Settings (see page 29).4. Data type: none. Data type: integer.Supported Operations 62 Request Packet Structure A request XML packet setting various settings for the specified client account includes the set operation node: <packet version=”1. It specifies a collection of general settings.     .xsd). This can be done either by id. It is used to specify the categories of settings that will be set to Plesk database. It specifies the unique login of the client account. Data type: clientSelectionFilterType (client_input. It is used to uniquely identify the client account. Data type: clientSetGenInfo (plesk_client. It specifies the unique identifier of the client account. it is nested within the ClientTypeRequest complex type (client_input. The values node is required. or by login.

The permissions node is optional. It specifies a collection of limits set for the specified client account. Makes sense for Plesk for Windows only. This feature is supported by API RPC 1. Data type: Boolean. or by login.   Request Samples The set operation can be used for setting the same collection of settings for multiple client accounts. For details.4. The sbnet-user node is optional. For details.5.xsd). If you use API RPC 1.0 or later versions. All accounts should be filtered within the same filter either by id.Supported Operations 63  The limits node is optional. It is used to enable/disable the creation of a SiteBuilder user account for this Plesk Client. Data type: clientPerms (plesk_client.2.0”> <client> <set> <filter> <login>technolux</login> <login>advent</login> </filter> <values> <limits> <limit> <name>disk_space</name> <value>209715200</value> </limit> <limit> <name>max_dom</name> <value>50</value> </limit> <limit> <name>max_subdom</name> <value>250</value> </limit> <limit> <name>max_webapps</name> <value>30</value> </limit> <limit> <name>max_traffic</name> <value>209715200</value> </limit> <limit> <name>max_db</name> <value>30</value> </limit> .0. refer to the Limits and Permissions (on page 35) section.xsd).0. a request packet can look as follows: <packet version=”1.5. refer to the Limits and Permissions (on page 35) section. Data type: clientLimits (plesk_client. It specifies a collection of Plesk Client permissions.0 and later.

2.4.0”> <client> <set> <filter> <login>technolux</login> <login>advent</login> </filter> <values> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> .Supported Operations 64 <limit> <name>expiration</name> <value>1134616208</value> </limit> </limits> </values> </set> </client> </packet> If you use API RPC 1.4.4.2.0 or earlier versions. the request packet looks as follows: <packet version=”1.2.0”> <client> <set> <filter> <id>1324</id> <id>1325</id> </filter> <values> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> </set> </client> </packet> Or: <packet version=”1.

use multiple set operations: <packet version=”1.Supported Operations </set> </client> </packet> 65 The following packet is invalid as it uses both filtering parameters within the same filter: <packet version=”1.0”> <client> <set> <filter> <id>1324</id> </filter> <values> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> </set> <set> <filter> <login>advent</login> </filter> <values> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> .2.4.4.0”> <client> <set> <filter> <id>1324</id> <login>advent</login> </filter> <values> <limits> <disk_space>209715200</disk_space> <max_dom>50</max_dom> <max_subdom>250</max_subdom> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> </set> </client> </packet> To fix this packet.2.

Supported Operations <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> </set> </client> </packet>

66

Response Packet Structure
The set node of the response packet is structured as follows:

    

The result node is required. It wraps the result of the requested set operation. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the set operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is used to return the error code when the set operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the set operation fails. Data type: string. The filter-id node is optional. Returns the name or ID of a client depending on a way of client specification in the request packet. This node is available in API RPC 1.5.0.0 and later versions. Data type: anySimple. The id node is optional. It is required if the set operation succeeds. Returns the unique identifier of the client account just updated. Data type: integer.

Supported Operations

67

Response Samples

Once the specified client accounts are updated, the response packet as follows is received from the server:

<packet version=”1.4.2.0”> <client> <set> <result> <status>ok</status> <id>1324</id> </result> <result> <status>ok</status> <id>1325</id> </result> </set> </client> </packet>

If the set operations fails, the response can look as follows:

<packet version=”1.4.2.0”> <client> <set> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> <id>1324</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.</errtext> </result> </set> </client> </packet>

Supported Operations

68

Adding IP Addresses to Client’s IP Pool
The ippool_add_ip operation is used to add IP addresses to the IP pool of the specified client account.

Request Packet Structure
A request XML packet adding a new IP address to the IP pool of the specified Plesk Client includes the ippool_add_ip node:
<packet version=”1.4.2.0”> <client> <ippool_add_ip> … </ippool_add_ip> </client> </packet>

The ippool_add_ip node is specified by type ipPoolOperateType (plesk_client.xsd). The ippool_add_ip node has the following graphics representation:

 

The client_id node is required. It specifies the unique identifier of the client account whose IP pool is added with new IP addresses. Data type: integer. The ip_address node is required. It specifies the IP address to be added to the IP pool of the specified Plesk Clients. Data type: ip_address (common.xsd).

Request Samples
To add an IP address to the client‘s IP pool, specify the packet as follows:
<packet version=”1.4.2.0”> <client> <ippool_add_ip> <client_id>1234</client_id> <ip_address>192.0.2.122</ip_address> <ip_address>192.0.2.123</ip_address> </ippool_add_ip> </client> </packet>

Supported Operations

69

Response Packet Structure
The ippool_add_ip node of the response packet is structured as follows:

    

The result node is required. It wraps the result of the requested ippool_add_ip operation. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the ippool_add_ip operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is used to return the error code when the ippool_add_ip operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the ippool_add_ip operation fails. Data type: string. The ip_address node is optional. It is required if the ippool_add_ip operation succeeds. Returns the IP address added to the IP pool of the specified client account(s). Data type: ip_address (common.xsd). The client_id node is optional. It is required if the ippool_add_ip operation succeeds. Returns the unique identifier of the client account whose IP pool is enlarged with the specified IP address. Data type: integer.

Response Samples
A positive response packet received from the server can look as follows:
<packet version=”1.4.2.0”> <client> <ippool_add_ip> <result> <status>ok</status> <client_id>1234</client_id> <ip_address>192.0.2.122</ip_address> <ip_address>192.0.2.123</ip_address> </result> </ippool_add_ip> </client> </packet>

Supported Operations

70

If the ippool_add_ip operations fails, the negative response can look as follows:
<packet version=”1.4.2.0”> <client> <ippool_add_ip> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> </result> </ippool_add_ip> </client> </packet>

Removing IP Addresses from the Client’s IP Pool
The ippool_del_ip operation is used to remove IP addresses from the IP pool of the specified client account.

Request Packet Structure
A request XML packet removing IP addresses from the IP pool of the specified Plesk Client includes the ippool_del_ip operation node:
<packet version=”1.4.2.0”> <client> <ippool_del_ip> … </ippool_del_ip> </client> </packet>

The ippool_del_ip node is specified by type ipPoolOperateType (plesk_client.xsd). The ippool_add_ip node has the following graphics representation:

 

The client_id node is required. It specifies Plesk Client from whose IP pool the specified IP addresses are taken away. Data type: integer. The ip_address node is required. It specifies the IP address that will be removed from the IP pool of the specified Plesk Clients. Data type: string.

Supported Operations

71

Request Samples
To remove the specified IP addresses from the client‘s IP pool, specify the packet as follows:
<packet version=”1.4.2.0”> <client> <ippool_del_ip> <client_id>1234</client_id> <ip_address>192.0.2.122</ip_address> <ip_address>192.0.2.123</ip_address> </ippool_del_ip> </client> </packet>

Response Packet Structure
The ippool_del_ip node of the response packet is structured as follows:

    

The result node is required. It wraps the result of the requested ippool_del_ip operation. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the ippool_del_ip operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is used to return the error code when the ippool_del_ip operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the ippool_del_ip operation fails. Data type: string. The ip_address node is optional. It is required if the ippool_del_ip operation succeeds. Returns the IP address removed from the IP pool of the specified client accounts. Data type: string. The client_id node is optional. It is required if the ippool_del_ip operation succeeds. Returns the unique identifier of the client account from whose IP pool the specified IP address (or several) is removed. Data type: integer. (integer).

Supported Operations

72

Response Samples
A positive response packet received from the server can look as follows:
<packet version=”1.4.2.0”> <client> <ippool_del_ip> <result> <status>ok</status> <client_id>1234</client_id> <ip_address>192.0.2.122</ip_address> <ip_address>192.0.2.123</ip_address> </result> </ippool_del_ip> </client> </packet>

If the ippool_del_ip operations failed, the response can look as follows:
<packet version=”1.4.2.0”> <client> <ippool_del_ip> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> </result> </ippool_del_ip> </client> </packet>

Supported Operations

73

Listing Buttons Displayed on the Client’s Page in Control Panel
The cform_buttons_list operation is used to retrieve the list of buttons displayed on a personal Plesk Client page in Plesk Control panel.

Request Packet Structure
A request XML packet getting the list of buttons of the specified client account from Plesk database includes the cform_buttons_list operation node:
<packet version=”1.4.2.0”> <client> <cform_buttons_list> … </cform_buttons_list> </client> </packet>

The cform_buttons_list operation node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd). The cform_buttons_list node has the following graphics representation:

The filter node is required. It is used to define Plesk Client whose buttons will be got. This can be done either by id, or by login. Data type: clientSelectionFilterType (client_input.xsd) The id node is optional. It specifies the identifier of a Plesk Client whose buttons will be got. Data type: integer. The login node is optional. it specifies the login name of a Plesk Client whose buttons will be got. Data type: string.

 

Request Samples
A single request packet can retrieve the list the buttons for a single Plesk Client or multiple Plesk Clients. If multiple Plesk Clients are requested, they can be filtered either by id or by login:
<packet version=”1.4.2.0”> <client> <cform_buttons_list> <filter> <id>1324</id> <id>1325</id> </filter>

Supported Operations </cform_buttons_list> </client> </packet>

74

Or:
<packet version=”1.4.2.0”> <client> <cform_buttons_list> <filter> <login>technolux</login> <login>advent</login> </filter> </cform_buttons_list> </client> </packet>

The following packet is invalid as it uses both id and login in the same filter:
<packet version=”1.4.2.0”> <client> <cform_buttons_list> <filter> <id>1324</id> <login>advent</login> </filter> </cform_buttons_list> </client> </packet>

To fix this packet, use multiple cform_buttons_list sections:
<packet version=”1.4.2.0”> <client> <cform_buttons_list> <filter> <id>1324</id> </filter> </cform_buttons_list> <cform_buttons_list> <filter> <login>advent</login> </filter> </cform_buttons_list> </client> </packet>

Supported Operations

75

Response Packet Structure
A response cform_buttons_list packet structure is specified in the client_output.xsd schema as follows:

    

The result node is required. It wraps the result of the requested cform_buttons_list operation. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the cform_buttons_list operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is used to return the error code when the cform_buttons_list operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the cform_buttons_list operation fails. Data type: string. The filter-id node is optional. Returns the name or ID of a client depending on a way of client specification in the request packet. This node is available in API RPC 1.5.0.0 and later versions. Data type: anySimple. The id node is optional. It is required if the cform_buttons_list operation succeeds. Returns the unique identifier of the client account whose list of buttons is returned. Data type: integer. The button node is optional. It is present if the cform_buttons_list operation succeeds. Returns a single button displayed on the client's page in Plesk Control Panel (PCP). Data type: buttonDataType (plesk_common.xsd). See the structure of this node below.

Supported Operations

76

The button node is structured as follows:

The code node is required. It specifies the button's identifier. Data type: string.

Supported Operations

77

            

The type node is required. It specifies the button's type (a link or a standard button). Data type: string. Allowed values: link_button | comm_button. The name node is required. It specifies the localized caption displayed on the button in PCP. Data type: string. The name_id node is required. It specifies the localization key of the button's name. Data type: string. The group_name node is required. It specifies the localized name of the section in which the button is located in PCP. Data type: string. The group_name_id node is required. It specifies the localization key of the section name. Data type: string. The href node is required. It specifies the URL referenced by the button. Data type: string. The js_onclick node is optional. It specifies a piece of the JavaScript code executed at the button click. Data type: text. The enabled node is required. It specifies whether the button is enabled/disabled. Data type: Boolean. The new_window node is optional. It indicates whether a new window will be opened at a button click. Data type: Boolean. The tabindex node is optional. It specifies the tabulation index of the button. Data type: integer. Default value: 0. The conhelp_id node is optional. It specifies the localization key of the context help message associated with the button. Data type: string. The conhelp node is optional. It specifies a context help message displayed for the button. Data type: text. The icon_url node is optional. It specifies the URL of the button‘s icon. Data type: string.

Response Samples
A positive response received from the server returns the client‘s identifier and one to many button elements, each describing a single button:
<packet version=”1.5.0.0”> <client> <cform_buttons_list> <result> <status>ok</status> <filter-id>1324</filter-id> <id>1324</id> <button> <code>EDIT_BUTTON</code> <type>link_button</type> <name>Edit</name> <name_id>edit</name_id> <group_name>Tools</group_name> <group_name_id>__tools</group_name_id> <href>/clients/cl_ed.php3</href> <enabled>true</enabled> <new_window>false</new_window> </button> </result> </cform_buttons_list> </client>

Supported Operations </packet>

78

If the operation fails, the negative response packet can look as follows:
<packet version=”1.5.0.0”> <client> <cform_buttons_list> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> <filter-id>1324</filter-id> </result> </cform_buttons_list> </client> </packet>

Retrieving Descriptor of Limits
Use the get-limit-descriptor operation to retrieve descriptor of client's limits. For details on descriptors, refer to the Representation of Object Descriptor (on page 16) section. For details on client's limits, refer to the Limits (on page 41) section.

Request Packet Structure
A request XML packet retrieving client limits descriptors includes the get-limit-descriptor operation node:
<packet version=”1.5.0.0”> <client> <get-limit-descriptor> … </get-limit-descriptor> </client> </packet>

You can retrieve descriptor for the specified client, or the server-level client limits descriptor. The get-limit-descriptor node has the following graphical representation:

Supported Operations

79

The filter node is required. It specifies a filtering rule. For info on filters, refer to the Filters of Descriptors (on page 16) section. Data type: clientSelectionFilterType (client_input.xsd).   The id node is optional. It specifies the client ID. Data type: integer. The login is optional. It specifies the client name. Data type: string.

Note: you can specify multiple id or name parameters in one filter node.

Request Samples
The request packet retrieving limits descriptor for the client with ID 5 looks as follows:
<packet version ="1.5.0.0"> <client> <get-limit-descriptor> <filter> <id>5</id> </filter> </get-limit-descriptor> </client> </packet>

The request packet retrieving limits descriptor for the clients with ID 5 and ID 7 looks as follows:
<packet version ="1.5.0.0"> <client> <get-limit-descriptor> <filter> <id>5</id> <id>7</id> </filter> </get-limit-descriptor> </client> </packet>

The request packet retrieving the server-level descriptor of client limits looks as follows:
<packet version ="1.5.0.0"> <client> <get-limit-descriptor> <filter/> </get-limit-descriptor> </client> </packet>

Supported Operations

80

Response Packet Structure
The get-limit-descriptor node of the output XML packet is structured as follows:

    

The result node is required. It wraps the response retrieved from the server. Data type: ResultFilterType (plesk_common.xsd). The status node is required. It specifies the execution status of the get-limit-descriptor operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It is used to return the error code when the get-limitdescriptor operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return the error message if the get-limitdescriptor operation fails. Data type: string. The filter-id node is optional. It is required if the get-limit-descriptor operation succeeds. Returns the name or ID of a client depending on a way of client specification in the request packet. This node is available in API RPC 1.5.0.0 and later versions. For info on filters, refer to the Filters of Descriptors (on page 23) section. Data type: anySimple. The id node is optional. It is required if the get-limit-descriptor operation succeeds. Returns the unique identifier of the client account. Data type: integer. The descriptor node is optional. It specifies the object descriptor. For details, refer to Representation of Object Descriptor (on page 16). Data type: string.

 

Note: This descriptor contains limits extensions. For details, refer to the Extension of Limits Descriptor (see page 20) section.

Supported Operations

81

Response Samples
If a limit name was not found on the server, the response can look as follows:
<packet version ="1.5.0.0"> <client> <set> <result> <status>error</status> <errcode>1002</errcode> <errtext>Unknown limit name: my_limit</errtext> </result> </set> </client> </packet>

A possible response from the server can look as follows:
<packet version ="1.5.0.0"> <client> <get-limit-descriptor> <result> <status>ok</status> <filter-id>5</filter-id> <id>5</id> <descriptor> <property> <name>max_dom</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_dom</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_subdom</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_subdom</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_dom_aliases</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_dom_aliases</label> <extension> <shared>false</shared> </extension> </property> <property> <name>disk_space</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__disk_space</label> <extension> <shared>false</shared>

Supported Operations </extension> </property> <property> <name>max_traffic</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__max_traffic</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_wu</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_wu</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_db</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_db</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_box</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_box</label> <extension> <shared>false</shared> </extension> </property> <property> <name>mbox_quota</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__mbox_quota</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_redir</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_redir</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_mg</name> <type>int</type> <writable-by>admin</writable-by>

82

Supported Operations <label>limit__max_mg</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_resp</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_resp</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_maillists</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_maillists</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_webapps</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_webapps</label> <extension> <shared>false</shared> </extension> </property> <property> <name>expiration</name> <type>date</type> <writable-by>admin</writable-by> <label>limit__expiration</label> <extension> <shared>true</shared> </extension> </property> </descriptor> </result> </get-limit-descriptor> </client> </packet>

83

Supported Operations

84

Retrieving Descriptor of Permissions
Use the get-permission-descriptor operation to retrieve descriptor of client's permissions. For details on descriptors, refer to the Representation of Object Descriptor (on page 16) section. For details on client's permissions, refer to the Permissions (on page 41) section.

Request Packet Structure
A request XML packet retrieving client permissions preferences includes the getpermission-descriptor operation node:
<packet version=”1.5.0.0”> <client> <get-permission-descriptor> … </get-permission-descriptor> </client> </packet>

You can retrieve permissions descriptor for the specified client, or the server-level client permissions descriptor. The get-permission-descriptor node has the following graphical representation:

The filter node is required. It specifies a filtering rule. For info on filters, refer to the Filters of Descriptors (on page 16) section. Data type: clientSelectionFilterType (client_input.xsd).   The id node is optional. It specifies the client ID. Data type: integer. The login is optional. It specifies the client name. Data type: string.

Note: you can specify multiple id or name parameters in one filter node.

Supported Operations

85

Request Samples

The request packet retrieving permissions descriptor for the client with ID 5 looks as follows:
<packet version ="1.5.0.0"> <client> <get-permission-descriptor> <filter> <id>5</id> </filter> </get-permission-descriptor> </client> </packet>

The request packet retrieving permissions descriptor for MyClient and MyClient2 clients looks as follows:
<packet version ="1.5.0.0"> <client> <get-permission-descriptor> <filter> <login>MyClient</login> <login>MyClient2</login> </filter> </get-permission-descriptor> </client> </packet>

The request packet retrieving the server-level descriptor of client permissions looks as follows:
<packet version ="1.5.0.0"> <client> <get-permission-descriptor> <filter/> </get-permission-descriptor> </client> </packet>

It is required if the get-permission-descriptor operation succeeds. Data type: ResultFilterType (plesk_common. It is used to return the error code when the getpermission-descriptor operation fails. Data type: anySimple. It specifies the execution status of the get-permissiondescriptor operation. For details. The errcode node is optional. It specifies the object descriptor. Can be used to return the error message if the getpermission-descriptor operation fails. The filter-id node is optional. The errtext node is optional. Data type: string. Data type: string.0. The descriptor node is optional.Supported Operations 86 Response Packet Structure The get-permission-descriptor node of the output XML packet is structured as follows:      The result node is required. Data type: unsignedInt. The id node is optional. This node is available in API RPC 1. For info on filters. It is required if the get-permission-descriptor operation succeeds. refer to Representation of Object Descriptor (on page 16). For details.0 and later versions. Returns the unique identifier of the client account. refer to the Extension of Permissions Descriptor (on page 18) section. Returns the name or ID of a client depending on a way of client specification in the request packet. Data type: integer. It wraps the response retrieved from the server. refer to the Filters of Descriptors (on page 23) section. .5.xsd).   Note: This descriptor contains permissions extensions. Allowed values: ok | error. The status node is required. Data type: string.

0..5. </descriptor> </result> </get-permission-descriptor> </client> </packet> ..0"> <client> <get-permission-descriptor> <result> <status>ok</status> <descriptor> <property> <name>cp_access</name> <type>boolean</type> <default-value>true</default-value> <writable-by>admin</writable-by> <label>cl_perm__cp_access</label> <extension> <level>client</level> <level>mail</level> </extension> </property> <property> <name>create_domains</name> <type>boolean</type> <default-value>false</default-value> <writable-by>admin</writable-by> <label>cl_perm__create_domains</label> <extension> <level>client</level> </extension> </property> .Supported Operations 87 Response Samples A positive response from the server can look as follows: <packet version="1.

1. All operations on client templates are allowed for Plesk Administrator only.xsd Plesk version: Plesk 8.0 for UNIX | Plesk 7.0 and higher Plesk user: Plesk Administrator Description Client templates are a kind of presets which are useful when it is necessary to create multiple client accounts with identical permissions.6 for Windows and higher API RPC version: 1. IP pool settings. limits.Supported Operations 88 Managing Client Templates Operator: <client-template> XML Schema: client_template. Supported operations     ADD (see page 96) creates a client template GET (see page 99) retrieves the information on the specified Plesk Clients from the server DEL (see page 104) deletes the specified client templates (see page 107) SET (see page 107) sets new preferences. These settings are as follows:     permissions limits on use of Plesk resources IP pool settings preferences Refer to the Client Template Settings (see page 89) section for details. and IP pool settings for the specified client template . and preferences. Client templates are used to specify a collection of settings and apply them to Plesk Clients. limits.4.

In API RPC 1. Samples The "Limits" XML schema is the same for client and client template.0.0 and later versions.0”> <client-template> <add> <name>base_template</name> <permissions> <permission> <name>create_domains</name> <value>true</value> </permission> <permission> <name>manage_phosting</name> <value>true</value> </permission> <permission> <name>manage_quota</name> <value>true</value> </permission> <permission> <name>manage_domain_aliases</name> <value>true</value> </permission> <permission> <name>manage_subdomains</name> <value>true</value> </permission> <permission> <name>manage_dns</name> <value>true</value> . These settings can be set when creating a Plesk Client or later. refer to the Limits and Permissions (on page 35) section. a packet that requests for creating a new client template and with a collection of permissions can look as follows: <packet version=”1.5.0.5. These settings are as follows:    Permissions and limits on use of Plesk resources (on page 35) IP pool settings (see page 93) Preferences (see page 94) Permissions For details on client permissions.Supported Operations 89 Client Template Settings This section describes a collection of Plesk Client settings that can be defined in a client template.

Supported Operations </permission> <permission> <name>manage_log</name> <value>true</value> </permission> <permission> <name>manage_anonftp</name> <value>true</value> </permission> <permission> <name>manage_subftp</name> <value>true</value> </permission> <permission> <name>manage_webapps</name> <value>true</value> </permission> <permission> <name>remote_access_interface</name> <value>true</value> </permission> <permission> <name>cp_access</name> <value>true</value> </permission> <permission> <name>stdgui</name> <value>true</value> </permission> <permission> <name>dashboard</name> <value>true</value> </permission> <permission> <name>manage_dashboard</name> <value>true</value> </permission> <permission> <name>allow_local_backups</name> <value>true</value> </permission> </permissions> </add> </client-template> </packet> 90 .

0”> <client-template> <add> <name>base_template</name> <limits> <limit> <name>disk_space</name> <value>209715200</value> </limit> <limit> <name>mysql_dbase_space</name> <value>52428800</value> </limit> <limit> <name>max_db</name> <value>50</value> </limit> . refer to the Limits and Permissions (on page 35) section.0.2.5.5.Supported Operations 91 In API RPC 1. a packet that requests for creating a new client template and with a collection of limits can look as follows: <packet version=”1.0 and later versions.4.2.0”> <client-template> <add> <name>base_template</name> <permissions> <create_domains>true</create_domains> <manage_phosting>true/manage_phosting> <manage_quota>true</manage_quota> <manage_domain_aliases>true</manage_domain_aliases> <manage_subdomains>true</manage_subdomains> <manage_dns>true</manage_dns> <manage_log>true</manage_log> <manage_anonftp>true</manage_anonftp> <manage_subftp>true</manage_subftp> <manage_webapps>true</manage_webapps> <remote_access_interface>true</remote_access_interface> <cp_access>true</cp_access> <stdgui>true</stdgui> <dashboard>true</dashboard> <manage_dashboard>true</manage_dashboard> <allow_local_backups>true</allow_local_backups> </permissions> </add> </client-template> </packet> Limits For details on client limits. Samples The "Limits" XML schema is the same for client and client template.0.4. a packet that requests for creating a new client template and with a collection of permissions can look as follows: <packet version=”1.0 and earlier versions. In API RPC 1.

0 and earlier versions.0”> <client-template> <add> <name>base_template</name> <limits> <disk_space>209715200</disk_space> <mysql_dbase_space>52428800</mysql_dbase_space> <max_db>50</max_db> <max_traffic>52428800</max_traffic> <max_dom>100</max_dom> <max_dom_aliases>5</max_dom_aliases> <max_subdom>400</max_subdom> <total_mboxes_ quota>1000</total_mboxes_quota> <expiration>63072000</expiration> </limits> </add> </client-template> </packet> .Supported Operations <limit> <name>max_traffic</name> <value>52428800</value> </limit> <limit> <name>max_dom</name> <value>100</value> </limit> <limit> <name>max_dom_aliases</name> <value>5</value> </limit> <limit> <name>max_subdom</name> <value>400</value> </limit> <limit> <name>total_mboxes_ quota</name> <value>1000</value> </limit> <limit> <name>expiration</name> <value>63072000</value> </limit> </limits> </add> </client-template> </packet> 92 In API RPC 1.2.4.4.2. a packet that requests for creating a new client template and with a collection of limits can look as follows: <packet version=”1.

Supported Operations 93 IP Pool Settings A client template can specify IP pool settings for a Plesk Client that will be created using this template. Shared IP addresses are selected from the IP pool of Plesk server.  The following request packet creates a new client template and sets IP pool settings for it: <packet version=”1. Data type: ip_address (common. It specifies the IP address available in Plesk IP pool that will be shared by the Client created using this client template.121</ip-address> <ip-address>123.xsd).4.123.0”> <client-template> <add> <name>base_template</name> <ip-pool> <ip-address>123.2. The ip-pool node is specified by complex type ClienttemplatePoolType (client_template.123. Data type: integer.123.123.xsd).122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> </add> </client-template> </packet> . The allocate-ip node is optional. The client IP pool can contain a set of shared and exclusive IP addresses. Also. It specifies the number of exclusive IP addresses that will be allotted for a Client created using this client template. It is structured as follows:  The ip-address node is optional. IP pool settings are added to the client account using the ip-pool node of the add or set request packets. this node can be returned in the get response packets (if requested). Exclusive IP addresses are created for a Plesk Client.

 Note: the preferences node is supported by API RPC 1.2. This node makes sense in Plesk for Windows only. this node is returned from Plesk server in the get response packet.4.0 and later.4.0”> <client-template> <add> <name>base_template</name> <preferences> <sbnet-user>true</sbnet_user> </preferences> </add> </client-template> </packet> . The following request packet creates a new client template and sets preferences for it: <packet version=”1.Supported Operations 94 Preferences Preferences are set for a Plesk Client in the preferences node of the add or set request packet.2. It is structured as follows:  The sbnet-user node is optional. It indicates whether a Plesk Client created using this client template can have a SiteBuilder user account. The preferences node is specified by complex type ClientTemplatePreferencesType (plesk_client.xsd). Also.

It specifies the unique name of the client template.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> <id>11</id> <id>12</id> </filter> <limits/> </get> </client-template> </packet> To fix this packet. Data type: string. The following sample packet is invalid as it uses both id and name within the same filter: <packet version=”1.2.4.4. use two different <get> sections instead: <packet version=”1.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> </get> <get> <filter> <id>11</id> . A client template can be filtered either by id. The same is true if several client templates are filtered by the same filter node. The name node is required. This data type is structured as follows:   The id node is required.Supported Operations 95 Filtering Client Templates Filtering is the way the request‘ packets pick out client templates to which the requested operation will be applied. Data type: integer. It specifies the unique identifier of the client template.2. or by name. The filter node is presented by the ClientTemplateFilterType complex type (client_template.xsd).

4.2. Plesk Administrator should send an add request packet and specify the template name. To create a client template.Supported Operations <id>12</id> </filter> <limits/> </get> </client-template> </packet> 96 The filter node can be left empty.4. In this case all client templates available in Plesk will be filtered: <packet version=”1.0”> <client-template> <get> <filter/> </get> </client-template> </packet> Creating Client Template Client templates can be created by Plesk Administrator for own needs only.0”> <client-template> <add> … </add> </client-template> </packet> . Using client templates makes sense if they specify Plesk Client settings. These settings are as follows:     Plesk Client permissions limits on use of Plesk resources imposed for a Plesk Client IP pool settings preferences Request Packet Structure A request XML packet adding a new client template to Plesk database includes the add operation node: <packet version=”1.2.

It specifies a collection of permissions for new clients created using this client template. The ip-pool node is optional. Data type: clienttemplateIpPoolType (client_template. To see the structure of this node. The permissions node is optional. Data type: string.xsd). .4. See the structure of this node in the Limits (on page 35) topic. Data type: clientPerms (plesk_client.Supported Operations 97 The add node is presented by type ClienttemplateAddInputType (client_template. To see the structure of this node.xsd). proceed to the Permissions (on page 35) topic.    Request Samples The following packet creates a client template with a minimal collection of settings. Data type: clientLimits (plesk_client. Its graphical representation is as follows:   The name node is required.xsd). Data type: ClientTemplatePreferencesType (client_template. To see the structure of this node.xsd).xsd).0”> <client-template> <add> <name>base_template</name> <ip-pool> <allocate-ip>2</allocate-ip> </ip-pool> </add> </client-template> </packet> To see sample packets creating client templates with other settings.2. It specifies a collection of limits that will be set for new clients created using this template. refer to the Client Template Settings (see page 89)section. proceed to topic IP Pool Settings (see page 93). The limits node is optional. The preferences node is optional. <packet version=”1. proceed to topic Preferences (see page 94). It specifies the name of the client template. It specifies a collection of preferences for new clients created using this client template. It specifies IP pool settings for new clients created using this client template.

The errcode node is optional. Data type: string. The errtext node is optional.2.0. It is used to return an error code if the add operation fails.xsd). It is used to return an error message if the add operation fails. The status node is required. Data type: unsignedInt. include two different add operations: <packet version=”1. It wraps the response received from the server.2.Supported Operations 98 Creating multiple client templates To create two client templates with a single packet.0”> <client-template> <add> <name>base_template</name> <ip-pool> <allocate-ip>2</allocate-ip> </ip-pool> </add> <add> <name>quick_template</name> <ip-pool> <ip-address>192. Allowed values: ok | error.121</ip-address> <ip-address>192. Data type: ClientTemplateOutputResulttype (client_template.2. Specifies the execution status of the add operation.122</ip-address> </ip-pool> </add> </client-template> </packet> Response Packet Structure The add node of the output XML packet is structured as follows:     The result node is required.0. .4. Data type: string.

This information is as follows:      the unique identifier and the name of the client template Plesk Client permissions limits on use of Plesk resources IP pool settings preferences . Returns the unique name of the client template just added to Plesk.0”> <client-template> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.0”> <client-template> <add> <result> <status>ok</status> <id>24</id> <name>base_template</name> </result> </add> </client-template> </packet> A negative response can look as follows: <packet version=”1.Supported Operations 99   The id node is optional. It is required if the add operation succeeds. Response Samples A positive response received from the server after adding a new client template can look as follows: <packet version=”1. Data type: integer.</errtext> </result> </add> </client-template> </packet> Getting Information About Client Templates The get operation is used to retrieve the information about the client templates from Plesk database.2.4. The name node is optional. Returns the unique identifier if the client template just added to Plesk. It is required is the add operation has succeeded. Data type: string.2.4.

Data type: none.4.     . Data type: ClientTemplateFilterType (client_template.xsd). Request Packet Structure A request XML packet getting information about the specified client templates from Plesk database includes the get operation node: <packet version=”1. The limits node is optional. Data type: none.xsd). It is used to request for Plesk Client limits set in the filtered client templates.0”> <client-template> <get> … </get> </client-template> </packet> The get node is presented by type ClientTemplateGetInputType (client_template. The preferences node is optional. The get operation will return only the settings currently stored in the database. Its graphical representation is as follows:  The filter node is required. The ip-pool node is optional. It is used to request for Plesk Client IP pool settings defined in the filtered client templates.Supported Operations 100 The get operation can return all or particular settings currently present in Plesk database. Filtering client templates is a very important issue. All settings are optional and can be missing in the client template. It serves to pick out client templates whose settings will be selected from Plesk database. Data type: none. A client template can be uniquely identified by one of two parameters – by its id or by the template name. A client template can even be empty (specified by its id and name and not containing any other information). Refer to the Filtering Client Templates (see page 95)section for details.2. It is used to request for Plesk Client preferences defined in the filtered client templates. See the structure of this node in topic Filtering Client Templates. It is used to request for Plesk Client permissions set in the filtered client templates. Data type: none. The permissions node is optional.

a get request packet should contain the filter node.2.Supported Operations 101 Request Samples To filter client templates whose settings will be retrieved from Plesk database.4.4. use the following packet: <packet version=”1.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> <permissions/> <ip-pool/> <preferences/> </get> </client-template> </packet> To filter some client templates by id and others by name within the same packet. The following packet requests all available information about two client templates with names base_template and quick_template.0”> <client-template> <get> <filter/> </get> </client-template> </packet> .4. <packet version=”1. use two get operations: <packet version=”1. Filtering can be done either by the template id. or by the template name.2.2.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> </get> <get> <filter> <id>12</id> </filter> <limits/> </get> </client-template> </packet> To filter all client templates available in Plesk.

Data type: ClientTemplateOutputResulttype (client_template. The errcode node is optional. Data type: unsignedInt.xsd). See the structure of this node in the Limits (on page 35) section.xsd). It wraps the information on a single client template. The limits node is optional. It is missing if the request packet fails before the validation starts.xsd). Data type: clientLimits (plesk_client. It specifies the name of the client template that owns the returned information.   . This node specifies the client template identifier that owns the returned information. It is present if the request get packet specifies the limits node and the operation succeeds. Response Packet Structure The get node of the output XML packet is presented by type ClientTemplateOutputGetType (client_template. Allowed values: ok | error. The name node is optional. It is used if the get operation fails. Data type: string. so the response packet will only return the list of identifiers and template names. Specifies the execution status of the get operation. Data type: integer. Its graphical representation is as follows:      The result node is required. It is missing if the request packet fails before the validation starts. Returns an error code. The errtext node is optional. Data type: string. Data type: result_status (common. The id node is optional. The status node is required.Supported Operations 102 This packet does not specify any particular settings.xsd). It is used if the get operation fails. Returns an error message.

See the structure of this node in the Preferences (see page 94) section. The preferences node is optional.   Response Samples The following packet demonstrates a positive response received from Plesk server. It is present if the request get packet specifies the permissions node and the operation succeeds.4.0”> <client-template> <get> <result> <status>ok</status> <id>24</id> <name>base_template</name> <ip-pool> <allocate-ip>2</allocate-ip> </ip-pool> </result> <result> <status>ok</status> <id>12</id> <name>quick_template</name> <ip-pool> <ip-address>192.xsd).0.</errtext> <id>24</id> <name>base_template</name> </result> <result> .2.4. Data type: clientPerms (plesk_client.2. It is present if the request get packet specifies the ippool node and the operation succeeds.xsd). It is present if the request get packet specifies the preferences node and the operation succeeds.Supported Operations 103  The permissions node is optional. See the structure of this node in the IP Pool Settings (see page 93) section.2.xsd). <packet version=”1.122</ip-address> <ip-address>192.0”> <client-template> <get> <result> <status>error</status> <errcode>1027</errcode> <errtext>IP operation failed. See the structure of this node in the Permissions (on page 35) section. Data type: ClienttemplateIpPoolType (client_template.2. Data type: ClientTemplatePreferencesType (client_template.0. The ip-pool node is optional.123</ip-address> </ip-pool> </result> </get> </client-template> </packet> A negative response received from Plesk server can look as follows: <packet version=”1.

The client templates to be deleted are specified in the filter node either by the client template identifier.4.Supported Operations <status>error</status> <errcode>1027</errcode> <errtext>IP operation failed.xsd). Data type: ClientTemplateFilterType (client_template.</errtext> <id>12</id> <name>quick_template</name> </result> </get> </client-template> </packet> 104 Deleting Client Templates Client templates can be deleted by Plesk Administrator. A single del request packet can delete multiple client templates.2.xsd):  The filter node is required. It specifies the client templates to be deleted from Plesk database. or by the client template name (both parameters uniquely identify a template).0”> <client-template> <del> … </del> </client-template> </packet> The del node is presented by type ClientTemplateDelInputType (client_template. Request Packet Structure A request XML packet that deletes the client templates from Plesk database includes the del operation node: <packet version=”1. See the structure of this node in topic Filtering Client Templates (see page 95). .

0”> <client-template> <del> <filter> <name>base_template</name> </filter> </del> <del> <filter> <id>12</id> </filter> </del> </client-template> </packet> The following packet deletes all client templates available in Plesk database: <packet version=”1. use different filter nodes (and different del operations): <packet version=”1.4.2.2.0”> <client-template> <del> <filter> <name>base_template</name> <id>12</id> </filter> </del> </client-template> </packet> To fix this packet.2.0”> <client-template> <del> <filter/> </del> </client-template> </packet> . filter them either by id.4.Supported Operations 105 Request Samples To select client templates for deletion. The following packet is invalid as it uses both these nodes within one filter node: <packet version=”1.4. or by name.

4.2. Allowed values: ok | error. Can return an error message if the del operation fails. Data type: result_status (common.xsd). Returns the name of the deleted client template. Data type: unsignedInt. Data type: integer. The name node is optional. Data type: string. Specifies the execution status of the del operation. It wraps the result of the del operation for a single client template. Returns the identifier of the deleted client template. The errcode node is optional.0”> <client-template> <del> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>ok</status> <id>12</id> . Data type: string. It is missing if the packet fails before the validation starts. Returns an error code if the del operation fails.Supported Operations 106 Response Packet Structure The del node of the output XML packet is structured as follows:      The result node is required.  Response Samples The following packet returns a positive response after the del operation is performed: <packet version=”1. or if filtering was done by id. The id node is optional. or if filtering was done by name. The errtext node is optional. The status node is required.xsd). Data type: ClientTemplateOutputResulttype (client_template. It is missing if the packet fails before the validation starts.

0”> <client-template> <set> … </set> </client-template> . Refer to the section Filtering Client Templates (see page 95)for details. A negative response received from Plesk server can look as follows: <packet version=”1. while the deletion of the second template (filtered by id = 12) failed. Setting Client Template Settings The set operation is used to update client template with new settings.2. Filtering client templates can be performed either by its id. These settings are as follows:     Permissions Limits on use of Plesk resources by this domain IP pool setting Preferences You can update all settings of a domain template in bulk or specify particular settings. the second one was filtered by id (id = 12).0”> <client-template> <del> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. Request Packet Structure A request XML packet setting client template settings to Plesk database includes the set operation node: <packet version=”1. or by its name (both uniquely identify the client template).2.4.</errtext> <id>12</id> </result> </del> </client-template> </packet> The deletion of the first client template (filtered by name = base_template) was successful.Supported Operations </result> </del> </client-template> </packet> 107 The first template was filtered by name (name = base_template).4.

It sets Plesk Client preferences to the specified client templates. See the structure of this node in the IP Pool settings (see page 93) topic. Data type: ClienttemplateIpPoolType (client_template. The limits node is optional.xsd).xsd).4. The ip-pool node is optional. See the structure of this node in topic Filtering Client Templates (see page 95).0. Its graphical representation is as follows:  The filter node is required. one specified by id and another by name.2.xsd). Data type: clientLimits complex type (plesk_client.xsd).xsd). we use two different filter nodes (and two set operations): <packet version=”1. Data type: ClientTemplatePreferencesType (client_template. See the structure of this node in topic Preferences (see page 94). The permissions node is optional.2. See the structure of this node in the Limits (on page 35) topic.2.Supported Operations </packet> 108 The set node is presented by type ClientTemplateSetInputType (client_template. It serves to pick out client templates whose settings will be updated. See the structure of this node in the Permissions (on page 35) topic.121</ip-address> <ip-address>192. It sets a collection of limits that will be updated for the specified client templates.122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> </set> . Data type: clientPermissions (plesk_client. The preferences node is optional. It sets a collection of Plesk Client permissions to the specified client templates.xsd). It sets IP pool settings to the specified client templates.0. Data type: ClientTemplateFilterType (client_template.0”> <client-template> <set> <filter> <id>12</id> </filter> <ip-pool> <ip-address>192.     Request Samples The following set request packet updates IP pool settings for two client templates. Since the same filter node cannot use both id and name nodes.

2.2.121</ip-address> <ip-address>192.0”> <client-template> <set> <filter/> <ip-pool> <ip-address>192.Supported Operations <set> <filter> <name>base_template</name> </filter> <ip-pool> <ip-address>192.0.4.4.0.2.0. refer to the Client Template Settings (see page 89)section.0”> <client-template> <set> <filter> <id>12</id> </filter> </set> </client-template> </packet> To see sample packets setting up various client settings.122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> </set> </client-template> </packet> 109 The following packet updates all client templates available in Plesk with similar IP pool settings: <packet version=”1.2.121</ip-address> <ip-address>192.0. .2.122</ip-address> </ip-pool> </set> </client-template> </packet> The following packet will be considered invalid as it does not specify any settings: <packet version=”1.2.

Supported Operations 110 Response Packet Structure The set node of the output XML packet is structured as follows:      The result node is required.  .xsd). Returns the identifier of the updated client template. Data type: string.xsd). Data type: string. It is present if the set operation fails. The status node is required. Allowed values: ok | error. Returns an error code. It is missing if the packet fails before the validation starts. The errtext node is optional. It is present if the set operation fails. Returns the name of the updated client template. The id node is optional. It wraps the result of the set operation for a single client template. The name node is optional. Specifies the execution status of the set operation. or if filtering was done by name. or if filtering was done by id. It is missing if the packet fails before the validation starts. Data type: integer. The errcode node is optional. Returns an error message. Data type: unsignedInt. Data type: ClientTemplateOutputResulttype (client_template. Data type: result_status (common.

</errtext> <id>12</id> </result> </set> </client-template> </packet> The update of the first client template was successful. A negative set response packet looks as follows: <packet version=”1. while the update of the second template failed. .4.0”> <client-template> <set> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>ok</status> <id>12</id> </result> </set> </client-template> </packet> The first template was filtered by name base_template.Supported Operations 111 Response Samples A positive set response packet can look as follows: <packet version=”1.2.0”> <client-template> <set> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2.4. the second one was filtered by id 12.

Note: Use lower case for defining database servers types.4 for Unix and later API RPC version: 1. database_output. This difference is the following: Database type Database server Plesk for MS Windows MSSQL.0. Plesk 7.1 and higher Plesk user: Plesk Administrator Description Managing database servers differs in Plesk for Unix and Plesk for Windows.xsd Plesk version: Plesk for MS Windows 7. In other case. Only one default database server for each type of databases is available in Plesk.5. MySQL local remote.xsd. the request might be incorrectly processed by Plesk server.5. . basing on what database types are supported and if remote database servers are supported.Supported Operations 112 Managing Database Servers Operator: <db_server> XML Schema: database_input. MySQL Plesk for Unix PostgreSQL. local A default database server manages all databases of the corresponding type.3.

Only remote database servers can be specified. The default database server cannot be removed SET-DEFAULT (on page 127) sets a remote database server entry as default for its DBMS type.Supported Operations 113 Supported operations         ADD (on page 114) creates a database server entry of the specified type. Only remote database servers can be specified GET-DEFAULT (on page 131) retrieves ID of a default database server GET (on page 134) retrieves the database server info by the server ID GET-SUPPORTED-TYPES (on page 139) (getting the DBMS types supported on the server) GET-LOCAL (on page 142) retrieves ID of the local database server . specifying the login and password of the database administrator SET (on page 119) updates properties of the specified database server DEL (on page 123) removes a database server entry.

Data type: integer. Request Packet Structure A request XML packet adding a database server includes the add operation node: <packet version="1. It specifies the login name of administrator of the database server. It specifies the database server type. Before adding the database server.xsd).4. It specifies the port of the database server. The port node is required. Data type: string. The admin node is required. Data type: integer.2. Data type: string. The password node is optional. The type node is required. Data type: string. Allowed values: mysql | postgresql.Supported Operations 114 Adding Database Server The add operation is used to add a database server of the specified type to Plesk. It specifies the password of administrator of the database server. It specifies the IP address or name of the database server you want to add. make sure the database server type is supported by Plesk. MySQL and PostgreSQL types are available.   . Note: This operation is not supported in Plesk for Windows.0"> <db_server> <add-db> … </add-db> </db_server> </packet> The add node is presented by type DatabaseServerAddParam (plesk_db. For more information. refer to the Managing Database Server (on page 112) topic. and its graphical representation is as follows:    The host node is required.

4.0"> <db_server> <add> <host>71.. <packet version="1.2. It specifies if the database server manages the databases of a certain type (defined by type).1 Remarks You can add multiple database servers in a single packet.Supported Operations 115  The default node is optional.5.5. Data type: none.0"> <db_server> <add> <host>localhost</host> <port>3306</port> <type>mysql</type> <admin>senior</admin> <password>senior</password> </add> </db_server> </packet> This packet adds the default PostgreSQL database server.. <db_server> <add> … </add> .29</host> <port>3306</port> <type>postgresql</type> <admin>senior</admin> <password>senior</password> <default/> </add> </db_server> </packet> . <add> … </add> </db_server> Request Samples Adding a single database server This packet adds the local MySQL database server.2.44. Add as many add operations as the number of database servers you want to add. <packet version="1. Note: The add operation is presented by type DatabaseServerDescription in API RPC 1.4.3.

Data type: integer. Allowed values: ok | error. Data type: integer.Supported Operations 116 Adding multiple database servers This request packet adds local MySQL and PostgreSQL database servers. Data type: string. The id node is optional. If the add operation succeeds.0"> <db_server> <add> <host>localhost</host> <port>3306</port> <type>mysql</type> <admin>senior</admin> <password>senior</password> </add> <add> <host>localhost</host> <port>3307</port> <type>postgresql</type> <admin>senior</admin> <password>senior</password> </add> </db_server> </packet> Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. it returns the ID of the database server. Data type: string.2. <packet version="1. It returns the error message if the add operation fails. It specifies the execution status of the add operation. Data type: DatabaseServerResultType (database_output. It warps the response retrieved from the server. .4.xsd). The errtext node is optional. The status node is required. The errcode node is optional. Is returns the error code if the add operation fails.

<packet version="1.0"> <db_server> <add> <result> <status>error</status> <errcode>14008</errcode> <errtext>Wrong database server type</errtext> </result> </add> </db_server> </packet> If the local MySQL database server already exists in Plesk. the response looks as follows: <packet version="1.4.4.0"> <db_server> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed</errtext> .0"> <db_server> <add> <host>localhost</host> <port>3306</port> <type>mysql</type> <admin>senior</admin> <password>senior</password> </add> </db_server> </packet> A positive response from the server can look as follows: <packet version="1. the response looks as follows: <packet version="1.Supported Operations 117 Response Samples Adding a single database server This request packet adds the local MySQL database server.2.4.2.2.2.4.0"> <db_server> <add> <result> <status>ok</status> <id>15</id> </result> </add> </db_server> </packet> If the type of database server is not supported by Plesk.

2.0"> <db_server> <add> <host>localhost</host> <port>3306</port> <type>mysql</type> <admin>senior</admin> <password>senior</password> </add> <add> <host>localhost</host> <port>3307</port> <type>postgresql</type> <admin>senior</admin> <password>senior</password> </add> </db_server> </packet> If the MySQL server was successfully added.0"> <db_server> <add> <result> <status>ok</status> <id>15</id> </result> </add> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed</errtext> </result> </add> </db_server> </packet> .4.Supported Operations </result> </add> </db_server> </packet> 118 Adding multiple database servers This request packet adds local MySQL and PostgreSQL database servers.4. and PostgreSQL already exists in Plesk.2. <packet version="1. a response from the server can look as follows: <packet version="1.

It specifies the login name of administrator of the database server. It specifies the database server ID. <db_server> <set> . Request Packet Structure A request XML packet changing a database server preferences includes the set operation node: <packet version="1. It specifies the password of the administrator of the database server. Data type: integer. Add as many set operations as the number of database servers which preferences are to be changed. The port node is required. Data type: string. It specifies new port of the database server. Data type: integer.Supported Operations 119 Changing Database Server Preferences Use the set operation to change preferences of the database server specified by ID. Data type: integer. The admin node is required. Data type: string.4.xsd) and has the following graphical representation:      The host node is required. The id node is required.2. You can change preferences for multiple database servers in a single packet. Remarks You can change preferences for multiple database servers in a single packet. The password node is optional. It specifies new IP address or name of the database server.0"> <db_server> <set> … </set> </db_server> </packet> The set node is presented by type DatabaseServerDescriptionOpt (plesk_db.

23.4.0"> <db_server> <set> <host>11.. <packet version="1..122. <packet version="1.4.Supported Operations … </set> . <set> … </set> </db_server> 120 Request Samples Changing preferences of a database server This packet changes IP address of the database server specified by ID 1.2.0"> <db_server> <set> <host>localhost</host> <port>336</port> <admin>senior</admin> <password>senior</password> <id>7</id> </set> <set> <host>localhost</host> <port>337</port> <admin>senior</admin> <password>senior</password> <id>8</id> </set> </db_server> </packet> .14</host> <port>3306</port> <admin>senior</admin> <password>senior</password> <id>1</id> </set> </db_server> </packet> Changing preferences of multiple database servers This request packet changes ports of the MySQL and PostgreSQL database servers specified by ID 7 and ID 8.2.

Data type: string. <packet version="1.23.2. Response Samples Changing preferences of a database server This packet changes IP address of the database server specified by ID 1. The status node is required.0"> <db_server> . The errcode node is optional. it returns the ID of the database server. Data type: string. It specifies the execution status of the set operation.122.Supported Operations 121 Response Packet Structure The set node of the output XML packet is structured as follows:      The result node is required. If the set operation succeeds.2. Allowed values: ok | error. Data type: DatabaseServerResultType (database_output. Data type: integer.14</host> <port>3306</port> <admin>senior</admin> <password>senior</password> <id>1</id> </set> </db_server> </packet> The positive response from the server looks as follows: <packet version="1.4. The id node is optional.0"> <db_server> <set> <host>11. It warps the response retrieved from the server. Is returns the error code if the set operation fails.4. The errtext node is optional.xsd). It returns the error message if the set operation fails. Data type: integer.

2.0"> <db_server> <set> <host>localhost</host> <port>336</port> <admin>senior</admin> <password>senior</password> <id>7</id> </set> <set> <host>localhost</host> <port>337</port> <admin>senior</admin> <password>senior</password> <id>8</id> </set> </db_server> </packet> If preferences of the database server with ID 7 were successfully changed. and the database server with ID 8 was not found on the server. the response looks as follows: <packet version="1.4. <packet version="1. the positive response looks as follows: <packet version="1.4.4.2.Supported Operations <set> <result> <status>ok</status> <id>1</id> </result> </set> </db_server> </packet> 122 If the database server with ID 1 was not found on the server.0"> <db_server> <set> <result> <status>ok</status> .2.0"> <db_server> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist</errtext> </result> </set> </db_server> </packet> Changing preferences of multiple database servers This request packet changes ports of the MySQL and PostgreSQL database servers specified by ID 7 and ID 8.

Request Packet Structure A request XML packet detaching a database server from Plesk includes the del operation node: <packet version="1.Supported Operations <id>7</id> </result> </set> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist</errtext> </result> </set> </db_server> </packet> 123 Detaching Database Servers Use the del operation to detach database servers from Plesk. This option is available only for remote database servers. It specifies ID of the database server to be detached. You can detach multiple database servers in a single packet. Data type: integer.xsd). Default database servers cannot be removed using this operation. Data type: DatabaseServerFilterType (database_input. The id node is optional.2.0"> <db_server> <del> … </del> </db_server> </packet> The del node has the following graphical representation:   The filter node is required. .4. Specifies the filtering rule. Note: This operation is not supported by Plesk for MS Windows.

2.4.0"> <db_server> <del> <filter> <id>5</id> </filter> </del> </db_server> </packet> Unregistering multiple database servers This packet detaches the database servers specified by ID 5 and ID 7 from Plesk..2. <db_server> <del> <filter> <id>.4. <id>.Supported Operations 124 Remarks You can detach multiple database servers from Plesk in a single packet.</id> </filter> </del> </db_server> Request Samples Unregistering a single database server This packet detaches the database server specified by ID 5 from Plesk..0"> <db_server> <del> <filter/> </del> </db_server> </packet> ....4. Add as many id parameters as the number of database servers which are to be detached. <packet version="1.2. <packet version="1.0"> <db_server> <del> <filter> <id>5</id> <id>7</id> </filter> </del> </db_server> </packet> This packet detaches all remote database servers from Plesk..</id> . <packet version="1.

4. Response Samples Unregistering a single database server This packet detaches the database server specified by ID 5 from Plesk. Allowed values: ok | error. Data type: integer The errtext node is optional. Is returns the error code if the del operation fails. It returns the ID of the database server.2.4. Data type: integer. It warps the response retrieved from the server. Data type: string. <packet version="1. It returns the error message if the del operation fails. The errcode node is optional.2.0"> <db_server> <del> <result> <status>ok</status> <id>5</id> </result> . It specifies the execution status of the del operation. The id node is optional. Data type: DatabaseServerResultType (database_output. Data type: string. The status node is required.0"> <db_server> <del> <filter> <id>5</id> </filter> </del> </db_server> </packet> The positive response from the server is as follows: <packet version="1.xsd).Supported Operations 125 Response Packet Structure The del node of the output XML packet is structured as follows:      The result node is required.

2.0"> <db_server> <del> <filter/> </del> </db_server> </packet> Three database servers were detached from Plesk.</errtext> <id>5</id> </result> </del> </db_server> </packet> Unregistering multiple database servers This packet detaches all remote database servers from Plesk. <packet version="1.0"> <db_server> <del> .4.4. A possible response from the server looks as follows: <packet version="1.</errtext> <id>5</id> </result> </del> </db_server> </packet> If the database server with ID 5 was not found on the server.2. the response looks as follows: <packet version="1.2.Supported Operations </del> </db_server> </packet> 126 If the database server was a default database server.2. the response from the server looks as follows: <packet version="1.4.0"> <db_server> <del> <result> <status>error</status> <errcode>1023</errcode> <errtext>The default database server cannot be deleted.4.0"> <db_server> <del> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist.

Supported Operations <result> <status>ok</status> <id>5</id> </result> <result> <status>ok</status> <id>6</id> </result> <result> <status>ok</status> <id>7</id> </result> </del> </db_server> </packet> 127 Setting Default Database Server A default database server manages all databases of the corresponding type. . Only one default database server for each type of databases is available in Plesk. Request Packet Structure A request XML packet setting a default database server includes the set-default operation node: <packet version="1.2. It specifies the remote database server ID.0"> <db_server> <set-default> … </set-default> </db_server> </packet> The set-default node has the following graphical representation:  The id node is required. Data type: integer.4. Use the setdefault operation to set a database server as default. Note: this operation is available only in Plesk for Unix.

<packet version="1.4.0"> <db_server> <set-default> <type>1</type> </set-default> </db_server> </packet> Changing status of multiple database servers This packet sets the remote database server with ID 1 and local PostgreSQL database server as default for managing MySQL and PostgreSQL databases correspondingly. <db_server> <set-default> … </set-default> . Data type: string.2. Add as many setdefault operations as the number of database servers which status is to be changed.2.Supported Operations 128  The type node is required. <set-default> … </set-default> </db_server> Request Samples Changing status of a database server Upon supposition that the type of remote database server with ID 1 is mysql. Note: You can set only one default database server for each type of databases.4. the following packet sets the database server as default for managing MySQL databases. Remarks You can set multiple database servers as default in a single packet. If specified.0"> <db_server> <set-default> <id>1</id> </set-default> </db_server> </packet> The following packet sets the local database server as default for managing MySQL databases. Allowed values: mysql | postgresql. the local database server will be set as default for managing the databases of the specified type..4.0"> <db_server> <set-default> <id>1</id> . <packet version="1. <packet version="1.2..

it returns the ID of the database server. Data type: DatabaseServerResultType (database_output. Data type: integer. <packet version="1. Is returns the error code if the set-default operation fails.0"> <db_server> <set-default> <id>1</id> </set-default> </db_server> </packet> . the following request packet sets the database server as default for managing MySQL databases. The id node is optional. Data type: string.2. If the set-default operation succeeds and ID was specified in the request packet. Response Samples Changing status of a database server Upon supposition that the type of remote database server with ID 1 is mysql. It specifies the execution status of the set-default operation. The status node is required. The errcode node is optional. It returns the error message if the set-default operation fails. It warps the response retrieved from the server. Data type: integer. Data type: string.Supported Operations </set-default> <set-default> <type>postgresql</type> </set-default> </db_server> </packet> 129 Response Packet Structure The set-default node of the output XML packet is structured as follows:      The result node is required. Allowed values: ok | error.xsd). The errtext node is optional.4.

2.Supported Operations 130 The positive response from the server looks as follows: <packet version="1.0"> <db_server> <set-default> <result> <status>ok</status> <id>1</id> </result> </set-default> </db_server> </packet> If the database server with ID 1 was not found on the server.2.4.0"> <db_server> <set-default> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist. <packet version="1.4. the response looks as follows: <packet version="1.4.2.0"> <db_server> <set-default> <id>1</id> </set-default> <set-default> <type>postgresql</type> </set-default> </db_server> </packet> A response from the server can look as follows: <packet version="1.0"> <db_server> <set-default> <result> <status>ok</status> <id>1</id> </result> </set-default> <set-default> .4.</errtext> </result> </set-default> </db_server> </packet> Changing status of multiple database servers This request packet sets the remote database server with ID 1 and local PostgreSQL database server as default for managing MySQL and PostgreSQL databases correspondingly.2.

Allowed values: mysql | postgresql. If specified. <get-default> … </get-default> </db_server> . Request Packet Structure A request XML packet retrieving a default database server info includes the get-default operation node: <packet version="1. Add as many different type parameters as the number of default database servers info on which you want to retrieve.2. Data type: none. Data type: string. It specifies the filtering rule. Note: this operation is available only in Plesk for Unix. The type node is required..4. <db_server> <get-default> … </get-default> . Only one default database server for each type of databases is available in Plesk. Note: If the filter node is left blank (<filter/>). A single packet can retrieve the data of multiple default database servers. Use the getdefault operation to retrieve a default database server.Supported Operations <result> <status>ok</status> </result> </set-default> </db_server> </packet> 131 Retrieving Default Database Server Info A default database server manages all databases of the corresponding type. the local database server will be set as default for managing databases of the specified type. the operation will return default database servers for all types of databases..0"> <db_server> <get-default> … </get-default> </db_server> </packet> The get-default node has the following graphical representation:   The filter node is required.

Allowed values: ok | error.4.xsd).Supported Operations 132 Request Samples Retrieving status of a database server This packet retrieves default MySQL database server.0"> <db_server> <get-default> <filter> <type>mysql</type> <type>postgresql</type> </filter> </get-default> </packet> Response Packet Structure The get-default node of the output XML packet is structured as follows:   The result node is required.0"> <db_server> <get-default> <filter> <type>mysql</type> </filter> </get-default> </db_server> </packet> Retrieving status of multiple database servers This packet retrieves default MySQL and PostgreSQL database servers. <packet version="1. It warps the response retrieved from the server.2. The status node is required. <packet version="1.2. It specifies the execution status of the get-default operation. Data type: DatabaseServerResultType (database_output. .4. Data type: string.

Is returns the error code if the get-default operation fails. The errtext node is optional. Data type: string. Data type: integer.1 either id or type can be retrieved.4. Response Samples Retrieving status of a database server This request packet retrieves default MySQL database server info.Supported Operations 133     The errcode node is optional. Note: In the API RPC 1.4. <packet version="1. Data type: integer. The type node is optional. The id node is optional. It returns the error message if the get-default operation fails.2.0"> <db_server> <get-default> <filter> <type>mysql</type> </filter> </get-default> </db_server> </packet> A positive response from the server can look as follows: <packet version="1.2.0"> <db_server> <get-default> <result> <status>ok</status> <type>mysql</type> <id>2l</id> </result> </get-default> </db_server> </packet> If an unsupported type was specified in the request packet.2. Data type: string. It returns the type of the database server.4. it returns the ID of the database server.5. the response from the server looks as follows: <packet version="1. If the get-default operation succeeds.3.0"> <db_server> <get-default> <result> <status>error</status> <status>14006</status> <status>unsupported database type</status> </result> </get-default> </db_server> </packet> .

Supported Operations 134 Retrieving status of multiple database servers This packet retrieves default MySQL and PostgreSQL database servers info.2.4. Request Packet Structure A request XML packet retrieving a database server info includes the get operation node: <packet version="1.2.0"> <db_server> <get> … </get> </db_server> </packet> .4. You can retrieve preferences of multiple database servers in a single operation.0"> <db_server> <get-default> <filter> <type>mysql</type> <type>postgresql</type> </filter> </get-default> </packet> A possible response from the server looks as follows: <packet version="1.0"> <db_server> <get-default> <result> <status>ok</status> <type>mysql</type> <id>2l</id> </result> <result> <status>ok</status> <type>postgresql</type> <id>1l</id> </result> </get-default> </db_server> </packet> Retrieving Database Server Parameters Use get operation to retrieve parameters of the database server specified by ID.4.2. <packet version="1.

Data type: none..0"> <db_server> <get> <filter> <id>7</id> </filter> </get> </db_server> </packet> Retrieving multiple database servers This packet retrieves info on database servers specified by ID 7 and ID 9.2.2. Add as many different id parameters as the number of database servers info on which you want to retrieve. Data type: integer. It specifies the filtering rule..Supported Operations 135 The get node has the following graphical representation:  The filter node is required.4.4.  The id node is optional. <packet version="1. Note: If the filter node is left blank (<filter/>). the operation will return info on all database servers.0"> <db_server> <get> <filter> <id>7</id> <id>9</id> </filter> </get> </db_server> </packet> . <packet version="1. Remarks A single operation can retrieve the data of multiple database servers. <get> … </get> </db_server> Request Samples Retrieving a single database server This packet retrieves info on the database server specified by ID 7. Specifies the database server ID. <db_server> <get> … </get> .

Data type: extension of DatabaseServerResultType (database_output. Data type: string. It returns the error message if the get operation fails.xsd). Is returns the error code if the get operation fails. The errtext node is optional. Allowed values: ok | error. Data type: integer. It warps the response retrieved from the server. Data type: string. The status node is required. <packet version="1. It specifies the execution status of the get operation. .4. The errcode node is optional.2.Supported Operations 136 This packet retrieves info on all database servers available for the packet sender.0"> <db_server> <get> <filter/> </get> </db_server> </packet> Response Paket Structure The get node of the output XML packet is structured as follows:     The result node is required.

It specifies it is a default database server. The admin node is required. Data type: integer.    The local node is optional. Data type: none. It returns the type of the database server. Data type: integer. Allowed values: NO_ERROR | CONNECTION_FAILED | LOGIN_FAILED | PERMISSION_DENIED | OTHER_ERROR | CREDENTIALS_NOT_SET The db_num node is required. Data type: string. Data type: integer.xsd) If the get operation succeeded it returns the following data:       The host node is optional. The default node is optional. Data type: string. The port node is optional. It specifies the port of the database server.  The data node is optional. Specifies the IP address or name of the database server. The password node is optional. It specifies the password of the administrator of the database server. It specifies the login name of administrator of the database server. It specifies it is a local database server. The status node is required.Supported Operations 137  The id node is optional. Data type: none. Data type: string. Specifies the number of databases managed by the database server. Data type: string. Data type: integer. It returns the ID of the database server. The type node is required. . Specifies the status of connection to the database server. Data type: databaseServerDescription (plesk_db.

0"> <db_server> <get> <filter> .2. <packet version="1.2</host> <port>5432</port> <type>mysql</type> <admin></admin> <status>CREDENTIALS_NOT_SET</status> <db_num>0</db_num> </data> </result> </get> </db_server> </packet> If the database server was not found.4.0"> <db_server> <get> <filter> <id>7</id> </filter> </get> </db_server> </packet> A positive response from the server can look as follows: <db_server> <get> <result> <status>ok</status> <id>7</id> <data> <host>14.11.</errtext> </result> </get> </db_server> </packet> Retrieving multiple database servers This request packet retrieves info on the database servers specified by ID 2 and ID 92.Supported Operations 138 Response Samples Retrieving a single database server This packet retrieves the database server specified by ID 7 <packet version="1.4.2. the result is as follows: <db_server> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist.13.

4.0"> <db_server> <get> <result> <status>ok</status> <id>2</id> <data> <host>localhost</host> <port>5432</port> <type>postgresql</type> <admin></admin> <status>CREDENTIALS_NOT_SET</status> <db_num>0</db_num> <default></default> <local></local> </data> </result> <result> <status>ok</status> <id>92</id> <data> <host>some.host</host> <port>5432</port> <type>postgresql</type> <admin>admin</admin> <password>qweqwe</password> <status>OTHER_ERROR</status> <db_num>0</db_num> </data> </result> </get> </db_server> </packet> Retrieving Supported Types Of Databases A request XML packet retrieving types of database servers supported by Plesk includes the get-supported-types operation node: <packet version="1.2.2.4.0"> <dns> <get-supported-types/> </dns> </packet> The graphical representation of the get-supported-types node is as follows: .Supported Operations <id>2</id><id>92</id> </filter> </get> </db_server> </packet> 139 A possible response from the server can look as follows: <packet version="1.

. Data type: integer. The errtext node is optional. Data type: string. It returns the error message if the get-supported-types operation fails. It specifies the execution status of the get-supportedtypes operation.Supported Operations 140 Request sample This request packet retrieves the supported types of database servers. Allowed values: ok | error. Data type: string.4.0"> <db_server> <get-supported-types/> </db_server> </packet> Response Packet Structure The get-supported-types node of the output XML packet is structured as follows:      The result node is required. The status node is required. The errcode node is optional.2. The type node is optional. Data type: string. <packet version="1. Data type: DatabaseServerResultType (database_output.xsd). Is returns the error code if the get-supported-types operation fails. It warps the response retrieved from the server. It returns the types of supported database servers if the get-supported-types operation succeeds.

2. the result is as follows: <packet version="1.4.4. <packet version="1. the result is as follows: <packet version="1.2.2.4.0"> <db_server> <get-supported-types> <result> <status>ok</status> <type>mysql</type> <type>postgresql</type> </result> </get-supported-types> </db_server> </packet> .0"> <db_server> <get-supported-types> <result> <status>ok</status> <type>mssql</type> <type>mysql</type> </result> </get-supported-types> </db_server> </packet> If the request was sent to Plesk for Unix server.Supported Operations 141 Response Samples This request packet retrieves the supported types of database servers.0"> <db_server> <get-supported-types/> </db_server> </packet> If the request was sent to Plesk for MS Windows server.

Data type: none. You can retrieve preferences of multiple local database servers in a single packet. It specifies the type of local database servers. Note: If the filter node is left blank (<filter/>). Data type: string. Request Packet Structure A request XML packet retrieving a local database server info includes the get-local operation node: <packet version="1. The type node is optional. <get-local> … </get-local> </db_server> . A single operation can retrieve the data of multiple database servers..2. Note: this operation is available only in Plesk for Unix. Add as many different type parameters as the number of local database servers info on which you want to retrieve. <db_server> <get-local> … </get-local> .0"> <db_server> <get-local> … </get-local> </db_server> </packet> The get-local node has the following graphical representation:   The filter node is required. Allowed values: mssql | mysql | postgresql. the operation will return info on all local database servers.Supported Operations 142 Retrieving Local Database Servers Info Use the get-local operation to retrieve info on local database servers of the specified type.. It specifies the filtering rule.4.

2.xsd). Data type: string.0"> <db_server> <get-local> <filter/> </get-local> </db_server> </packet> Response Packet Structure  The get-local node of the output XML packet is structured as follows:    The result node is required. It specifies the execution status of the get-local operation. .4. It warps the response retrieved from the server.4.Supported Operations 143 Request Samples Retrieving info on a single database server This packet retrieves info on the local MySQL database server. The status node is required. <packet version="1. The errtext node is optional.0"> <db_server> <get-local> <filter> <type>mysql</type> </filter> </get-local> </db_server> </packet> Retrieving info on multiple database servers This packet retrieves info on all local database servers. Allowed values: ok | error.2. Data type: DatabaseServerResultType (database_output. <packet version="1. Data type: string. It returns the error message if the get-local operation fails.

5.4.2. Response Samples Retrieving info on a single database server This request packet retrieves info on the MySQL local database server.3. Data type: string.4. <packet version="1. Data type: integer. It returns the type of the database server.Supported Operations 144    The errcode node is optional. The id node is optional.0"> <db_server> <get-local> <result> <status>ok</status> <type>mysql</type> <id>1</id> </result> </get-local> </db_server> </packet> If the type of database server was invalid. Data type: integer. Note: In the API RPC 1.1 either id or type can be retrieved. the response from the server looks as follows: <packet version="1.0"> <db_server> <get-local> <result> <status>error</status> <errcode>14007</errcode> <errtext>Unsupported database type</errtext> <type>NewSQL</type> </result> </get-local> </db_server> </packet> .4. The type node is required.2. Is returns the error code if the get-local operation fails. It returns the ID of the database server.0"> <db_server> <get-local> <filter> <type>mysql</type> </filter> </get-local> </db_server> </packet> A positive response from the server can look as follows: <packet version="1.2.

4.0"> <db_server> <get-local> <result> <status>ok</status> <type>mysql</type> <id>1</id> </result> <result> <status>ok</status> <type>postgresql</type> <id>2</id> </result> </get-local> </db_server> </packet> .0"> <db_server> <get-local> <filter/> </get-local> </db_server> </packet> A possible response from the server can look as follows: <packet version="1.2.Supported Operations 145 Retrieving info on multiple database servers This request packet retrieves info on all local database servers.2. <packet version="1.4.

If a database is used by an application installed on the server. Supported operations     ADD-DB (see page 148) creates database entry of the specified type. Plesk Client Description Databases are used to store information in a tables format.xsd.4. it cannot be removed GET-DB (see page 170) retrieves database parameters by the ID.0 and higher Plesk user: Plesk Administrator.Supported Operations 146 Managing Databases Operator: <database> XML Schema: database_input. database_output.2. defining the domain that will use it DEL-DB (see page 154) removes database entry. One of the database user accounts (hereinafter referred to as database administrator) is used for administering the database via the Plesk graphical user interface (DB WebAdmin tool) or by connecting directly to the database server. domain name or domain ID SET-DEFAULT-USER (see page 163) specifies a database administrator . You can add users to a database (create their own accounts) to grant them access to this information.1 for Windows or Unix API RPC version: 1.xsd Plesk version: Plesk 8.

It also can match multiple databases. <filter> . </filter> A packet that retrieves information about databases on domain MyDomain. or domain name.Supported Operations 147       GET-DEFAULT-USER (see page 166) retrieves ID of administrator of a specified database ADD-DB-USER (see page 158) creates a database user account for a specified database DEL-DB-USER (see page 185) removes a database user account from a specified database GET-DB-USERS (see page 181) retrieves the list of users of a specified database SET-DB-USER (see page 177) changes credentials of a database user Remarks Before working with databases. be sure to call operation get_supported_types (on page 139) or the db_server (on page 112) operator in order to retrieve information on which database servers are configured on the specific Plesk server. specified either by ID. Filtering Issues Filtering is the way the request XML packet indicates the object to which the operation will be applied. The request XML filters data using a special <filter> section. A single filter can specify multiple database users. domain ID. If one of the following values was set as a filter rule parameter.4. Parameters.com can look as follows: <packet version="1. It returns the filtering rule parameter. it is returned in the filter-id node of the response packet: . A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node.com</domain-name> </filter> </get-db> </database> </packet> If an operation in a request packet (del-db-user. get-db. deldb) uses filters. nested in the filter node are called filtering rule.0"> <database> <get-db> <filter> <domain-name>MyDomain. get-default-user.. A single operation can use only parameters of the same type in the filtering rule.. all specified either by ID or by database ID. get-db-users.2. the filter-id node is nested in a response packet.

Supported Operations 148     database ID domain name domain ID database user ID It is done so to trace the request parameters in case of an error.0"> <database> <add-db> … </add-db> </database> </packet> The add-db node is presented by type DatabaseAddInputType (database_input.xsd). Data type: anySimple. the filter-id parameter will hold the ID of the object. You can create a database of one of the following types:   MySQL or MS SQL in Plesk for Windows MySQL or PostgreSQL in Plesk for Unix Request Packet Structure A request XML packet creating a database includes the add-db operation node: <packet version="1. and its graphical representation is as follows: . If the filter node is left blank (<filter/>).2.0.2. Note: The <filter-id> node appears in API RPC 1. Earlier versions of the protocol do not support this node. Creating Databases The add-db operation is used to create a database for a certain domain.4.4. You can specify the database settings only on creation. The blank filter means that all objects (like databases or database users) are matched by this rule.

you can define the ID of a database server by the type of databases. Remarks You can add multiple databases in a single packet. However. It specifies the database name.4. <packet version="1. Data type: integer. The packet is valid only in Plesk for Windows. Add as many add-db operations as the number of databases you want to add. The type node is required. Data type: string. MySQL and MS SQL are available in Plesk for Windows. The name node is required.Supported Operations 149    The domain-id node is required.0"> <database> <add-db> <domain-id>7</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> </database> </packet> . refer to Managing Database Servers (on page 112) section. Data type: integer. In Plesk for Windows.. <database> <add-db> … </add-db> . It specifies the ID of the database server on which the database will be created. It specifies the domain on which you want to create database.2. For info on database servers. Note: Use lower case for the database types. Data type: string.. In other case the request might be incorrectly processed by the server.  Note: The db-server-id node is required only when you use Plesk for Unix. MySQL and PostgreSQL types are available in Plesk for Unix. <add-db> … </add-db> </database> Request Samples Adding a database This packet adds MyBase MySQL database to the domain specified by ID 7. it is recommended to consider this parameter as required. It specifies the database type. This node is required only in Plesk for Unix. The db-server-id node is required. because in next versions of Plesk for Windows the algorithm of defining database servers can be changed.

0"> <database> <add-db> <domain-id>7</domain-id> <name>My2Base</name> <type>postgresql</type> <db-server-id>34</db-server-id> </add-db> </database> </packet> Adding multiple databases This packet adds two MySQL databases to the domain with ID 3.2.4. This example is valid only in Plesk for Unix.4. The packet is valid only in Plesk for Windows. <packet version="1.2.Supported Operations 150 This packet adds My2Base PostgreSQL database to the domain specified by ID 8. <packet version="1.0"> <database> <add-db> <domain-id>3</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> <add-db> <domain-id>3</domain-id> <name>My2Base</name> <type>mysql</type> </add-db> </database> </packet> .

Data type: string. it returns the ID of the database. Data type: integer.xsd) and structured as follows:      The result node is required. Response Samples Adding a database The request packet structured as follows: <packet version="1.xsd). Is returns the error code if the add-db operation fails.4. Allowed values: ok | error.2. Data type: string. The errtext node is optional. It specifies the execution status of the add-db operation.0"> <database> <add-db> <domain-id>7</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> </database> </packet> . It warps the response retrieved from the server. Data type: integer. The status node is required. The errcode node is optional. The id node is optional. It returns the error message if the add-db operation fails. If the add-db operation succeeds. Data type: resultType (common.Supported Operations 151 Response Packet Structure The add-db node of the output XML packet is presented by type DatabaseAddDBOutputType (database_output.

0"> <database> <add-db> <domain-id>3</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> . the response looks as follows: <packet version="1.Supported Operations 152 A positive response from the server can look as follows: <packet version="1. the response from the server looks as follows: <packet version="1.0"> <database> <result> <add-db> <status>ok</status> <id>14</id> </add-db> </result> </database> </packet> If MyBase already exists.2.4.4.2.2.2.4.4.0"> <database> <result> <add-db> <status>error</status> <errcode>1007</errcode> <errtext>Database already exists</errtext> </add-db> </result> </database> </packet> If the domain with ID 7 was not found.0"> <database> <result> <add-db> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </add-db> </result> </database> </packet> Adding multiple databases The request packet adding mySQL and PostgreSQL databases looks as follows: <packet version="1.

4.2.Supported Operations <add-db> <domain-id>3</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> </database> </packet> 153 A possible response from the server looks as follows: <packet version="1.0"> <database> <result> <add-db> <status>ok</status> <id>14</id> </add-db> </result> <result> <add-db> <status>error</status> <errcode>1007</errcode> <errtext>Database already exists</errtext> </add-db> </result> </database> </packet> .

4. Request Packet Structure A request XML packet deleting a database includes the del-db operation node: <packet version="1. It specifies the ID of the domain on which databases are removed. The domain-name node is optional. It specifies the name of the domain on which databases are removed. all databases are removed.xsd). Data type: string (Unicode). refer to the Filtering Issues (see page 147) section. and its graphical representation is as follows:  The filter node is required. Data type: integer.Supported Operations 154 Deleting Databases Use the del-db operation to remove one or more databases. Specifies the filtering rule. Data type: DatabaseFilterType. It specifies the ID of a database. The domain-id node is optional. For information on filters. Note: If the filter node is blank.0"> <database> <del-db> … </del-db> </database> </packet> The del-db node is presented by type DatabaseDelDbInputType (database_input.    The id node is optional. .2. Data type: integer.

2.2.4.4. <packet version="1.0"> <database> <del-db> <filter> <db-id>67</db-id> <db-id>16</db-id> </filter> </del-db> </database> </packet> .0"> <database> <del-db> <filter> <db-id>55</db-id> </filter> </del-db> </database> </packet> Deleting multiple databases This packet deletes all databases from all database servers available for the packet sender identified by credentials from HTTP header.2. <packet version="1.4.Supported Operations 155 Request Samples Deleting a database This packet deletes the database with ID 55 <packet version="1.0"> <database> <del-db> <filter/> </del-db> </database> </packet> This packet deletes databases with ID 67 and ID 16.

xsd) and structured as follows:       The result node is required. Data type: string. The filter-id node is optional. It warps the response retrieved from the server. Allowed values: ok | error. For more information. Data type: string. It specifies the execution status of the del-db operation. Data type: resultType (common.2. refer to the Filtering Issues (see page 147) section.0"> <database> <del-db> <filter> <db-id>55</db-id> .Supported Operations 156 Response Packet Structure The del-db node of the output XML packet is presented by type DatabaseDelDBOutputType (database_output. The errtext node is optional. It returns the error message if the del-db operation fails. If the add-db operation succeeds it returns the ID of the database. Response Samples Deleting database The request packet looks as follows: <packet version="1.4. Data type: integer. Is returns the error code if the del-db operation fails. The id node is optional. The errcode node is optional.xsd). The status node is required. lt returns the filtering rule parameter.

2.4.4.Supported Operations </filter> </del-db> </database> </packet> 157 Positive response from the server can look as follows: <packet version="1.2.2.4.0"> <database> <del-db> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database does not exist</errtext> <filter-id>55</filter-id> </result> </del-db> </database> </packet> Deleting multiple databases The request packet looks as follows: <packet version="1.0"> <database> <del-db> <result> <status>ok</status> <filter-id>55</filter-id> <id>55</id> </result> </del-db> </database> </packet> Negative response from the server can look as follows: <packet version="1.0"> <database> <del-db> <filter/> </del-db> <del-db> <filter> <db-id>15</db-id> </filter> </del-db> </database> </packet> .

Specify the user login name.4. because the database with ID 15 is already deleted. Request Packet Structure A request XML packet creating database user account for the database includes the add-db-user operation node: <packet version="1.0"> <database> <add-db-user> … </add-db-user> </database> </packet> .2. password and the ID of the database where you want to create new user account.Supported Operations 158 A response from the server can look as follows: <packet version="1.4. Creating Database Users You can create new user accounts for a certain database. You can add multiple users to the database in a single packet.2.0"> <database> <del-db> <result> <status>ok</status> <filter-id>15</filter-id> <id>15</id> </result> <result> <status>ok</status> <filter-id>43</filter-id> <id>43</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database does not exist</errtext> <filter-id>15</filter-id> </result> </del-db> </database> </packet> The last result shows error.

Allowed values: plain | crypt. It specifies the password of the database user. <add-default-user> … </add-default-user> </database> Request Samples Creating a database user This packet creates user MyUser on the database with ID 55.xsd).2. The login node is required.Supported Operations 159 The add-db-user node is presented by type DatabaseAddDBUserInputType (database_input. <database> <add-default-user> … </add-default-user> .0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> </database> </packet> .You can also add multiple users to multiple databases in a single packet. Specifies if it is plain or encrypted password.. Data type: integer. Data type: string (length should be more than five digits). Remarks You can add multiple users to database in a single packet. It specifies ID of the database where a new user will be created. Data type: string. Add as many add-db-user operations to the packet as the number of different users you want to create. The password-type node is optional.4. <packet version="1.. It specifies login name of the database user. and its graphical representation is as follows:     The db-id node is required. The password node is required. Data type:string.

4.2.0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> <add-db-user> <db-id>55</db-id> <login>My2User</login> <password>123456</password> </add-db-user> </database> </packet> This packet creates users MyUser and My2User on the databases with ID 55 and ID 57.4.Supported Operations 160 Creating multiple database users This packet creates users MyUser and My2User on the database with ID 55. <packet version="1.2.0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> <add-db-user> <db-id>55</db-id> <login>My2User</login> <password>123456</password> </add-db-user> <add-db-user> <db-id>57</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> <add-db-user> <db-id>57</db-id> <login>My2User</login> <password>123456</password> </add-db-user> </database> </packet> . <packet version="1.

Data type: resultType (common. It warps the response retrieved from the server. Is returns the error code if the add-db--user operation fails. It specifies the database user ID.0"> <database> <add-db-user> <result> <status>ok</status> .4.xsd).Supported Operations 161 Response Packet Structure The add-db--user node of the output XML packet is presented by type DatabaseAddDBUserOutputType (database_output. The status node is required.xsd) and structured as follows:      The result node is required. Data type: integer. Allowed values: ok | error. Response Samples Creating a database user This request packet creates user MyUser on the database with ID 55. It returns the error message if the add-db--user operation fails. The errtext node is optional. It specifies the execution status of the add-db--user operation.0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> </database> </packet> A positive response from the server can look as follows: <packet version="1. Data type: string. The id node is required.2. Data type: integer.2. <packet version="1. The errcode node is optional. Data type: string.4.

2.2.4.0"> <database> <add-db-user> <result> <status>error</status> <errcode>1007</errcode> <errtext>User already exists</errtext> </result> </add-db-user> </database> </packet> Creating multiple database users This packet creates user MyUser on the databases with ID 55 and ID 57. the response looks as follows: <packet version="1. <packet version="1.0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> <add-db-user> <db-id>55</db-id> <login>My2User</login> <password>123456</password> </add-db-user> </database> </packet> .0"> <database> <add-db-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </add-db-user> </database> </packet> If the login name is already used by another user account on this database.4. the response looks as follows: <packet version="1.Supported Operations <id>132</id> </result> </add-db-user> </database> </packet> 162 If the database was not found.4.2.

4. There can be only one administrator's account for each database. If you create a database. the first user created in the database will be appointed to act as a database administrator.0"> <database> <add-db-user> <result> <status>ok</status> <id>132</id> </result> </add-db-user> <add-db-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </add-db-user> </database> </packet> Assigning Database Administrator Database administrator is a database user who can manage the database either via Plesk graphical user interface (DB WebAdmin tool) or by connecting directly to the database server.2. and its graphical representation is as follows: . the response from the server looks as follows: <packet version="1.0"> <database> <set-default-user> … </set-default-user> </database> </packet> The set-default-user node is presented by type DatabaseSetDBInputType (database_input. Request Packet Structure A request XML packet assigning a database administrator includes the set-default-user operation node: <packet version="1.Supported Operations 163 If the first operation succeeded and the database with ID=57 was not found. You can set any database user account as the database administrator's account.xsd).2.4.

. Specifies the database that will be managed by database administrator. The default-user-id node is optional. Data type: integer.0"> <database> <set-default-user> <db-id>132</db-id> <default-user-id>35</default-user-id> </set-default-user> </database> </packet> Response Packet Structure The set-default-user node of the output XML packet is presented by type DatabaseSetDBOutputType (database_output.2. Data type: integer. <database> <set-default-user> … </set-default-user> . <packet version="1.4. Specifying the database administrator for managing a database. Add as many set-default-user operations as the number of database administrator's accounts you want to set. <set-default-user> … </set-default-user> </database> Request Samples Assigning a Database Administrator This packet sets the user with ID 35 as administrator for the database with ID 132. Remarks You can set database administrators for multiple databases using a single packet..Supported Operations 164   The db-id node is required.xsd) and structured as follows: .

Data type: integer.2. The errcode node is optional. Data type: resultType (common.4.4. Is returns the error code if the set-default-user operation fails.4. Data type: string.0"> <database> <set-default-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </set-default-user> </database> </packet> . <packet version="1. It warps the response retrieved from the server. <packet version="1. <packet version="1. Data type: string.Supported Operations 165     The result node is required. Response Samples Assigning a Database Administrator This request packet sets the user with ID 35 as administrator for the database with ID 132. It specifies the execution status of the set-default-user operation.0"> <database> <set-default-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </set-default-user> </database> </packet>  The user with ID=35 was not found in the database with ID=132. The errtext node is optional. The status node is required.0"> <database> <set-default-user> <db-id>132</db-id> <default-user-id>35</default-user-id> </set-default-user> </database> </packet> The negative response from the server looks as one of the follows:  The database with ID=132 was not found on the server.xsd). It returns the error message if the set-default-user operation fails.2.2. Allowed values: ok | error.

0"> <database> <get-default-user> … </get-default-user> </database> </packet> The get-default-user node is presented by type DatabaseGetDBInputType (database_input. . and its graphical representation is as follows:   The filter node is required. There can be only one administrator's account for each database. Data type: integer. the first user created in the database will be set as its administrator.Supported Operations 166 The positive response received from the server looks as follows: <packet version="1.2. either via Plesk graphical user interface (DB WebAdmin tool) or by connecting directly to the database server.2.0"> <database> <set-default-user> <result> <status>ok</status> </result> </set-default-user> </database> </packet> Retrieving Database Administrator Info Administering database is available when using database administrator credentials. Request Packet Structure A request XML packet retrieving database administrator info includes the get-default-user operation node: <packet version="1. refer to the Filtering Issues (see page 147) section. It specifies ID of a database. For more information. Data type: DatabaseDefaultUserFilterType. If you create a new database. The db-id node is optional.4. You can set any database user account as the database administrator's account.4. Specifies the filtering rule.xsd).

0"> <database> <get-default-user> <filter/> </get-default-user> </database> </packet> .2.0"> <database> <get-default-user> <filter> <db-id>35</db-id> </filter> </get-default-user> </database> </packet> Retrieving info on multiple Database Administrators This packet retrieves administrators for all databases on all database servers available for the packet sender. <database> <get-default-user> … </get-default-user> .. <get-default-user> … </get-default-user> </database> Request Samples Retrieving info on a Database Administrator This packet retrieves info on administrator for the database with ID 35. <packet version="1.4.2.. Add the get-default-user operation for each database to the request packet.4.Supported Operations 167 Remarks You can retrieve ID's of multiple database administrators using a single packet. <packet version="1.

Response Samples Retrieving info on a Database Administrator This packet retrieves a Database Administrator of the database with ID 35. The errcode node is optional. It specifies the database administrator ID. The status node is required. Data type: integer. Data type: integer. Data type: string. refer to the Filtering Issues (see page 147) section. The filter-id node is optional. It returns the error message if the get-default-user operation fails.Supported Operations 168 Response Packet Structure The get-default-user node of the output XML packet is presented by type DatabaseSetDBOutputType (database_output. <packet version="1. Data type: resultType (common. Is returns the error code if the get-default-user operation fails. For more information.0"> <database> <get-default-user> <filter> <db-id>35</db-id> . The errtext node is optional. The id node is required. Allowed values: ok | error.xsd).4.xsd) and structured as follows:       The result node is required. It specifies the execution status of the get-default-user operation. lt returns the filtering rule parameter.2. Data type: string. It warps the response retrieved from the server.

2.Supported Operations </filter> </get-default-user> </database> </packet> 169 A positive response from the server can look as follows: <packet version="1.4.0"> <database> <get-default-user> <result> <status>ok</status> <filter-id>15</filter-id> .2.0"> <database> <get-default-user> <filter/> </get-default-user> </database> </packet> A response packet from the server can look as follows: <packet version="1.2.4.0"> <database> <get-default-user> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database not found</errtext> </result> </get-default-user> </database> </packet> Retrieving info on multiple Database Administrators This packet retrieves Database Administrators of all databases on all database servers available for the packet sender.4.2.0"> <database> <get-default-user> <result> <status>ok</status> <filter-id>35</filter-id> <id>77</id> </result> </get-default-user> </database> </packet> A negative response got from the server can look as follows: <packet version="1.4. <packet version="1.

4.0"> <database> <get-db> … </get-db> </database> </packet> .2.Supported Operations <id>77</id> </result> <result> <status>ok</status> <filter-id>35</filter-id> <id>17</id> </result> <result> <status>ok</status> <filter-id>24</filter-id> <id>72</id> </result> </get-default-user> </database> </packet> 170 Retrieving Information About Databases Use the get-db operation to retrieve the following database preferences:      name type domain ID database server ID Database Administrator ID Request Packet Structure A request XML packet retrieving database parameters includes the get-db operation node: <packet version="1.

Specifies the filtering rule. It specifies the name of the domain on which a database is added. domain-id. The domain-name node is optional. </filter> </get-db> </database> Request Samples Retrieving database parameters This packet retrieves information about a database with ID 5. Data type: string (Unicode). Data type: DatabaseFilterType (database_input. or by domain-name).xsd). The domain-id node is optional. and its graphical representation is as follows:  The filter node is required. Data type: integer.xsd). It specifies the ID of a database.. Data type: integer. Add as many get-db operations as the number of different filtering rules (you can either filter by ID. <database> <get-db> <filter> . The id node is optional. <packet version="1.Supported Operations 171 The get-db node is presented by type DatabaseGetDBInputType (database_input..2. For more information.4. refer to the Filtering Issues (see page 147) section. It specifies the ID of the domain on which a database is added.0"> <database> <get-db> <filter> <id>5</id> .    Remarks You can retrieve information on multiple databases using a single packet.

4.0"> <database> <get-db> <filter> <domain-name>MyDomain.com domains.2.Supported Operations </filter> </get-db> </database> </packet> 172 Retrieving parameters of multiple databases This packet retrieves information on all databases added to domain MyDomain.com.com</domain-name> </filter> </get-db> </database> </packet> This packet is wrong because it uses both domain-name and domain-id in one filter node.com</domain-name> </filter> </get-db> <get-db> <filter> <domain-id>45</domain-id> </filter> </get-db> </database> </packet> This packet retrieves information about all databases added to the MyDomain.0"> <database> <get-db> <filter> <domain-name>MyDomain. <packet version="1. <packet version="1.4.com and My2Domain.0"> <database> <get-db> <filter> <domain-name>MyDomain.2. <packet version="1.com</domain-name> <domain-id>117</domain-id> </filter> </get-db> </database> </packet> .2.4. and to the domain specified by ID 45.com</domain-name> <domain-name>My2Domain.

The name node is required. The type node is required. Is returns the error code if the get-db operation fails. Data type: string. It returns the error message if the get-db operation fails. Data type: string. The status node is required. Allowed values: ok | error. MySQL and MS SQL are available in Plesk for Windows. The errcode node is optional. Allowed values: mssqsl | mysql | postgresql. lt returns the filtering rule parameter. The filter-id node is optional. The errtext node is optional.xsd). For more information. Data type: integer.Supported Operations 173 Response Packet Structure The del-db node of the output XML packet is presented by type DatabaseDelDBOutputType (database_output.xsd) and structured as follows:        The result node is required. It warps the response retrieved from the server. refer to the Filtering Issues (see page 147) section. Data type: string. Data type: string. It specifies the database type. It specifies the execution status of the get-db operation. MySQL and PostgreSQL types are available in Plesk for Unix. . Data type: resultType (common. It specifies the database name.

Data type: integer.0"> <database> <get-db> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database does not exist</errtext> . <packet version="1.Supported Operations 174   The domain-id node is optional.4. It specifies the ID of the domain on which a database is added. The db-server-id node is optional. Data type: integer. It specifies the ID of the database server on which a database will be created. It is required if the get-db operation succeeds. It is required if the get-db operation succeeds.2.2.4. It specifies ID of the database administrator. The default-user-id node is optional It is required if the get-db operation succeeds.0"> <database> <get-db> <result> <status>ok</status> <filter-id>5</filter-id> <id>5</id> <name>MyDatabase</name> <type>mysql</type> <domain-id>77</domain-id> <db-server-id>17</db-server-id> <default-user-id>10</default-user-id> </result> </get-db> </database> </packet> Negative response from the server looks as follows: <packet version="1. This node is required only in Plesk for Unix.0"> <database> <get-db> <filter> <id>5</id> </filter> </get-db> </database> </packet> Positive response from the server looks as follows: <packet version="1.  Response Samples Retrieving database parameters This packet retrieves information on a database with ID 5.4.2. Data type: integer.

com</filter-id> </result> <result> .4.com.2.com</filter-id> <id>5</id> <name>MyDatabase</name> <type>mysql</type> <domain-id>77</domain-id> <db-server-id>17</db-server-id> <default-user-id>10</default-user-id> </result> </get-db> <get-db> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>My2Domain. My2Domain.0"> <database> <get-db> <filter> <domain-name>MyDomain.0"> <database> <get-db> <result> <status>ok</status> <filter-id>MyDomain.2. the domain with ID 45 and domain My2domain.com were not found. The response from the server in this case looks as follows: <packet version="1.com</domain-name> </filter> </get-db> <get-db> <filter> <domain-id>45</domain-id> </filter> </get-db> </database> </packet> One database was found on domain MyDomain.com domains and to the domain specified by ID 45.com. <packet version="1.com</domain-name> <domain-name>My2Domain.Supported Operations <filter-id>5</filter-id> </result> </get-db> </database> </packet> 175 Retrieving parameters of multiple databases This packet retrieves information on all databases added to the MyDomain.4.

a server response is the following: <packet version="1.com</filter-id> <id>8</id> <name>My2base</name> <type>mysql</type> <domain-id>77</domain-id> <db-server-id>17</db-server-id> <default-user-id>10</default-user-id> </result> </get-db> </database> </packet> .com</filter-id> <id>5</id> <name>MyDatabase</name> <type>mysql</type> <domain-id>77</domain-id> <db-server-id>17</db-server-id> <default-user-id>10</default-user-id> </result> </get-db> <get-db> <result> <status>ok</status> <filter-id>MyDomain.2.4.0"> <database> <get-db> <result> <status>ok</status> <filter-id>MyDomain.Supported Operations <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>45</filter-id> </result> </get-db> </database> </packet> 176 When two or more databases are found on the specified domain.

2. It specifies ID of the database user whose preferences are to be changed. Add as many set-db-user operations to the packet as the number of different users you want to update. Data type: string. specify the user's ID.2. Data type:string. Data type: string (length should be more than five digits). </set-db-user> .Supported Operations 177 Changing Database User Credentials You can change credentials of certain database user. Allowed values: plain | crypt. The password-type node is optional.. and its graphical representation is as follows:     The id node is required. It specifies new login name for the database user.4.. Specifies if it is a plain or encrypted password. You can update preferences for multiple users in a single set-db-user packet.4. Data type: integer. To change login or password of a database user.0"> <database> <set-db-user> .0"> <database> <set-db-user> … </set-db-user> </database> </packet> The set-db-user node is presented by type DatabaseSetDBUserInputType (database_input. The login node is optional. It specifies new password for the database user. Request Packet Structure A request XML packet retrieving users from the database includes the set-db-users operation node: <packet version="1. <packet version="1. Remarks You can change credentials for multiple database users in a single packet. The password node is required.xsd).

<packet version="1. </set-db-user> </database> </packet> 178 Request Samples Changing database user credentials This request packet sets new password for the database user identified by ID 61.0"> <database> <set-db-user> <id>6</id> <password>a1b2c3d</password> </set-db-user> <set-db-user> <id>7</id> ..4.4.2.2. <packet version="1..4.0"> <database> <set-db-user> <id>61</id> <password>a1b2c3d</password> </set-db-user> </database> </packet> This request packet sets new password and login name for the database user identified by ID 67..Supported Operations .. <set-db-user> .2. <packet version="1.0"> <database> <set-db-user> <id>61</id> <login>MyNewName</login> <password>a1b2c3d</password> </set-db-user> </database> </packet> Changing credentials of multiple database users This request packet sets new passwords for two database users (identified by ID 6 and ID 7).

Is returns the error code if the set-db--user operation fails. The errcode node is optional.0"> <database> <set-db-user> <id>61</id> <password>a1b2c3d</password> . The status node is required.xsd). If the set-db-users operation succeeds. <packet version="1. It warps the response retrieved from the server. Response Samples Changing database user credentials This request packet sets new password for the database user identified by ID 61. Data type: integer.2.Supported Operations <password>b1c2d3e</password> </set-db-user> </database> </packet> 179 Response Packet Structure The set-db-user node of the output XML packet is presented by type DatabaseSetDBUserOutputType (database_output. The id node is optional. The errtext node is optional.4. Data type: string. Data type: string. It specifies the execution status of the set-db-user operation. it specifies the id of the updated database user. Data type: string. Data type: resultFilterType (common. Allowed values: ok | error. It returns the error message if the set-db--user operation fails.xsd) and structured as follows:      The result node is required.

Supported Operations 180 </set-db-user> </database> </packet> A positive response from the server can look as follows: <packet version="1.2.4.0"> <database> <set-db-user> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database user does not exist</errtext> </result> </set-db-user> </database> </packet> Changing credentials for multiple database users This request packet sets new login names and passwords for the database users identified by ID=61 and ID=68.4.4.0"> <database> <set-db-user> <id>61</id> <login>testUser</login> <password>a1b2c3d</password> </set-db-user> <set-db-user> <id>68</id> <login>secondUser</login> <password>abc2c3d</password> </set-db-user> </database> </packet> .2. <packet version="1.2.0"> <database> <set-db-user> <result> <status>ok</status> <id>61</id> </result> </set-db-user> </database> </packet> A negative response from the server can look as follows: <packet version="1.

Data type: DatabaseUserFilterType. and the user with ID 68 was successfully updated. For more information.2. Specifies the filtering rule. specify the ID of the database.4.4.Supported Operations 181 If the user with ID 61 was not found on server.xsd). . To retrieve information on database users. the response packet looks as the follows: <packet version="1. and its graphical representation is as follows:  The filter node is required.0"> <database> <get-db-users> … </get-db-users> </database> </packet> The get-db-user node is presented by type DatabaseGetDBInputType (database_input. Request Packet Structure A request XML packet retrieving users info from the database includes the get-db-users operation node: <packet version="1.2.0"> <database> <set-db-user> <result> <status>ok</status> <id>61</id> </result> </set-db-user> <set-db-user> <result> <status>ok</status> <id>68</id> </result> </set-db-user> </database> </packet> Retrieving Database Users Info You can retrieve information on users of the certain database. You can retrieve information about users of multiple databases in a single get-db-users operation. refer to the Filtering Issues (see page 147) section.

4.2. Add as many db-id parameters to the filtering rule as the number of different databases you want to scan. <packet version="1. the get-db-user node is presented by type DatabaseGetDBUsersInputType (database_input.. Remarks Note: In API RPC v. Data type: integer.2.xsd).0 and later versions. Request Samples Retrieving information about users of database This request packet retrieves information on all users of the database with ID 79. <database> <get-db-users> <filter> <db-id>..1.</db-id> </filter> </get-db-users> </database> Note: Use the <filter/> parameter to retrieve information about all users from all databases available for the user identified by credentials from HTTP header. You can retrieve information from multiple databases using a single get-db-users operation.0"> <database> <get-db-users> <filter/> </get-db-users> </database> </packet> .5.Supported Operations 182  The db-id node is optional..0"> <database> <get-db-users> <filter> <db-id>79</db-id> </filter> </get-db-users> </database> </packet> Retrieving information about all users of all databases This request packet retrieves information on all users of all available databases.</db-id> … <db-id>. <packet version="1.4.. It specifies the ID of the database from which information about users is retrieved.1.

The errcode node is optional. The db-id node is optional. The filter-id node is optional. Allowed values: ok | error. Data type: integer. The status node is required. If the get-db-users operation succeeds. lt returns the filtering rule parameter. It warps the response retrieved from the server. Data type: string. The login node is optional.Supported Operations 183 Response Packet Structure The get-db-users node of the output XML packet is presented by type DatabaseGetDBUsersOutputType (database_output. If the get-db-users operation succeeds.xsd) and structured as follows:         The result node is required. Is returns the error code if the get-db--users operation fails. it specifies ID of the database where the user is located. Data type: resultFilterType (common. refer to the Filtering Issues (see page 147) section. Data type: string. It specifies the execution status of the get-db-users operation. If the get-db-users operation succeeds. Data type: integer. It returns the error message if the get-db--user operation fails. it specifies login name of the database user. it specifies the database user ID. Data type: string. Data type: integer. The errtext node is optional.xsd). . The id node is optional. For more information.

the response from the server looks as follows: <packet version="1. <packet version="1.0"> <database> <get-db-users> <result> <status>ok</status> <filter-id>79</filter-id> <id>15</id> <login>UserOne</login> <db-id>79</db-id> </result> <result> <status>ok</status> <filter-id>79</filter-id> <id>15</id> <login>UserTwo</login> <db-id>79</db-id> </result> </get-db-users> </database> </packet> If the database was not found.4.4.2.2.2.Supported Operations 184 Response Samples Retrieving information about users of database This request packet retrieves information about all users of the database with ID=79.0"> <database> <get-db-users> <result> <status>ok</status> <errcode>1015<errcode> <errtext>Database does not exist</errtext> <filter-id>79</filter-id> </result> <get-db-users> <database> </packet> . the response from the server looks as follows: <packet version="1.0"> <database> <get-db-users> <filter> <db-id>79</db-id> </filter> </get-db-users> </database> </packet> If two users (UserOne and UserTwo) were found in the database.4.

Supported Operations 185 Deleting Database Users You can remove user accounts from a certain database. It specifies the ID of the database where a new user will be created. <del-db-user> … . The id node is optional. The db-id node is optional. refer to the Filtering Issues (see page 147) section.. Specify the user login name and ID of the database where you want to remove the user.4. Specifies the filtering rule.0"> <database> <del-db-user> … </del-db-user> </database> </packet> The del-db-user node is presented by type DatabaseDelDBUserInputType (database_input. Data type: DatabaseUserFilterType. <database> <del-db-user> … </del-db-user> .2. Data type: integer. and its graphical representation is as follows:    The filter node is required. It specifies the ID of the user you want to delete. You can remove all users from all databases in a single del-db-user operation. Data type: integer. Remarks You can delete multiple users from the database using a single packet.xsd).. For more information. Add as many del-db-user operations as the number of different users you want to delete from the database. Request Packet Structure A request XML packet deleting a user from the database includes the del-db-user operation node: <packet version="1.

0"> <database> <del-db-user> <filter/> </del-db-user> </database> </packet> . Note: Use the <filter/> parameter if you want to delete all users from all databases available for the sender.0"> <database> <del-db-user> <filter> <db-id>45</db-id> </filter> </del-db-user> </database> </packet> This packet removes all users from all databases available for the user identified by credentials from HTTP header.4. <packet version="1.Supported Operations </add-db-user> </database> 186 You can also delete all users from the different databases using this construction.2.2.4.4.0"> <database> <del-db-user> <filter> <id>55</id> </filter> </del-db-user> </database> </packet> Deleting multiple database users This packet removes all users from the database with ID 45. <packet version="1. <packet version="1.2. Request Samples Deleting a database user This packet removes the user with ID 55 from a database.

0"> <database> <del-db-user> <filter> <id>55</id> . it specifies the database user ID. If the del-db-user operation succeeds. Data type: string.Supported Operations 187 Response Packet Structure The del-db-user node of the output XML packet is presented by type DatabaseDelDBUserOutputType (database_output.xsd) and structured as follows:       The result node is required. For more information. The filter-id node is optional. Allowed values: ok | error. Data type: resultFilterType (common. The id node is required. It warps the response retrieved from the server. Is returns the error code if the del-db--user operation fails. Data type: integer.xsd). Response Samples Deleting database user This request packet removes the user with ID 55 from the database with ID 2. lt returns the filtering rule parameter. The status node is required.2. Data type: integer. The errcode node is optional. refer to the Filtering Issues (see page 147) section.4. <packet version="1. It returns the error message if the del-db--user operation fails. The errtext node is optional. Data type: string. It specifies the execution status of the del-db-user operation.

0"> <database> <del-db-user> <db-id>45</db-id> </del-db-user> </database> </packet> Two users (ID 7 and ID 8) were removed from the database.2.0"> <database> <del-db-user> <result> <status>ok</status> <errcode>1013<errcode> <errtext>User does not exist</errtext> <filter-id>55</filter-id> </result> </del-db-user> </database> </packet> Deleting multiple database users This request packet removes all users from the database with ID 45.4.4.2. <packet version="1.0"> <database> <del-db-user> <result> <status>ok</status> <filter-id>55</filter-id> <id>55</id> </result> </del-db-user> </database> </packet> A negative response from the server can look as follows: <packet version="1.Supported Operations </filter> </del-db-user> </database> </packet> 188 A positive response from the server can look as follows: <packet version="1. The response from the server looks as follows: <packet version="1.0"> <database> <del-db-user> <result> .4.4.2.2.

0"> <database> <del-db-user> <result> <status>ok</status> <errcode>1015<errcode> <errtext>Database does not exist</errtext> <filter-id>45</filter-id> </result> </del-db-user> </database> </packet> .4.Supported Operations <status>ok</status> <filter-id>45</filter-id> <id>7</id> </result> <result> <status>ok</status> <filter-id>45</filter-id> <id>8</id> </result> </del-db-user> </database> </packet> 189 A negative response can look as follows: <packet version="1.2.

0 and later API RPC version: 1. additional administrator accounts. and clients. domain administrators. The default preset is a preset that will be applied to desktop of these users (except Plesk Administrator) on loading of Plesk control panel.5. domain administrators. Desktop presets can be of one of the following types:    presets for administrators presets for domain administrators presets for clients The view of interface can be predefined for Plesk Administrator. The presets are the files containing configuration of desktop elements. and customers PRESET-LIST (see page 198) retrieves info on presets specified by ID ADD-PRESET (see page 202) overwrites the file of presets .0.Supported Operations 190 Managing Desktop Presets Operator: <desktop> XML Schema: desktop.0 and higher Plesk user: Plesk Administrator Description The desktop operator is used to modify desktop items of Plesk control panel by applying different desktop presets.xsd Plesk version: Plesk 7. Supported operations     SET-ADMIN (see page 191) changes Plesk Administrator preset SET-DEFAULT-PRESET (see page 194) chooses the default preset for additional administrator accounts.6 Win | Unix 8.4. You can have several presets for your interface and switch between them when needed.

You can specify only presets for administrators. enabling them to perform a virtually limitless variety of administrative tasks. </set-admin> </desktop> </packet> The set-admin node is presented by the SetAdminInputCommandType type (desktop. It specifies the name of the preset.Supported Operations 191  REMOVE-PRESET (see page 209) removes presets specified by name and type. and its graphical representation is as follows:  The desktop-preset node is required. or ID Remarks Additional administrator accounts are created by Plesk Administrator for technical support engineers. .0"> <desktop> <set-admin> . All actions performed by additional Plesk Administrator accounts are logged. which gives the actual Plesk Administrator an unprecedented level of control over additional Administrator accounts' activities.. Request Packet Structure A request XML packet changing the Plesk Administrator desktop view includes the setadmin operation node: <packet version="1. Changing Plesk Administrator Preset Use the set-admin operation to change the view of the Plesk Administrator desktop.4.xsd).1.2. Data type: string.. This feature is supported only in Plesk for Windows 8.

<packet version="1.2. It specifies the execution status of the set-admin operation. Data type: DesktopOpResultType (desktop. It warps the response retrieved from the server. Data type: string. Allowed values: ok | error.xsd). Data type: integer.4. .xsd) and structured as follows:    The result node is required. <packet version="1.0"> <desktop> <set-admin> <desktop-preset>MyPreset</desktop-preset> </set-admin> </desktop> </packet> Response Packet Structure The set-admin node of the output XML packet is presented by type SetAdminResult (desktop.4. The errcode node is optional.0"> <desktop> <set-admin> <desktop-preset>Default Administrator Desktop</desktop-preset> </set-admin> </desktop> </packet> This packet applies preset MyPreset to the desktop of Plesk Administrator. The status node is required.2.Supported Operations 192 Request Samples This packet applies preset Default Administrator Desktop to the desktop of Plesk Administrator. Is returns the error code if the set-admin operation fails.

2. or the type of preset differs from 'admin'.4. Data type: integer. The id node is optional.0"> <desktop> <set-admin> <result> <status>ok</status> <id>1</id> </result> </set-admin> </desktop> </packet> If the preset was not found on the server.2.0"> <desktop> <set-admin> <result> <status>error</status> <errcode>1013</errcode> <errtext>Preset Default Client Desktop with type admin has not been found in database</errtext> </result> </set-admin> </desktop> </packet> . <packet version="1.2. It holds ID of the preset if the operation succeeds.Supported Operations 193   The errtext node is optional. Response Samples Request sample This request packet applies preset Default Administrator Desktop to the desktop of Plesk Administrator. Data type: string.4. It returns the error message if the set-admin operation fails. a response from the server can look as follows: <packet version="1.4.0"> <desktop> <set-admin> <desktop-preset>Default Administrator Desktop</desktop-preset> </set-admin> </desktop> </packet> Response sample A positive response from the server can look as follows: <packet version="1.

it will be immediately applied to their desktop. If you choose default preset for these Plesk users. refer to the Managing Desktop Presets (see page 190) section. <packet version="1. Allowed values: admin | client | domain. Data type: string.4.xsd). </set-default-preset> </desktop> </packet> The set-default-preset node is presented by the SetDefaultInputCommandType type (desktop. and its graphical representation is as follows:    The name node is required. The id node is required. It specifies the ID of the preset.0"> <desktop> . Data type: integer.0"> <desktop> <set-default-preset> . The type node is required. Remarks You can choose default preset for multiple types of presets. Request Samples Defining default preset for presets of the same type This packet chooses default preset for Plesk clients. For information on types of presets. Request Packet Structure A request XML packet changing default preset includes the set-default-preset operation node: <packet version="1.2. Data type: string.Supported Operations 194 Choosing Default Preset Use the set-default-preset operation to choose default preset for clients. It specifies the type of the preset.2. Types of the presets should differ.4. domain administrators or additional administrator accounts.. Add as many set-defaultpreset operations as number of presets you want to set as default. It specifies the name of the preset.. The default preset for administrators will be applied to Plesk Administrator's desktop only if Administrator's current preset was not found on the server.

2.xsd).0"> <desktop> <set-default-preset> <name>ClientDefaultPreset</name> <type>client</type> </set-default-preset> <set-default-preset> <name>DomainDefaultPreset</name> <type>domain</type> </set-default-preset> </desktop> </packet> Response Packet Structure The set-default-preset node of the output XML packet is presented by type SetDefaultResult (desktop. Data type: DesktopOpResultType (desktop. It warps the response retrieved from the server.4.xsd) and structured as follows:  The result node is required.Supported Operations <set-default-preset> <name>ClientDefaultPreset</name> <type>client</type> </set-default-preset> </desktop> </packet> 195 Defining default preset for multiple types of presets This packet performs the following operations:   Chooses the preset called ClientDefaultPreset as default for desktop of Plesk clients Chooses the preset called DomainDefaultPreset as default for desktop of Plesk domain administrators <packet version="1. .

the response is as follows: <packet version="1. It specifies the execution status of the set-default-preset operation.4.0"> <desktop> <set-default-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Preset Default Client Desktop with type admin has not been found in database</errtext> </result> </set-default-preset> </desktop> </packet> . Data type: string.2. Is returns the error code if the set-default-preset operation fails.2. The errcode node is optional. It holds ID of the preset if the operation succeeds or if the ID was specified in the request packet. Data type: string.4. The errtext node is optional.0"> <desktop> <set-default-preset> <name>ClientDefaultPreset</name> <type>client</type> </set-default-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.0"> <desktop> <set-default-preset> <result> <status>ok</status> <id>2</id> </result> </set-default-preset> </desktop> </packet> If the preset was not found on the server. Data type: integer.Supported Operations 196     The status node is required. It returns the error message if the set-default-preset operation fails. Data type: integer.4. Allowed values: ok | error.2. Response Samples Defining default preset for presets of the same type This request packet chooses default preset for Plesk clients. The id node is optional. <packet version="1.

0"> <desktop> <set-default-preset> <result> <status>ok</status> <id>2</id> </result> </set-default-preset> <set-default-preset> <result> <status>ok</status> <id>3</id> </result> </set-default-preset> </desktop> </packet> .0"> <desktop> <set-default-preset> <name>ClientDefaultPreset</name> <type>client</type> </set-default-preset> <set-default-preset> <name>DomainDefaultPreset</name> <type>domain</type> </set-default-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.4.Supported Operations 197 Defining default preset for multiple types of presets This request packet performs the following operations:   Chooses the preset called ClientDefaultPreset as default for desktop of Plesk clients Chooses the preset called DomainDefaultPreset as default for desktop of Plesk domain owners <packet version="1.2.4.2.

<packet version="1. and its graphical representation is as follows:   The filter node is required.2. The id node is optional. refer to the Managing Desktop Presets (see page 190) section. Request Packet Structure A request XML packet retrieving preferences of a preset includes the preset-list operation node: <packet version="1.4..xsd).0"> <desktop> <preset-list> . Request Samples Retrieving preferences of a single preset This packet retrieves preferences of the preset specified by ID 5. Add as many id parameters as number of presets info on which you want to retrieve. It specifies the filtering rule. Data type: PresetSimpleFilterType (desktop. </preset-list> </desktop> </packet> The preset-list node is presented by the PresetListsInputCommandType type (desktop.0"> <desktop> <preset-list> <filter> <id>5</id> </filter> </preset-list> </desktop> .xsd). the operation will return all presets available on the server. For info on presets. If ID is not specified.Supported Operations 198 Retrieving Preset Preferences Use the preset-list operation to retrieve preferences of a preset. Remarks You can retrieve preferences of multiple presets in a single packet. It specifies the ID of the preset.4.2. Data type: integer..

2.4.2. <packet version="1.4.0"> <desktop> <preset-list> <filter> <id>5</id> <id>7</id> </filter> </preset-list> </desktop> </packet> This packet retrieves preferences of all presets on the server.Supported Operations </packet> 199 Retrieving preferences of multiple presets This packet retrieves preferences the presets specified by ID 5 and ID 7.xsd) and structured as follows: .0"> <desktop> <preset-list> <filter/> </preset-list> </desktop> </packet> Response Packet Structure The preset-list node of the output XML packet is presented by type PresetlistsResult (desktop. <packet version="1.

The preset node is optional. The id node is optional.xsd). <packet version="1. For information on default presets. The errtext node is optional. refer to the Managing Desktop Presets (see page 190) section.4. Allowed values: admin | client | domain. For info on types of presets.2.4. The status node is required. It specifies if the preset will be default for the specified type of presets. Data type: string. It specifies the preset name.Supported Operations 200       The result node is required. Data type: none. Data type: string. Data type: string. Allowed values: ok | error. Data type: integer. Data type: DesktopOpAdvancedpresetType (desktop.0"> <desktop> <preset-list> <result> <status>ok</status> <id>5</id> <preset> <name>ClientDefaultPreset</name> <type>client</type> <default></default> . The errcode node is optional. Data type: PresetType (desktop. refer to the Managing Desktop Presets (see page 190) section. Response Samples Retrieving preferences of a single preset This request packet retrieves preferences of the preset specified by ID 5. Data type: string.xsd). It specifies the execution status of the preset-list operation. It holds preferences of the preset. Is returns the error code if the preset-list operation fails. The type node is required. It warps the response retrieved from the server.2.0"> <desktop> <preset-list> <filter> <id>5</id> </filter> </preset-list> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.  The default node is optional. It holds ID of the preset. Data type: integer. It specifies the type of the preset. It returns the error message if the preset-list operation fails. The following nodes are nested in the response packet only if the operation succeeds:   The name node is required.

4.4.0"> <desktop> <preset-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Preset Default Client Desktop with type admin has not been found in database</errtext> <id>5</id> </result> </preset-list> </desktop> </packet> Retrieving preferences of multiple presets This request packet retrieves preferences of all presets on the server.Supported Operations </preset> </result> </preset-list> </desktop> </packet> 201 If the preset was not found on the server.2. the result looks as follows: <packet version="1.2.4.0"> <desktop> <preset-list> <filter/> </preset-list> </desktop> </packet> A positive response from the server can look as follows: <packet version="1. <packet version="1.2.0"> <desktop> <preset-list> <result> <status>ok</status> <id>5</id> <preset> <name>ClientDefaultPreset</name> <type>client</type> <default></default> </preset> </result> <result> <status>ok</status> <id>7</id> <preset> <name>MyDefaultPreset</name> .

.xsd). refer to the Managing Desktop Presets (see page 190) section.Supported Operations <type>admin</type> </preset> </result> </preset-list> </desktop> </packet> 202 Adding Preset Use the add-preset operation to add a new preset.2.4. you can retrieve the file value from the response packet of the operation. For information on presets. refer to the Uploading Files to Server (see page 960) section. The overwrite node is optional. Data type: none. It specifies if the file will be overwritten in case of name conflict. </add-preset> </desktop> </packet> The add-preset node is presented by the AddPresetCommandType type (desktop. . Request Packet Structure A request XML packet adding a preset includes the add-preset operation node: <packet version="1. If the preset was uploaded using the upload operator.0"> <desktop> <add-preset> .. It should be located on the server. It specifies full name of the file containing desktop preset. For information on the upload operator.Data type: string.  Remarks You can add multiple presets in a single packet. and its graphical representation is as follows:  The file node is required. Add as many add-preset operations as number of presets to be added.

the operation will overwrite the old file.Supported Operations 203 Request Samples Adding a preset This packet adds preset MyPreset to desktop presets located on the server. <packet version="1.4.xml</file> <overwrite/> </add-preset> <add-preset> <file>/tmp/domainpreset.2. <packet version="1.2.0"> <desktop> <add-preset> <file>/tmp/mypreset.xml</file> <overwrite/> </add-preset> </desktop> </packet> Adding multiple presets This packet adds the presets MyPreset and DomainPreset to desktop presets located on the server.xsd) and structured as follows: .0"> <desktop> <add-preset> <file>/tmp/mypreset.xml</file> <overwrite/> </add-preset> </desktop> </packet> Response Packet Structure The add-preset node of the output XML packet is presented by type AddPresetResult (desktop. If preset MyPreset already exists on the server.4.

Data type: string.0"> <desktop> <add-preset> <result> <status>error</status> <errcode>1002</errcode> <errtext>Unable to import desktop presets: The uploaded XML file contains a syntax error.2. the operation will overwrite the old file. Data type: integer. Data type: DesktopOpResultType (common.2.0"> <desktop> <add-preset> <file>/tmp/mypreset.4. The errtext node is optional. The status node is required.xml</file> <overwrite/> </add-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1. It warps the response retrieved from the server.2.4. the response is as follows: <packet version="1.Supported Operations 204      The result node is required. It specifies the execution status of the add-preset operation.</errtext> </result> </add-preset> </desktop> </packet> . The id node is optional.0"> <desktop> <add-preset> <result> <status>ok</status> <id>12</id> </result> </add-preset> </desktop> </packet> If the file was not a valid preset. Data type: string. Response Samples Adding a preset This request packet adds preset MyPreset to desktop presets located on the server. It returns the error message if the add-preset operation fails. Allowed values: ok | error. If preset MyPreset already exists on the server. Data type: integer.xsd). Is returns the error code if the add-preset operation fails.4. The errcode node is optional. It holds ID of the preset if the operation succeeds. <packet version="1.

0"> <desktop> <add-preset> <file>/tmp/mypreset.0"> <desktop> <add-preset> <result> <status>ok</status> <id>12</id> </result> </add-preset> <add-preset> <result> <status>error</status> <errcode>1002</errcode> <errtext>Desktop preset file '' cannot be read</errtext> </result> </add-preset> </desktop> </packet> .4. <packet version="1.2.2.xml</file> <overwrite/> </add-preset> </desktop> </packet> A possible response from the server when the second file was not found can look as follows: <packet version="1.4.xml</file> <overwrite/> </add-preset> <add-preset> <file>/tmp/domainpreset.Supported Operations 205 Adding multiple presets This packet adds the presets MyPreset and DomainPreset to desktop presets located on the server.

Data type: string. Data type: PresetfilterType (desktop..4. Data type: integer. It specifies the name of the preset. It specifies the type of the preset. It specifies the ID of the preset. The id node is optional. you can do the following operations:   Remove a single preset specified by name and type Remove one or more presets specified by ID . The name node is optional.2. If you specify the preset name. Note: You cannot delete default presets.xsd). </remove-preset> </desktop> </packet> The remove-preset node is presented by the RemovePresetInputCommandType type (desktop. you should also specify the preset name. and its graphical representation is as follows:     The filter node is required. It specifies the filtering rule..0"> <desktop> <remove-preset> . If you specify the preset type. you should also specify the preset type.Supported Operations 206 Removing Preset Use the remove-preset operation to remove a preset. Data type: string.xsd). For information on presets. Remarks Using different filtering rules. The type node is optional. refer to the Managing Desktop Presets (see page 190) section. Request Packet Structure A request XML packet removing a preset includes the remove-preset operation node: <packet version="1.

name. <packet version="1.4. <packet version="1.4. and ID parameters in a single filter node will be considered invalid by Plesk.2. add as many remove-preset operations to the request packet as the number of different filtering rules to be applied.4.2.0"> <desktop> <remove-preset> .2. <filter> <name>ClientPreset</name> <type>client</type> </filter> The following filtering rule specifies the presets with ID 7 and ID 9 <filter> <id>7</id> <id>9</id> </filter> Presets can be filtered either by name and type.0"> <desktop> <remove-preset> <filter> <name>MyPreset</name> <type>client</type> </filter> </remove-preset> </desktop> </packet> Removing multiple presets This packet removes the presets specified by ID 6 and ID 8. <packet version="1.Supported Operations 207 The following filtering rule specifies the client preset called ClientPreset. Request Samples Removing a preset This packet removes client preset MyPreset. or by ID. To use different filtering rules in a single packet. The packet containing type.0"> <desktop> <remove-preset> <filter> <id>6</id> <id>8</id> </filter> </remove-preset> </desktop> </packet> This packet removes administrator presets MyPreset and MyAdminPreset.

It specifies the execution status of the remove-preset operation. It warps the response retrieved from the server.xsd) and structured as follows:      The result node is required. Allowed values: ok | error.Supported Operations <filter> <name>MyPreset</name> <type>admin</type> </filter> </remove-preset> <remove-preset> <filter> <name>MyAdminPreset</name> <type>admin</type> </filter> </remove-preset> </desktop> </packet> 208 Response Packet Structure The remove-preset node of the output XML packet is presented by type RemovePresetResult (desktop. Data type: DesktopOpResultType (common. Data type: string.xsd). Data type: integer. Data type: integer. The id node is optional. It returns the error message if the remove-preset operation fails. . The errtext node is optional. The errcode node is optional. The status node is required. Is returns the error code if the remove-preset operation fails. It holds ID of the preset if the operation succeeds or if it was specified in the request packet. Data type: string.

<packet version="1.</errtext> </result> </remove-preset> </desktop> </packet> Removing multiple presets This packet removes the presets specified by ID 6 and ID 8.0"> <desktop> <remove-preset> <filter> <name>MyPreset</name> <type>client</type> </filter> </remove-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.2.0"> <desktop> <remove-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Desktop preset "MyPreset" of type "client" was not found in repository.2.4.2.0"> <desktop> <remove-preset> <filter> <id>6</id> <id>8</id> </filter> </remove-preset> </desktop> </packet> .4.2. <packet version="1.4.0"> <desktop> <remove-preset> <result> <status>ok</status> <id>12</id> </result> </remove-preset> </desktop> </packet> If the preset was not found on the server.4. the response is as follows: <packet version="1.Supported Operations 209 Response Samples Removing a preset This request packet removes client preset MyPreset.

<packet version="1.</errtext> </result> </remove-preset> </desktop> </packet> .2.2. the response looks as follows: <packet version="1.2.0"> <desktop> <remove-preset> <filter> <name>MyPreset</name> <type>admin</type> </filter> </remove-preset> <remove-preset> <filter> <name>MyAdminPreset</name> <type>admin</type> </filter> </remove-preset> </desktop> </packet> If the presets were not found on the server.Supported Operations 210 A positive response from the server can look as follows: <packet version="1.4.</errtext> </result> </remove-preset> <remove-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Desktop preset "MyPreset" of type "admin" was not found in repository.4.4.0"> <desktop> <remove-preset> <result> <status>ok</status> <id>6</id> </result> <result> <status>ok</status> <id>8</id> </result> </remove-preset> </desktop> </packet> This packet removes administrator presets MyPreset and MyAdminPreset.0"> <desktop> <remove-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Desktop preset "MyPreset" of type "admin" was not found in repository.

dns_output.Supported Operations 211 Managing DNS Operator: <dns> XML Schema: dns_input.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator Description Plesk supports the following functionality:       Managing DNS records (see page 216) Managing ACL (see page 234) Managing SOA record and zone parameters (see page 242) Managing name servers (see page 254) Managing local or remote DNS servers (see page 271) Managing recursive requests to DNS servers (see page 283) .xsd.

Supported Operations 212 Supported operations  ADD_REC (see page 216) adds a DNS record of the specified type to the specified domain zone GET_REC (see page 223) retrieves information about certain DNS records DEL_REC (see page 229) removes the specified DNS record(s) GET_ACL (see page 234) retrieves access control lists (ACL) from the server ADD_TO_ACL (see page 235) adds hosts to ACL REMOVE_FROM_ACL (see page 238) removes hosts from ACL SET (see page 243) updates the SOA record settings for the specified zone or zone template GET (see page 248) retrieves the SOA record settings SWITCH (see page 254) switches the DNS zone type between ‗master‘ and ‗slave‘ ADD_MASTER_SERVER (see page 258) adds a new master DNS server for the specified zone GET_MASTER_SERVER (see page 262) retrieves the master server for the specified zone DEL_MASTER_SERVER (see page 267) removes the master server for the specified zone ENABLE (see page 271) enables the name server for the specified zone                DISABLE (see page 274) disables the name server for the specified domain ENABLE-REMOTE-DNS (see page 277) switches the DNS server to primary mode DISABLE-REMOTE-DNS (see page 279) switches the DNS server to slave mode .

It returns the filtering rule parameter.0"> <dns> <get_master_server> <filter> <domain_id>3</domain_id> </filter> </get_master_server> </dns> </packet> The filter-id node is nested in a response packet of the get_master_server operation. The blank filter means that all records are matched by this rule. the filter-id parameter will hold the ID of the object.0.2. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node.    Domain ID DNS Record ID Domain alias ID It is done to trace the request parameters in case of error. . A packet that retrieving information about the master DNS server for domain with ID 3 can look as follows: <packet version="1. Data type: anySimpleType. If one of the following values was set as a filter rule parameter. nested in the filter node are called filtering rule.4. it is returned in the filter-id node of the response packet.4.2. The request XML packet filters data using a special <filter> section. A single operation can use only parameters of the same type in the filtering rule. If the filter node is left blank (<filter/>). Note:The <filter-id> node appears in API RPC 1. A single filter can specify multiple DNS records.Supported Operations 213     GET-STATUS-REMOTE-DNS (see page 281) retrieves the status of the remote DNS server SET-RECURSION (see page 283) sets up preferences of recursive requests to DNS server GET-RECURSION (see page 285) retrieves the recursion preferences DNS server GET-SUPPORTED-RECURSION (see page 287) retrieves the available types of recursion for the DNS server Filtering Issues Filtering is the way the request XML packet indicates the object to which the operation will be applied. Parameters. Earlier versions of the protocol do not support this node. domain ID or host IP address. all specified either by ID.

This filter is used in the get_acl.0.168. The graphical representation of the filter node is as follows:  The host node is required. refer to the Managing Domain Aliases (see page 387) section.The graphical representation of the filter node is as follows:   The domain_id node is required. Data type: integer. . The domain_alias_id is required. add_to_acl. It specifies the domain ID in Plesk database. disable operations. This filter is used in get. This filter parameter is supported starting with API RPC v. switch.Supported Operations 214 There are three kinds of filters.1. Data type: integer.xsd). It specifies the domain alias ID in Plesk database.0. enable.1</host> <host>192. It specifies the IP address of a host. Data type:aclFilter (dns_input.1.xsd).5</host> </filter> simpleFilter The simpleFilter filter is used to match one or more domains or domain aliases by ID.7. Data type: string. You can match multiple hosts using this filter as in the following example: <filter> <host>192. remove_from_acl operations. Adding to ACL (see page 235). specified by different types:    aclFilter (see page 214) simpleFilter (see page 214) dnsSelectionFilter (see page 215) aclFilter The aclFilter filter is used to retrieve and update Access Control Lists (ACL). Data type: simpleFilterType (dns_input. set. refer to the Retrieving ACL (see page 234).168. For more information. For information on domain aliases.4. and Removing From ACL (see page 238) sections.

Remarks You can also match multiple domains. The id node is optional. It specifies the domain alias ID in Plesk database.0. The combination of two filtering rules in one filter node can look as follows: <filter> <domain_id>1</domain_id> <domain_id>12</domain_id> </filter> You can also match multiple domain aliases using this filter. or domain_alias_id when using this filter. del_master_server. Data type: integer. Data type: integer. DNS records using this filter. domain aliases. del_rec.xsd). This filter parameter is supported starting with API RPC v. The combination of two filtering rules in one filter node can look as follows: <filter> <domain_alias_id>1</domain_alias_id> <domain_alias_id>12</domain_alias_id> </filter> Note: you can use either domain_id. dnsSelectionFilter The dnsSelectionFilter filter match DNS records by ID. get_master_server operations. The domain_alias_id node is optional. The combination of two filtering rules in one filter node can look as follows: .Supported Operations 215 Remarks You can match multiple domains using this filter. domain ID. or domain alias ID. It is used in get_rec. The graphical representation of the filter node is as follows:    The domain_id node is optional. For information on domain aliases. It specifies the domain ID in Plesk database. refer to the Managing Domain Aliases (see page 387) section.1. It specifies the DNS record ID in Plesk database. The packet that contains both domain_id and domain_alias_id parameters in a single filter node will be considered invalid by Plesk server. Data type: dnsSelectionFilterType (dns_input.4. Data type: integer.0.

and domain or domain alias zone records. so CNAME only provides one layer of indirection. In addition. an IPv4 32-bit address) associated with a domain name. Arbitrary binary data. domain_id.ARPA domain. Adding DNS Record Resource Records define data types in the Domain Name System (DNS). a list of mail exchangers is then ordered by priority when delivering mail. they stitch together distributed zone files into a directed graph that can be efficiently searched. Most often used to provide a way to associate a domain name with an IPv4 address in the IN-ADDR. then it can not have any other record types. AXFR (Asynchronous Full Transfer Zone). and domain_alias_id parameters in a single filter node will be considered invalid by Plesk server. domain_id. or domain_alias_id when using this filter. The packet that contains a combination of id. Specifies a host name (which must have an A record associated with it). Used for storing an IP address (specifically. Note that if a domain name has a CNAME record associated with it.Supported Operations <filter> <id>1</id> <id>2</id> <id>3</id> </filter> 216 Note: you can use either id. PTR (Domain name pointer). Managing DNS Records In Plesk. NS (Authoritative name server). TXT (Text string).      . But resource records are sent across a network in text format while they perform zone transfers. Template is a server-level set of rules for zone files of the newly created domains: When a new domain or domain alias is created. Resource Records identified by RFC 1035 are stored in binary format internally for use by DNS software. Provides a general indirection facility for DNS records. CNAME records should not point to domain names which themselves have associated CNAME records. NS records are the basic infrastructure on which DNS is built. where DNS information can be found about the domain name to which the NS record is attached. Critical part of the infrastructure used to support SMTP email. MX records provide one level of indirection in mapping the domain part of an email address to a list of host names which are meant to receive mail for that domain name. Each MX record specifies a domain name (which must have an A record associated with it) and a priority. Plesk automatically generates zone file for it basing on server templates. MX (Mail Exchanger). CNAME (Canonical name for a DNS alias). up to 255 bytes in length. DNS resource records include zone template records. The following record types are available in Plesk:   A (Address). Defined in RFC 1035.

4. the DNS record will be added to DNS records for the domain with the corresponding ID. The support of this node has started since 1. This type of records is available only n Plesk for Windows via API RPC v.4. Data type: integer.0. Where MX records work only for mail delivery and provide "failover" via the Priority value. For more information about DNS types. Allowed values: A | NS | CNAME | MX | PTR | TXT | SOA | AXFR | SRV  .0 version of the API RPC protocol.5.2.0.1. the DNS record will be added to DNS records for the domain alias with the corresponding ID. Data type: integer. Plesk automatically generates zone file for the domain or domain alias basing on the server template. The type node is required.xsd). Note: You can add a DNS record for the specified domain or to the DNS zone template. refer to the Adding a DNS Record (see page 216) section. Data type: string. Request Packet Structure A request XML packet adding a new DNS record to Plesk database includes the add_rec operation node: <packet version="1. On creation of a new domain. Its graphical representation is as follows:   The domain_id node is optional. If specified. If specified. The domain_alias_id node is optional.Supported Operations 217  SRV (service) records are a generalization and expansion of features provided by MX records.0"> <dns> <add_rec> … </add_rec> </dns> </packet> The add_rec node is presented by the dnsRecord type (plesk_dns.0 and later. SRV records add in support for load balancing (via the Weight value) and port selection (via the Port value). It specifies the type of the DNS record.

2.</value> </add_rec> </dns> </packet> This packet links domain mail. <add_rec> … </add_rec> </dns> Note: In case of SRV record.example. <packet version="1.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>NS</type> <host/> <value>ns. Note: If the domain_id and domain_alias_id parameters are omitted.Supported Operations 218    The host node is required.12.com is 1).com is 1) to IP address 192. the nameserver for the host example. The opt node can contain additional XML code in the following format:<Srv Protocol="" Port="" Priority="" Weight=""/>. Request Samples Adding a single DNS record This packet adds an NS record which makes ns. Add as many <add-rec> operations as the number of DNS records you want to add.0. the host node stands for Target host. (domain ID of example. the DNS record will be added to the DNS zone template.2. It holds optional information about the DNS record. (domain ID of example.com.com. It specifies the IP address or name of a host that will be used by DNS.com..0.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>A</type> <host>mail</host> <value>192.5. Data type: string. The value node is required. The opt node is optional.example. <packet version="1. You can add multiple DNS records using a single packet.example.com.12</value> .5.. the value stands for Service name. It specifies the value that will be linked with the host value.1. Data type: string. Data type: string.1. <dns> <add_rec> … </add_rec> .

0"> <dns> .net</value> <opt>0</opt> </add_rec> </dns> </packet> This packet adds a PTR DNS record which makes domain community.0.5. is 1).example.com. (domain ID of example.com.com. the domain name pointer for the subnet 192. is 1).com. <packet version="1. as the canonical name for domain ftp.</value> </add_rec> </dns> </packet> This packet adds an MX DNS record which makes mailex.com.0/24 (domain ID of example.example.0</host> <value>community</value> <opt>24</opt> </add_rec> </dns> </packet> This packet adds a textual description to the domain about.example.5.com. <packet version="1.example.5.com.0.example.2. <packet version="1.1. (domain ID of example.com. the main mail server for domain mail-exchange.1.1. (domain ID of example. is 1).example.com is 1).0"> <dns> <add_rec> <type>PTR</type> <host>192.Supported Operations </add_rec> </dns> </packet> 219 This packet sets example.0"> <dns> <add_rec> <type>MX</type> <host>mail-exchange</host> <value>mailex.5. <packet version="1.com.2.1.net.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>CNAME</type> <host>ftp</host> <value>example.

4.0"> <dns> <add_rec> <type>MX</type> <host/> <value>mymail.</value> </add_rec> </dns> </packet> 220 This packet adds an SRV record for LDAP service on host 192.5.</value> </add_rec> </dns> </packet> .domain&gt.4</host> <value>_ldap</value> <opt>&lt.&lt.Supported Operations <add_rec> <type>TXT</type> <host>about</host> <value>The best place to improve your experiences.2.0.5.</value> <opt>25</opt> </add_rec> <add_rec> <type>A</type> <host>newsome</host> <value>&lt.1. <packet version="1.</value> <opt>25</opt> </add_rec> </dns> </packet> Adding multiple DNS records This packet adds A and MX DNS records to DNS zone template.</opt> </add_rec> </dns> </packet> This packet adds to the server DNS template an MX record.5.1.Srv Protocol="_tcp" Port="115" Priority="0" Weight="10"/&gt.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>SRV</type> <host>192.ip&gt. <packet version="1.1.domain&gt. <packet version="1.2.0.0"> <dns> <add_rec> <type>MX</type> <host/> <value>mymail.&lt.

Data type: string. Data type: unsignedInt. Response Samples Adding a single DNS record This request packet adds an NS record. It specifies the execution status of the add_rec operation.4. Data type: string.Mydomain. Data type: integer. Returns the unique identifier of the DNS record just added to Plesk. it is required if the add_rec operation has succeeded. <packet version="1.</host> <value>ns.com. It returns the ID of the DNS record. The errtext node is optional. The status node is required.0"> <dns> <add_rec> <result> . Allowed values: ok | error.2. Data type: resultType (common.Supported Operations 221 Response Packet Structure The add_rec node of the output XML packet is structured as follows:      The result node is required. It is used to return the error message if the add_rec operation fails.</value> </add_rec> </dns> </packet> A positive response from the server can look as follows: <packet version="1. The errcode node is optional. It wraps the response retrieved from the server.4.com.2.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>NS</type> <host>Mydomain. The id node is optional.xsd). It is used to return the error code when the add_rec operation fails.

Supported Operations <status>ok</status> <id>17</id> </result></add_rec> </dns> </packet> 222 If the domain ID was not found on the server.Mydomain.4..</value> </add_rec> </dns> </packet> A possible response from the server can look as follows: <packet version="1.2.</host> <value>ns. </vale> </add_rec> <add_rec> <type>A</type> <host>mail.2.com.com.4.4.0"> <dns> <add_rec> <result> <status>ok</status> <id>10</id> </result> </add_rec> <add_rec> <result> . <packet version="1.2.</host> <value> &lt. negative response from the server looks as follows: <packet version="1.ip&gt.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>NS</type> <host>Mydomain.domain&gt.&lt.0"> <dns> <add_rec> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </result> </add_rec> </dns> </packet> Adding multiple DNS records This request packet adds A DNS record to DNS zone template and MX record to domain with ID 1.

2. If present.Supported Operations <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </result> </add_rec> </dns> </packet> 223 Retrieving DNS Records Both zone template records and domain or domain alias zone records can be retrieved using the get_rec operation. Request Packet Structure A request XML packet retrieving a DNS record from Plesk database includes the get_rec operation node: <packet version="1. all resource records (zone template records or zone records depending on presence of the template node in the request packet) will be retrieved. Data type: none.4. You can retrieve multiple DNS records in a single packet. It specifies the filtering rule.  Note: If you leave the filter node blank (<filter/>). refer to the Filtering Issues (see page 213) section. In this case domain_id or domain_alias_id cannot be specified as a filtering rule.0"> <dns> <get_rec> … </get_rec> </dns> </packet> The graphical representation of the get_rec node is as follows:  The filter node is required. refer to the Filtering Issues (see page 215) section. Add as many get_rec operations as the number of different filtering rules. For more information about filters. You can retrieve multiple records in a single get_rec operation using filtering rules. Data type: dnsSelectionFilterType(dns_input. <dns> <get_rec> … </get_rec> .xsd). The template node is optional. only DNS zone template records are available for retrieving. For more information.

<packet version="1. <get_rec> … </get_rec> </dns> 224 Request Samples Retrieving a single DNS record This packet retrieves information on the DNS record with ID 8.0"> <dns> <get_rec> <filter> <domain_alias_id>1</domain_alias_id> </filter> </get_rec> </dns> </packet> This packet retrieves zone parameters of the domain alias with ID 1 and the domain with ID 7.4.4. <packet version="1.2.4.2.4.0"> <dns> <get_rec> <filter> <id>8</id> </filter> </get_rec> </dns> </packet> Retrieving multiple DNS records This packet retrieves zone parameters of the domain with ID 15..2.Supported Operations .2. <packet version="1..0"> <dns> <get_rec> <filter> <domain_alias_id>1</domain_alias_id> .0"> <dns> <get_rec> <filter> <domain_id>8</domain_id> </filter> </get_rec> </dns> </packet> This packet retrieves zone parameters of the domain alias with ID 1. <packet version="1.

It is required if the operation get_rec succeeds.Supported Operations </filter> </get_rec> <get_rec> <filter> <domain_id>7</domain_id> </filter> </get_rec> </dns> </packet> 225 This packet retrieves zone parameters all domains and domain aliases on the server. .2.4.0"> <dns> <get_rec> <filter/> </get_rec> </dns> </packet> This packet retrieves all DNS zone template records. <packet version="1.0"> <dns> <get_rec> <filter/> <templates/> </get_rec> </dns> </packet> Response Packet Structure The get_rec node of the output XML packet is structured as follows:  The result node is optional. and the data set retrieved from the server is not empty.xsd).2. <packet version="1. Data type: resultType (common.4.

Data type: integer. Data type: string.Supported Operations 226      The status node is required. It specifies the type of the DNS record.     . The type node is optional. Data type: unsignedInt. It is used to return the error message if the get_rec operation fails. It is used to return the error code when the get_rec operation fails. The node is structured as follows:   The domain_id node is optional. Data type: string. Data type: string. the DNS record is retrieved from zone parameters for the domain with the corresponding ID. It is required if the operation succeeded. If specified. The opt node is optional.xsd). Data type: string. that will be used by DNS. It specifies the execution status of the get_rec operation. It is required if the operation succeeded. The domain_alias_id node is optional. Data type: string. Allowed values: A | NS | CNAME | MX | PTR | TXT | SOA | AXFR | SRV The host node is optional. Allowed values: ok | error. It is required if the operation succeeded. It specifies the value that will be linked with the host value. Data type: integer.4. For more information about DNS types.0 version of the API RPC protocol. Returns the unique identifier of the DNS record. The value node is optional. The errtext node is optional. The errcode node is optional. Data type: string. The data node is optional. If specified. It specifies the IP address or name of a host. The id node is required if the get_rec operation has succeeded. The support of this node has started since 1.0. It is required if the get_rec operation has succeeded. the DNS record is retrieved from zone parameters for the domain alias with the corresponding ID. Data type: integer. please visit the Adding a DNS Record (see page 216) section. Data type: dnsRecord (dns_input. It holds optional information about the DNS record.

</host> <value>ns.Supported Operations 227 Response Samples Retrieving a single DNS record This request packet retrieves the DNS record with ID 8.2.4. <packet version="1. the response can look as follows: <packet version="1.</value> <opt></opt> </data> </result> </get_rec> </dns> </packet> Retrieving multiple DNS records This request packet retrieves zone preferences of the domain with ID 8.4.2.com.com.2.2. the response looks as follows: <packet version="1.Mydomain.0"> <dns> <get_rec> <filter> <domain_id>8</domain_id> </filter> </get_rec> .4.4.0"> <dns> <get_rec> <filter> <id>8</id> </filter> </get_rec> </dns> </packet> If the DNS record with ID 8 was not found on the server.0"> <dns> <get_rec> <result> <status>ok</status> <id>8</id> <data> <domain_id>8</domain_id> <type>NS</type> <host>Mydomain.0"> <dns> <get_rec> </get_rec> </dns> </packet> If the DNS record with ID 8 was found on the server. <packet version="1.

com.2.2.0"> <dns> <get_rec> <result> <status>ok</status> <id>18</id> <data> <domain_id>8</domain_id> <type>NS</type> <host>Mydomain.Mydomain. a response from the server can look as follows: <packet version="1. </value> <opt></opt> </data> </result> <get_rec> <result> <status>ok</status> <id>19</id> <data> <domain_id>8</domain_id> <type>PTR</type> <host></host> <value>Mydomain.4.0"> <dns> <get_rec> </get_rec> </dns> </packet> If the domain with ID 8 was found on the server.Supported Operations </dns> </packet> 228 If the domain with ID 8 was not found on the server. the response from the server looks as follows: <packet version="1.4.com</value> <opt></opt> </data> </result> </get_rec> </dns> </packet> .com</host> <value>ns.

depending on presence of the template node in the request packet) will be removed. only DNS zone template records are available for deleting. In this case domain_id or domain_alias_id cannot be specified as a filtering rule. <del_rec> … </del_rec> </dns> . refer to the Filtering Issues (see page 215) section. Data type: none. The template node is optional. If present.4.Supported Operations 229 Deleting DNS Records Both zone template records and domain or domain alias zone records can be deleted using the del_rec operation. It specifies the filtering rule.  Note: If you leave the filter node blank (<filter/>) all records (zone template records or zone records.. <dns> <del_rec> … </del_rec> . For more information about filters. Add as many del_rec operations as the number of different filtering rules.0"> <dns> <del_rec> … </del_rec> </dns> </packet> The graphical representation of the del_rec node is as follows:  The filter node is required. For more information.. You can retrieve multiple records in a single del_rec operation using filtering rules.2. Data type: dnsSelectionFilterType(dns_input.xsd). refer to the Filtering Issues (see page 213) section. Request Packet Structure A request XML packet deleting a DNS record from Plesk database includes the get_rec operation node: <packet version="1. You can delete multiple DNS records in a single packet.

2.Supported Operations 230 Request Samples Deleting a single DNS record This request packet deletes DNS record with ID 75 <packet version="1.4.0"> <dns> <del_rec> <filter> <id>75</id> </filter> </del_rec> </dns> </packet> Deleting multiple DNS records This request packet deletes DNS records from the zone of domain with ID 7.0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> </filter> </del_rec> <del_rec> <filter> .2. <packet version="1.4.4.0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> <domain_id>8</domain_id> </filter> </del_rec> </dns> </packet> This request packet deletes DNS records from the zone of the domain with ID 7. and the record with ID 5. <packet version="1.4.2.0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> </filter> </del_rec> </dns> </packet> This request packet deletes DNS records from zones of the domains with ID 7 and 8.2. <packet version="1.

<packet version="1.4. Data type: resultType (common. If the id was set as a filtering rule in the request packet.2. Data type: string.   .2.4.0"> <dns> <del_rec> <filter/> </del_rec> </dns> </packet> This request packet deletes all DNS records from the server template. <packet version="1.0"> <dns> <del_rec> <filter/> <template/> </del_rec> </dns> </packet> Response Packet Structure The del_rec node of the output XML packet is structured as follows:  The result node is optional. The status node is required.Supported Operations <id>5</id> </filter> </del_rec> </dns> </packet> 231 This request packet deletes DNS records from zone files of all domain aliases and domains. Allowed values: ok | error. The errcode node is optional. It is required if the operation del_rec succeeds and the data set retrieved from the server is not empty. Data type: unsignedInt. It specifies the execution status of the del_rec operation. It is used to return the error code when the del_rec operation fails. the result node is also required.xsd).

<packet version="1. Data type: integer.0"> <dns> <del_rec> <filter> <id>75</id> </filter> </del_rec> </dns> </packet> The positive response from the server looks as follows: <packet version="1. Returns the unique identifier of the DNS record. The id node is required if the del_rec operation has succeeded.4.2. the response from the server looks as follows: <packet version="1.4.0"> <dns> <del_rec> <result> <status>error</status> <errcode>1013</errcode> <errtext>DNS record does not exist. It is used to return the error message if the del_rec operation fails.2.Supported Operations 232   The errtext node is optional. Data type: string.</errtext> <id>75</id> </result> </del_rec> </dns> </packet> .0"> <dns> <del_rec> <result> <status>ok</status> <id>75</id> </result> </del_rec> </dns> </packet> If the DNS record with ID 75 was not found on the server. the id node is also required. Response Samples Deleting a single DNS record This request packet deletes DNS record with ID 75.2.4. If the id was set as a filtering rule in the request packet.

0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> </filter> </del_rec> <del_rec> <filter> <id>5</id> </filter> </del_rec> </dns> </packet> ] Three DNS records for the domain alias were deleted.2.Supported Operations 233 Deleting multiple DNS records This request packet deletes DNS records for the domain ID 7 and the record with ID 5.2.4.4. A response packet can look as follows: <packet version="1.0"> <dns> <del_rec> <result> <status>ok</status> <id>17</id> </result> <result> <status>ok</status> <id>18</id> </result> <result> <status>ok</status> <id>19</id> </result> </del_rec> <del_rec/> </dns> </packet> . The record with ID 5 was not found on the server. <packet version="1.

It is required in case when the get_acl operation has succeeded. use the get_acl operation.2. The errcode node is optional. The status node is required. Data type: resultType (common.    .4.0"> <dns> <get_acl/> </dns> </packet> Response Packet Structure The get_acl operation in a response packet has the following graphics presentation:  The result node is optional.Supported Operations 234 Managing ACL The Access Control List (ACL) is a concept in computer security used to enforce privilege separation. The get_acl operation in a request packet has the following graphics presentation: Data type: none. It specifies the execution status of the get_acl operation. Data type: unsignedInt. Data type: string. Retrieving ACL To retrieve the ACL of your name server. You can define the hosts which can perform operations on your name server. The errtext node is optional. It is used to return the error code when the get_acl operation fails. Request packet sample <packet version="1. Allowed values: ok | error. or when an error (if it occurred) was not of a system type. Data type: string.xsd). It is used to return the error message if the get_acl operation fails.

2. It specifies the filtering rule. You can add multiple hosts to ACL using a single packet.0. For more information.2.2. Returns the IP address or name of hosts from ACL. Request Packet Structure A request XML packet adding a new host to the ACL includes the add_to_acl operation node: <packet version="1. the response packet looks as follows: <packet version="1. Data type: string. Response Samples A response packet can look as follows: <packet version="1. It is required if the del_acl operation has succeeded.0"> <dns> <get_acl> <result> <status>ok</status> </result> </get_acl> </dns> </packet> Adding Hosts to ACL To add a new host to the ACL of your name server.xsd).2</host> </result> </get_acl> </dns> </packet> If the ACL list is empty.0.4.0. use the add_to_acl operation. Data type: aclFilter (dns_input. .0.1</host> </result> <result> <status>ok</status> <host>127.Supported Operations 235  The host node is optional.4.0"> <dns> <get_acl> <result> <status>ok</status> <host>127. refer to the Filtering Issues (see page 214) section.0"> <dns> <add_to_acl> … </add_to_acl> </dns> </packet> The graphical representation of the add_to_acl node is as follows:  The filter node is required.4.

xsd).168.56 to the ACL.16.168.56</host> </filter> </add_to_acl> </dns> </packet> Response Packet Structure The add_to_acl node of the output XML packet is structured as follows:    The result node is optional. The errcode node is optional.4.34.4.56 to the ACL.34. Allowed values: ok | error. It specifies the execution status of the get_acl operation.Supported Operations 236 You can add multiple hosts to the ACL in a single packet using filters.2.56</host> <host>12.34. Data type: string. Request Samples This packet adds host 192.168.34.56 and 12.0"> <dns> <add_to_acl> <filter> <host>192. Data type: resultType (common. <packet version="1.2.34.16. . Add as many host parameters to the filter node as the number of hosts you want to add to the ACL. It is required in case when an error (if it occurred) was not of a system type. <packet version="1. The status node is required.168.34. It is used to return the error code when the get_acl operation fails.0"> <dns> <add_to_acl> <filter> <host>192.56</host> </filter> </add_to_acl> </dns> </packet> This packet adds hosts 192. Data type: unsignedInt.

4.56 to the ACL.168.2.34.</errtext> </result> </add_to_acl> </dns> </packet> Adding a single host to ACL This request packet adds host 192.34. It is required in case when an error (if it occurred) was not of a common type.0"> <dns> <add_to_acl> <filter> <host>192.168.34.56</host> </filter> </add_to_acl> </dns> </packet> The positive response from the server looks as follows: <packet version="1. Response Samples Adding a single host to ACL This request packet adds host 192.0.34.2.0"> <dns> <add_to_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 127. <packet version="1. Data type: string.168. It is used to return the error message if the get_acl operation fails.168. The host node is optional. Data type: string.4.Supported Operations 237   The errtext node is optional. <packet version="1.2.0"> <dns> <add_to_acl> <filter> <host>192.0"> <dns> <add_to_acl> <result> <status>ok</status> <host>192.2.34.4.56</host> </result> </add_to_acl> </dns> </packet> A negative response from the server can look as follows: <packet version="1.56</host> </filter> .56 to the ACL two times.168.4. Returns the IP address or name of hosts from the ACL.1 already exists.0.

Request Packet Structure A request XML packet removing a host from the ACL includes the remove_from_acl operation node: <packet version="1. Data type: aclFilter (dns_input.2. use the remove_from_acl operation.168.34.4. It specifies the filtering rule.4.34. . refer to the Filtering Issues (see page 214) section.</errtext> </result> </add_to_acl> </dns> </packet> Removing Host From ACL To remove a host from the ACL of your name server.2.168.56 already exists.34.0"> <dns> <remove_from_acl> … </remove_from_acl> </dns> </packet> The graphical representation of the remove_from_acl node is as follows:  The filter node is required. You can remove multiple hosts from the ACL using a single packet.168. For more information.56</host> </filter> </add_to_acl> </dns> </packet> 238 A response from the server can look as follows: <packet version="1.xsd).56</host> </result> </add_to_acl> <add_to_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.0"> <dns> <add_to_acl> <result> <status>ok</status> <host>192.Supported Operations </add_to_acl> <add_to_acl> <filter> <host>192.

16.34. Data type: resultType (common. <packet version="1.34.34. The status node is required.0"> <dns> <remove_from_acl> <filter> <host>192. For more information about common errors.168.4.34.56 from the ACL.2.168. It is required in case when an error (if it occurred) was not of a common type.56</host> </filter> </remove_from_acl> </dns> </packet> This packet removes hosts 192. Allowed values: ok | error.0"> <dns> <remove_from_acl> <filter> <host>192.56</host> <host>12. Data type: string.34.56</host> </filter> </remove_from_acl> </dns> </packet> Response Packet Structure The remove_from_acl node of the output XML packet is structured as follows:  The result node is optional. Request Samples This packet removes host 192.168.  .56 and 12.xsd). It specifies the execution status of the remove_from_acl operation.168.Supported Operations 239 You can remove multiple hosts from the ACL in a single packet using filters. refer to the Common Errors (see page 992) section. <packet version="1.2.4.56 from the ACL. Add as many host parameters to the filter node as the number of hosts you want to remove from ACL.34.16.

</errtext> </result> </remove_from_acl> </dns> </packet> .34. It is used to return the error message if the remove_from_acl operation fails. The host node is optional.34.0"> <dns> <remove_from_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.56</host> </result> </remove_from_acl> </dns> </packet> A negative response from the server can look as follows: <packet version="1. Data type: string. Response Samples Removing a single host to ACL This request packet removes host 192. <packet version="1.Supported Operations 240    The errcode node is optional.34.168.4. It is used to return the error code when the remove_from_acl operation fails.56</host> </filter> </remove_from_acl> </dns> </packet> The positive response from the server looks as follows: <packet version="1.168. It is required in case an error (if it was) was not of a common type.0"> <dns> <remove_from_acl> <result> <status>ok</status> <host>192.56 does not exists. Returns the IP address or name of hosts from the ACL.168.0"> <dns> <remove_from_acl> <filter> <host>192.168. The errtext node is optional.34.2.56 from the ACL.4. Data type: unsignedInt.4. Data type: string.2.2.

</errtext> </result> </remove_from_acl> </dns> </packet> .34.168.168.2. <packet version="1.0"> <dns> <remove_from_acl> <result> <status>ok</status> <host>192.34.56</host> </result> </remove_from_acl> <remove_from_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.4.56 to the ACL two times.0"> <dns> <remove_from_acl> <filter> <host>192.56</host> </filter> </remove_from_acl> <remove_from_acl> <filter> <host>192.168.34.56 already exists.56</host> </filter> </remove_from_acl> </dns> </packet> A response from the server can look as follows: <packet version="1.34.4.34.Supported Operations 241 Removing a single host to ACL This request packet adds host 192.2.168.168.

This type has the following graphics representation:   The ttl node is optional. The zone status is the status of DNS service for the specified zone. RFC 1912 recommends 1209600 to 2419200 seconds (2-4 weeks) to allow for major outages of the master. This is the time (in seconds) a slave (secondary) DNS server waits before retrying a failed zone transfer. it will retry every retry period but continue to supply authoritative data for the zone until the expiry value is reached. Thus when the ref values expires the slave will attempt to read the SOA record for the zone . If the slave fails to contact the master.   . Data type: unsignedInt. BIND9 slaves stop responding to queries for the zone when this time has expired and no contact has been made with the master. This time is typically less than the refresh interval. Data type: integer. Applies to Slaves or Secondaries servers only. If you do not specify the zone. If contact is made the expiry and refresh values are reset and the cycle starts again.xsd). Indicates when the zone data is no longer authoritative. This is the amount of time (in seconds) that slave DNS servers should store the record in a cache. Plesk sets the default value of one hour. The expire node is optional. Data type: unsignedInt. Signed 32-bit value in seconds. Typical values vary from 180 (three minutes) to 900(15 minutes). This is how often (in seconds) the slave name servers check with the primary name server to see if any changes have been made to the domain's zone file. Data type: unsignedInt. The refresh node is optional. Plesk sets the default value of one week. at which point it will stop answering queries for the domain. Plesk sets the default value of three hours. SOA Parameters The soa node is presented by type SOAType (plesk_dns. Plesk sets the default value of one day. Data type: unsignedInt.and request a zone transfer AXFR/ IXFR if the sn has changed. Use the 1200 value if your data is volatile and 43200 if not. The retry node is optional. The SOA resource record indicates that this DNS name server is the best source of information for the data within this DNS domain. the status of the local DNS server is returned.Supported Operations 242 Managing SOA Records and Zone Parameters The first resource record in any Domain Name System (DNS) Zone file should be a Start of Authority (SOA) resource record. RFC 1912 recommends to vary this parameter from 1200 to 43200.

<dns> <set> … </set> . Updating SOA Record Use the set operation to update a SOA record for the DNS zone template. For more information about SOA records. Data type: SOAType (plesk_dns. The maximum value allowed by BIND 9 for this parameter is 3 hours (10800 seconds).xsd).0"> <dns> <set> … </set> </dns> </packet> The graphical representation of the set node is as follows:  The filter node is optional.4. Data type: unsignedInt. The parameters in the SOA record of the zone template will be applied to a new domain or domain alias on creation..xsd).Supported Operations 243  The minimum node is optional. Note: The set operation is supported starting with API RPC protocol v. or for the domain (domain alias) specified by ID.4. refer to the SOA preferences (see page 242) section. It specifies the filtering rule.1. the operation will update SOA parameters for the DNS zone template. The soa node is required. For more information.  Note: If you omit the filter node. You can update multiple SOA records in a single packet.2. This is the time (in seconds) during which a secondary server should cache a negative response. Add as many set operations as the number of different filtering rules. Specifies the SOA parameters. Plesk sets the default value of three hours.0. Request Packet Structure A request XML packet updating a SOA record includes the set operation node: <packet version="1.0. Data type: simpleFilterType (dns_input.. You can update multiple SOA records in a single packet. refer to the Filtering Issues (see page 214) section. <set> … </set> </dns> .

<packet version="1.2.4.0"> <dns> <set> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> Updating multiple SOA records This packet updates SOA records of the domains with ID 12 and 13. <packet version="1.2.4.4.0"> <dns> <set> <filter> <domain_id>12</domain_id> <domain_id>13</domain_id> </filter> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> .2.0"> <dns> <set> <filter> <domain_id>12</domain_id> </filter> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> This packet updates a SOA record of the DNS zone template.Supported Operations 244 Request Samples Updating a single SOA record This packet updates a SOA record of the domain with ID 12. <packet version="1.

Allowed values: ok | error. Data type: string. It is required in case when an error (if it occurred) was not of a system type. <packet version="1.xsd).Supported Operations </set> </dns> </packet> 245 This packet updates SOA records of the domains with ID 5 and ID 7 and the server template SOA record.2. It specifies the execution status of the set operation.4.0"> <dns> <set> <filter> <domain_id>5</domain_id> </filter> <soa> <ttl>8640</ttl> <refresh>1080</refresh> <retry>3600</retry> <expire>60480</expire> <minimum>1080</minimum> </soa> </set> <set> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:   The result node is optional. . The status node is required. Data type: resultType (common.

The errtext node is optional.0"> <dns> <set> <filter> <domain_id>12</domain_id> </filter> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> The positive response from the server looks as follows: <packet version="1. The domain_alias_id node is optional.4.0"> <dns> <set> <result> <status>error</status> <errcode>1015</errcode> .4. Data type: string. <packet version="1. the negative response looks as follows: <packet version="1. Data type: unsignedInt. Data type: integer.4. Response Samples Updating a single SOA record This request packet updates a SOA record of the domain with ID 12. It is used to return the error code when the set operation fails.Supported Operations 246     The errcode node is optional. The domain_id node is optional.2.2. It is used to return the error message if the set operation fails. Data type: integer. It is required if the domain alias ID was set as a filtering rule in the request packet. It is required if the domain ID was set as a filtering rule in the request packet.2.0"> <dns> <set> <result> <status>ok</status> <domain_id>12</domain_id> </result> </set> </dns> </packet> If the domain with ID 12 was not found on the server.

</errtext> <domain_id>13</domain_id> </result> </set> </dns> </packet> .4.2.2. and the domain with ID 12 was updated.Supported Operations <errtext>Domain does not exist</errtext> <domain_id>12</domain_id> </result> </set> </dns> </packet> 247 Updating multiple SOA records This request packet updates SOA records of the domains with ID 12 and ID 13. <packet version="1.4. the response packet looks as follows: <packet version="1.0"> <dns> <set> <result> <status>ok</status> <domain_id>12</domain_id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain alias does not exist.0"> <dns> <set> <filter> <domain_id>12</domain_id> <domain_id>13</domain_id> </filter> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> If the domain with ID 13 was not found on the server.

If you want to change the type of zone. zone status of a domain or domain alias . the SOA parameters will be returned in the response packet.0"> <dns> <get> … </get> </dns> </packet> The graphical representation of the get node is as follows:  The filter node is optional. Note: The support of the get operation is started since 1. it can act as a "primary" or "slave" name server.2.xsd).0. please refer to the Switching Name Server Mode (see page 254) section. SOA present Filter present SOA record. Data type: simpleFilterType (dns_input. zone type. The soa node is required. if either filter or soa node is omitted. Data type: none. If specified. refer to the Filtering Issues (see page 214) section.  The following table shows the response parameters.Supported Operations 248 Retrieving Parameters of SOA Record and Zone Use the get operation to perform the following:   retrieve SOA record. zone type. For more information. SOA record of the server template SOA omitted zone type. Request Packet Structure A request XML packet retrieving a SOA record includes the get operation node: <packet version="1. It specifies the filtering rule.4. zone status of the server template Local DNS server can be enabled (see page 271) or disabled (see page 274) for the specified zone. zone status of the zone specified by domain or domain alias ID retrieve SOA record.0 version of API RPC protocol. zone status of a domain or alias Filter omitted zone status. When it is enabled.4.

.2. <packet version="1.4.2.4. and zone status of the domain with ID 1. <packet version="1. <packet version="1..Supported Operations 249 You can retrieve the parameters of multiple domains or domain aliases in a single packet. Add as many get operations as the number of different filtering rules.2. zone type.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> <soa/> </get> </dns> </packet> This packet retrieves the SOA record of the server template and the status of the DNS server. <dns> <get> … </get> . <get> … </get> </dns> Request Samples This packet retrieves a zone type and zone status of the domain with ID 1.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> </get> </dns> </packet> This packet retrieves the SOA record.4.0"> <dns> <get> <soa/> </get> </dns> </packet> .

4. Data type: resultType (common. Allowed values: ok | error.xsd). It specifies the execution status of the get operation.2. Data type: unsignedInt. .Supported Operations 250 This packet retrieves the following parameters:     the SOA record of the server template the status of the DNS server a zone type of the domain with ID 1 a zone status of the domain with ID 1 <packet version="1.0"> <dns> <get> <soa/> </get> <get> <filter> <domain_id>1</domain_id> </filter> </get> </dns> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:    The result node is required. The status node is required. It is used to return the error code when the get operation fails. Data type: string. The errcode node is optional. It wraps the response from the server.

Data type: string. The domain_alias_id node is optional.4. Data type: integer. Specifies the type of the DNS name server.2.2.2. Specifies the status of the local DNS name server. Data type: string.4. The zone_type is optional. The zone_status is optional. It is required if the domain alias ID was set as a filtering rule in the request packet.0"> <dns> <get> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> . <packet version="1.  Response Samples This request packet retrieves the zone type and zone status of the domain with ID 1. It is required if the get operation succeeds. Allowed values: master | slave. The soa node is optional. It is used to return the error message if the set operation fails.Supported Operations 251      The errtext node is optional. It is required if the soa node was specified in the request packet. Data type: integer. Data type: string.4.xsd). It is required if the filter node was specified in the request packet.0"> <dns> <get> <result> <status>ok</status> <domain_id>1</domain_id> <zone_type>master</zone_type> <zone_status>enabled</zone_status> </result> </get> </dns> </packet> A negative response from the server can look as follows: <packet version="1. Allowed values: enabled | disabled.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> </get> </dns> </packet> A positive response from the server can look as follows: <packet version="1. It is required if the domain ID was set as a filtering rule in the request packet. Data type: SOAType (plesk_dns. The domain_id node is optional.

4. <packet version="1. and zone status of the domain with ID 2 and domain alias with ID 1.0"> <dns> <get> <filter> <domain_alias_id>1</domain_alias_id> </filter> </get> <get> <filter> <domain_id>2</domain_id> </filter> </get> </dns> </packet> .4.2. and zone status of the domain with ID 1.2.2.4. zone type.0"> <dns> <get> <result> <status>ok</status> <domain_id>1</domain_id> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> <zone_type>master</zone_type> <zone_status>enabled</zone_status> </result> </get> </dns> </packet> This request packet retrieves a zone type. <packet version="1.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> <soa/> </get> </dns> </packet> A possible response from the server can look as follows: <packet version="1.Supported Operations <domain_id>1</domain_id> </result> </get> </dns> 252 This request packet retrieves the SOA record.

2.0"> <dns> <get> <result> <status>ok</status> <domain__alias_id>1</domain_alias_id> <zone_type>master</zone_type> <zone_status>enabled</zone_status> </result> </get> <get> <result> <status>ok</status> <domain_id>2</domain_id> <zone_type>master</zone_type> <zone_status>enabled</zone_status> </result> </get> </dns> </packet> .Supported Operations 253 The positive response from the server looks as follows: <packet version="1.4.

2. Data type: string. you use to change the mode of name servers you need.1.  You can change mode of multiple name servers in a single packet. Note: The switch operation is supported starting with API RPC protocol v.4. It specifies the filtering rule.4. Allowed values: master | slave. Specifies the zone parameters.. Request Packet Structure A request XML packet changing name server mode includes the switch operation node: <packet version="1. Add as many switch operations as the number of different filtering rules.Supported Operations 254 Managing Name Servers Name servers are defined by domain or domain alias ID.. The zone_type node is required. Data type: simpleFilterType (dns_input. <dns> <switch> … </switch> . Switching Name Server Mode To switch a name server between master and slave mode. They can be primary or secondary for the zone they manage.0"> <dns> <switch> … </switch> </dns> </packet> The graphical representation of the switch node is as follows:  The filter node is required. For more information.0. To retrieve the zone type. refer to the Retrieving Parameters of SOA Record and Zone (see page 248) section.0.xsd). Secondary name servers are used when you turn the primary name server to slave mode. You can switch multiple name servers in a single packet. refer to the Filtering Issues (see page 214) section. use the switch operation. <switch> … </switch> </dns> .

0"> <dns> <switch> <filter> <domain_id>1</domain_id> <domain_id>2</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> This packet performs the following:   makes the name server for the zone specified by domain ID 1 act as a primary name server makes the name server for the zone specified by domain ID 2 act as secondary name server <packet version="1.0"> <dns> <switch> <filter> <domain_id>1</domain_id> </filter> <zone_type>master</zone_type> </switch> <switch> <filter> <domain_id>2</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> . <packet version="1.0"> <dns> <switch> <filter> <domain_id>1</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> Changing status of multiple name servers This packet makes the name server for the zones specified by domains ID 1 and ID 2 act as a secondary.2.4. <packet version="1.4.2.Supported Operations 255 Request Samples Changing status of a single name server This packet makes the name server for the zone specified by domain ID 1 act as a secondary.4.2.

It is used to return the error message if the switch operation fails. The status node is required. Data type: integer.2. Data type: integer.Supported Operations 256 Response Packet Structure The switch node of the output XML packet is structured as follows:       The result node is required. It wraps the response from the server. It is required if the domain alias ID was set as a filtering rule in the request packet. The domain_id node is optional. It specifies the execution status of the get operation. The errcode node is optional. It is required if the domain ID was set as a filtering rule in the request packet. Response Samples Changing status of a single name server This request packet makes the DNS server act as a secondary for the zone specified by domain ID 1. Data type: unsignedInt The errtext node is optional. Data type: resultType (common. It is used to return the error code when the switch operation fails. Allowed values: ok | error.0"> <dns> <switch> <filter> <domain_id>1</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> . The domain_alias_id node is optional.xsd). Data type: string. Data type: string. <packet version="1.4.

4.4.2.0"> <dns> <switch> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <domain_id>1</domain_id> </result> </switch> </dns> </packet> Changing status of multiple name servers This packet makes the DNS server act as a secondary for the zones specified by domains ID 1 and ID 2.2.0"> <dns> <switch> <result> <status>ok</status> <domain_id>1</domain_id> </result> <result> .2.0"> <dns> <switch> <filter> <domain_id>1</domain_id> <domain_id>2</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> A response packet from the server can look as follows: <packet version="1.Supported Operations 257 The positive response from the server looks as follows: <packet version="1.4. <packet version="1.0"> <dns> <switch> <result> <status>ok</status> <domain_id>1</domain_id> </result> </switch> </dns> </packet> A negative response from the server can look as follows: <packet version="1.4.2.

The domain_alias_id node is required. You can add multiple primary servers in a single packet. Specifies the ID of the domain. Specifies the ID of the domain alias.Supported Operations <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <domain_id>2</domain_id> </result> </switch> </dns> </packet> 258 Adding Primary Name Server Use the add_master_server operation to add a primary name server. The ip_address node is required. Data type: integer. Data type: integer.2. You can add multiple primary name servers in a single packet.4. Add as many add_master_server operations as the number of different servers you want to add.0.0.0"> <dns> <add_master_server> … </add_master_server> </dns> </packet> The graphical representation of the add_master_server node is as follows:    The domain_id node is required. <dns> <add_master_server> … </add_master_server> .1. This server will be primary for the zone specified by the domain ID or domain alias ID. Specifies the IP address of a primary name server. Request Packet Structure A request XML packet adding a primary name server includes the add_master_server operation node: <packet version="1. Note: The add_master_server operation is supported starting with API RPC protocol v. which zone will be served by the primary name server. which zone will be served by the primary name server.4. Data type: integer.

0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10.2. <add_master_server> … </add_master_server> </dns> 259 Request Samples Adding a single primary name server This packet adds a primary name server to the zone of the domain with ID 5.18</ip_address> </add_master_server> <add_master_server> <domain_id>7</domain_id> <ip_address>10.18</ip_address> </add_master_server> </dns> </packet> Response Packet Structure The add_master_server node of the output XML packet is structured as follows:  The result node is required.xsd). Data type: resultType (common. ..6.45.18</ip_address> </add_master_server> </dns> </packet> Adding multiple primary name servers This packet adds a primary name server to the zone of the domain with ID 5 and ID 7. It wraps the response from the server.2.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10. <packet version="1.45.6. <packet version="1.4..45.6.4.Supported Operations .

2.4.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10. It is required if the operation add_master_server has succeeded.2. the response looks as follows: <packet version="1. It is used to return the error message if the add_master_server operation fails.0"> <dns> <add_master_server> <result> <status>error</status> <errcode>1014</errcode> <errtext>Parser error: Cannot parse the XML from the source specified</errtext> <id>4</id> </result> </add_master_server> </dns> </packet> .0"> <dns> <add_master_server> <result> <status>ok</status> <id>4</id> </result> </add_master_server> </dns> </packet> If the IP address parameter has invalid format. Data type: unsignedInt. Data type: integer.4. Data type: string. Data type: string. <packet version="1.2.Supported Operations 260     The status node is required. Allowed values: ok | error. Response Samples Adding a single primary name server This request packet adds a primary name server to the zone of the domain with ID 5. It specifies the execution status of the add_master_server operation.6. The errtext node is optional. Returns the ID of the primary name server in Plesk database. The errcode node is optional. The id node is optional.18</ip_address> </add_master_server> </dns> </packet> A positive response from the server can look as follows: <packet version="1.45. It is used to return the error code when the add_master_server operation fails.4.

Supported Operations 261 If the domain specified by the ID was not found on the server.6.2.6.0"> <dns> <add_master_server> <result> <status>ok</status> <id>4</id> </result> </add_master_server> <add_master_server> <result> <status>ok</status> <id>5</id> </result> </add_master_server> </dns> </packet> .45.45.4. <packet version="1.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10.2.18</ip_address> </add_master_server> <add_master_server> <domain_id>7</domain_id> <ip_address>10. the response looks as follows: <packet version="1.4.2.4.0"> <dns> <add_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.</errtext> <id>4</id> </result> </add_master_server> </dns> </packet> Adding multiple primary name servers This request packet adds a primary name server to the zone of the domain with ID 5 and ID 7.18</ip_address> </add_master_server> </dns> </packet> A possible response from the server can look as follows: <packet version="1.

0"> <dns> <get_master_server> … </get_master_server> </dns> </packet> The graphical representation of the get_master_server node is as follows:  The filter node is required. For more information.4.0"> <dns> <get_master_server> <filter><id>5</id></filter> </get_master_server> . <dns> <get_master_server> … </get_master_server> . Data type: dnsSelectionFilterType (dns_input.0.0..1. Note: If the filter node is left blank (<filter/>). <get_master_server> … </get_master_server> </dns> Request Samples Retrieving a single name server This packet retrieves the IP address of the primary name server with ID 5.. You can retrieve multiple primary name servers in a single packet. Note: The get_master_server operation is supported starting with API RPC protocol v. You can retrieve multiple primary servers in a single packet. refer to the Filtering Issues (see page 215) section. <packet version="1. Request Packet Structure A request XML packet retrieving a primary name server includes the get_master_server operation node: <packet version="1.2. the operation will retrieve all primary name servers available for a packet sender on the server.2.4. Add as many get_master_server operations as the number of different filtering rules you use.Supported Operations 262 Retrieving Primary Name Servers Use the get_master_server operation to retrieve IP addresses of the primary name servers for the specified zone. It specifies the filtering rule.4.xsd).

0"> <dns> <get_master_server> <filter/> </get_master_server> </dns> </packet> .4. <packet version="1.4. <packet version="1. <packet version="1.2.2.Supported Operations </dns> </packet> 263 Retrieving multiple name servers This packet retrieves primary name servers for the zones specified by domain ID 5 and ID 6.0"> <dns> <get_master_server> <filter> <domain_id>5</domain_id> </filter> </get_master_server> <get_master_server> <filter> <domain_alias_id>6</domain_alias_id> </filter> </get_master_server> </dns> </packet> This packet retrieves all primary name servers on the server available for a packet sender.4..2.0"> <dns> <get_master_server> <filter> <domain_id>5</domain_id> <domain_id>5</domain_id> </filter> </get_master_server> </dns> </packet> This packet retrieves primary name servers for the zones specified by domain ID 5 and domain alias ID 6.

Data type: string. The status node is required. The domain_id node is required. Data type: integer. It is used to return the error code when the get_master_server operation fails. Returns the ID of the primary name server in Plesk database. For info on filters. The ip_address node is required. which zone will be served by the primary name server. Specifies the IP address of a primary name server.xsd). which zone will be served by the primary name server. Data type: integer.Supported Operations 264 Response Packet Structure The get_master_server node of the output XML packet is structured as follows:      The result node is required. Data type: integer. The id node is optional. It wraps the response from the server. Specifies the ID of the domain. Specifies the ID of the domain alias. It holds the filtering rule parameter.     . Allowed values: ok | error. The domain_alias_id node is required. Data type: resultFilterType (common. It specifies the execution status of the get_master_server operation. Data type: unsignedInt The errtext node is optional. Data type: string. It is used to return the error message if the get_master_server operation fails. Data type: integer. Data type: integer. The errcode node is optional. The filter-id node is optional. refer to the Filtering Issues (see page 213) section. It is required if the operation get_master_server has succeeded.

2.4. the response can look as follows: <packet version="1.0"> <dns> <get_master_server> <result> <status>ok</status> <filter-id>5</filter-id> <id>5</id> <domain_id>1</domain_id> <ip_address>115.4.0"> <dns> <get_master_server> <result> <status>error</status> <errcode>1013</errcode> <errtext>Master server is not found. <packet version="1. the response can look as follows: <packet version="1.17.0"> <dns> <get_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist. ID : 5</errtext> </result> </get_master_server> </dns> </packet> If the domain specified by the ID was not found.0"> <dns> <get_master_server> <filter><id>5</id></filter> </get_master_server> </dns> </packet> A positive response from the server can look as follows: <packet version="1.4.2.</errtext> </result> </get_master_server> </dns> </packet> .16.4.2.18</ip_address> </result> </get_master_server> </dns> </packet> If the name server specified by the ID was not found.2.Supported Operations 265 Response Samples Retrieving a single name server This packet retrieves the IP address of the primary name server with ID 5.

4.18</ip_address> </result> <result> <status>ok</status> <filter-id>6</filter-id> <id>28</id> <domain_id>6</domain_id> <ip_address>10.4.17.16.16.18</ip_address> </result> </get_master_server> <get_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain alias does not exist.17. <packet version="1.18</ip_address> </result> <result> <status>ok</status> <filter-id>5</filter-id> <id>16</id> <domain_id>5</domain_id> <ip_address>11.0"> <dns> <get_master_server> <filter> <domain_id>5</domain_id> <domain_id>6</domain_id> </filter> </get_master_server> <get_master_server> <filter> <domain_alias_id>16</domain_alias_id> </filter> </get_master_server> </dns> </packet> Two primary servers on domain with ID 5. and domain alias ID 16.0"> <dns> <get_master_server> <result> <status>ok</status> <filter-id>5</filter-id> <id>15</id> <domain_id>5</domain_id> <ip_address>15.</errtext> </result> </get_master_server> </dns> </packet> . A possible response from the server can look as follows: <packet version="1.2. one on the domain with ID 6 are found.17. The domain alias with ID 16 was not found on the server.2.Supported Operations 266 Retrieving multiple name servers This packet retrieves primary name servers for the zones specified by domain ID 5 and ID 6.6.

<del_master_server> … </del_master_server> </dns> Request Samples Deleting a single name server This packet removes the primary name server specified by ID 5.Supported Operations 267 Deleting Primary Name Servers Use the del_master_server operation to delete primary name servers from the specified zone..2.4.4.. Note: If the filter node is left blank (<filter/>). Request Packet Structure A request XML packet deleting a primary name server includes the del_master_server operation node: <packet version="1. refer to the Filtering Issues (see page 215) section. For more information. Add as many del_master_server operations as the number of different filtering rules you use.0. Note: The del_master_server operation is supported starting with API RPC protocol v. You can delete multiple primary servers in a single packet. Data type: dnsSelectionFilterType (dns_input.2. <packet version="1.xsd). the operation removes all primary name servers available for a packet sender on the server.0"> <dns> <del_master_server> <filter><id>5</id></filter> .4.0. It specifies the filtering rule.1. <dns> <del_master_server> … </del_master_server> . You can delete multiple primary name servers in a single packet.0"> <dns> <del_master_server> … </del_master_server> </dns> </packet> The graphical representation of the del_master_server node is as follows:  The filter node is required.

Allowed values: ok | error. It wraps the response from the server. <packet version="1.2.0"> <dns> <del_master_server> <filter> <domain_id>5</domain_id> <domain_id>5</domain_id> </filter> </del_master_server> </dns> </packet> This packet removes all primary name servers available for a packet sender from Plesk database.4.xsd). Data type: resultFilterType (common.Supported Operations </del_master_server> </dns> </packet> 268 Deleting multiple name servers This packet removes primary name servers for the zones specified by domain ID 5 and ID 6. Data type: unsignedInt The errtext node is optional.0"> <dns> <del_master_server> <filter/> </del_master_server> </dns> </packet> Response Packet Structure The get_master_server node of the output XML packet is structured as follows:     The result node is required. It is used to return the error code when the del_master_server operation fails.4. The errcode node is optional.2. Data type: string. It is used to return the error message if the del_master_server operation fails. It specifies the execution status of the del_master_server operation. Data type: string. . The status node is required. <packet version="1.

Supported Operations 269  The id node is optional. Data type: integer. ID : 5</errtext> </result> </del_master_server> </dns> </packet> If the domain specified by the ID was not found.4.0"> <dns> <del_master_server> <result> <status>error</status> <errcode>1013</errcode> <errtext>Master server is not found.0"> <dns> <del_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.4. Returns the ID of the primary name server in Plesk database.2. It is required if the operation del_master_server has succeeded.4.0"> <dns> <del_master_server> <result> <status>ok</status> <id>5</id> </result> </del_master_server> </dns> </packet> If the name server specified by the ID was not found.</errtext> .2.4. the response can look as follows: <packet version="1. Response Samples Removing a single name server This packet removes the primary name server specified by ID 5.2. <packet version="1. the response can look as follows: <packet version="1.2.0"> <dns> <del_master_server> <filter><id>5</id></filter> </del_master_server> </dns> </packet> A positive response from the server can look as follows: <packet version="1.

ID : 25</errtext> </result> </del_master_server> </dns> </packet> . and primary server with ID 25.2. A possible response from the server can look as follows: <packet version="1. The primary server with ID 25 was not found on the server. <packet version="1.0"> <dns> <del_master_server> <result> <status>ok</status> <id>15</id> </result> <result> <status>ok</status> <id>16</id> </result> <result> <status>ok</status> <id>28</id> </result> </del_master_server> <del_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Master server is not found.2.4.4.Supported Operations </result> </del_master_server> </dns> </packet> 270 Removing multiple name servers This packet deletes primary name servers for the zones specified by domain ID 5 and ID 6.0"> <dns> <del_master_server> <filter> <domain_id>5</domain_id> <domain_id>6</domain_id> </filter> </del_master_server> <del_master_server> <filter> <id>25</id> </filter> </del_master_server> </dns> </packet> Three primary servers on the domains with ID 5 and ID 6 were removed.

the DNS zone template will change status to "enable".0. Request Packet Structure A request XML packet switching on the local DNS support includes the enable operation node: <packet version="1. will be supported by local DNS. Data type: dnsSelectionFilterType (dns_input.1. which were added according to the template with the enabled status. you can also enable or disable the local DNS support for the DNS zone template.. For more information. <dns> <enable> … </enable> . You can enable the local DNS support for multiple zones. refer to the Filtering Issues (see page 215) section.0.xsd). When the local DNS server is disabled. Note: The enable operation is supported starting with API RPC protocol v. Add as many enable operations as the number of different filtering rules. the zone is served by a remote DNS server. To learn how to retrieve the status information for the local DNS server. With the operation.Supported Operations 271 Managing Local or Remote DNS Servers All zones on the server can be served by local or remote DNS servers.0"> <dns> <enable> … </enable> </dns> </packet> The graphical representation of the enable node is as follows:  The filter node is optional.2. All the domains or domain alias zones. It specifies the filtering rule. You can enable the local DNS support for multiple zones in a single packet. refer to the Managing SOA Records and Zone Parameters (see page 248) section. Enabling Local DNS The enable operation is used to enable local DNS support for the current zone. <enable> … </enable> </dns> .4.4.. If the filter node is omitted.

It wraps the response from the server. It specifies the execution status of the enable operation. Data type: resultOpType (dns_output.0"> <dns> <enable> <filter> <domain_id>8</domain_id> </filter> </enable> </dns> </packet> This packet enables the local DNS for the DNS zone template .2. <packet version="1. <packet version="1. <packet version="1.xsd).0"> <dns> <enable/> </dns> </packet> Response Packet Structure The enable node of the output XML packet is structured as follows:   The result node is required.Supported Operations 272 Request Samples This packet enables the local DNS for the zones specified by domain ID 8 and ID 9.0"> <dns> <enable> <filter> <domain_id>8</domain_id> <domain_id>9</domain_id> </filter> </enable> </dns> </packet> This packet enables the local DNS for the zones specified by domain ID 8.4. Allowed values: ok | error.2.2. The status node is required.4. Data type: string. .4.

Data type: unsignedInt.2. which zone will use local DNS. Specifies the ID of the domain. It is used to return the error message if the enable operation fails. Data type: string.0"> <dns> <enable> <filter> <domain_id>8</domain_id> <domain_id>9</domain_id> </filter> </enable> </dns> </packet> The positive response from the server looks as follows: <packet version="1.0"> <dns> <enable> <result> <status>ok</status> <domain_id>8</domain_id> </result> . Data type: integer. Specifies the ID of the domain alias.2.Supported Operations 273    The errcode node is optional. The domain_alias_id node is optional. It is used to return the error code when the enable operation fails.0"> <dns> <enable> <result> <status>ok</status> <domain_id>8</domain_id> </result> <result> <status>ok</status> <domain_id>9</domain_id> </result> </enable> </dns> </packet> If the second zone was not found on the server. The errtext node is optional.4. <packet version="1. which zone will use local DNS.4. It is required if the domain ID was set as a filtering rule in the response packet.4.  Response Samples This request packet enables the local DNS for the zones specified by domain ID 8 and ID 9.2. the response is as follows: <packet version="1. It is required if the domain ID was set as a filtering rule in the response packet. Data type: integer. The domain_id node is optional.

Add as many disable operations as the number of different filtering rules. Request Packet Structure A request XML packet switching off the local DNS support includes the disable operation node: <packet version="1. you can also disable the local DNS support for the DNS zone template.Supported Operations 274 <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist. <dns> <disable> … </disable> . the DNS zone template will changes status to "disable". refer to the Filtering Issues (see page 215) section.0.xsd).2.. which were added according to the template with the disabled status. With the operation. To learn how to retrieve the status information for the local DNS server.0. All the domains or domain alias zones. will not be supported by local DNS. You can enable the local DNS support for multiple zones in a single packet.</errtext> </result> </enable> </dns> </packet> Disabling Local DNS The disable operation is used to disable the local DNS support for the current zone.4. Note: The disable operation is supported starting with API RPC protocol v.4.. <disable> … </disable> </dns> . For more information. You can disable the local DNS support for multiple zones. refer to the Managing SOA Records and Zone Parameters (see page 248) section. Data type: dnsSelectionFilterType (dns_input. It specifies the filtering rule. If the filter node is omitted.0"> <dns> <disable> … </disable> </dns> </packet> The graphical representation of the disable node is as follows:  The filter node is optional.1.

4. which zone will use local DNS.2. Data type: integer. Data type: unsignedInt. Allowed values: ok | error. It is used to return the error code when the disable operation fails. Data type: string.4.0"> <dns> <disable> <filter> <domain_id>8</domain_id> <domain_id>9</domain_id> </filter> </disable> </dns> </packet> This packet disables the local DNS for the DNS zone template . The errcode node is optional. It specifies the execution status of the disable operation. It is required if the domain ID was set as a filtering rule in the response packet.2. . The domain_id node is optional. The errtext node is optional. Specifies the ID of the domain.Supported Operations 275 Request Samples This packet disables the local DNS for the zones specified by domain ID 8 and ID 9. Data type: resultOpType (dns_output. It is used to return the error message if the disable operation fails. <packet version="1.0"> <dns> <disable/> </dns> </packet> Response Packet Structure The disable node of the output XML packet is structured as follows:      The result node is required. It wraps the response from the server.xsd). The status node is required. Data type: string. <packet version="1.

4.2.Supported Operations 276  The domain_alias_id node is optional.4. <packet version="1.4. Response Samples This request packet disables the local DNS for the zones specified by domain ID 8 and ID 9. the response is as follows: <packet version="1.2. Data type: integer. Specifies the ID of the domain alias.0"> <dns> <disable> <filter> <domain_id>8</domain_id> <domain_id>9</domain_id> </filter> </disable> </dns> </packet> The positive response from the server looks as follows: <packet version="1.0"> <dns> <disable> <result> <status>ok</status> <domain_id>8</domain_id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.0"> <dns> <disable> <result> <status>ok</status> <domain_id>8</domain_id> </result> <result> <status>ok</status> <domain_id>9</domain_id> </result> </disable> </dns> </packet> If the second zone was not found on the server.</errtext> </result> </disable> </dns> </packet> . It is required if the domain ID was set as a filtering rule in the response packet.2. which zone will use local DNS.

0"> <dns> <enable-remote-dns/> </dns> </packet> The graphical representation of the enable-remote-dns node is as follows: Request packet sample This request packet enables use of remote DNS servers. that enables use of remote DNS servers.Supported Operations 277 Enabling Remote DNS Support The enable-remote-dns operation is used to disable the local DNS server.4. It wraps the information got from the server. Data type: resultType (common.xsd).xsd) and is structured as follows:  The result node is required.2.4.0"> <dns> <enable-remote-dns/> </dns> </packet> Response Packet Structure The enable-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output.1.0. A request XML packet.4.1 and next versions.2. includes the enableremote-dns operation node: <packet version="1. and you can use remote DNS servers. This node is available only in Plesk for Windows 8.2. <packet version="1. . Note: The enable-remote-dns operation is supported starting with API RPC protocol v.

Response Samples This request packet enables use of remote DNS servers. the response is as follows: <packet version="1.4. <packet version="1.0"> <dns> <enable-remote-dns> <result> <status>error</status> <errcode>1014</errcode> <errtext>Parser error: Request is invalid</errtext> </result> </enable-remote-dns> </dns> </packet> . Allowed values: ok | error.2. It specifies the execution status of the enable-remote-dns operation. Data type: string.0"> <dns> <enable-remote-dns> <result> <status>ok</status> </result> </enable-remote-dns> </dns> </packet> If the packet is sent to Plesk for Unix server.2. The errtext node is optional.Supported Operations 278    The status node is required.0"> <dns> <enable-remote-dns/> </dns> </packet> The positive response from the server looks as follows: <packet version="1. It is used to return the error message if the enableremote-dns operation fails. Data type: string. The errcode node is optional. It is used to return the error code when the enableremote-dns operation fails. Data type: unsignedInt.4.2.4.

that disables use of remote DNS servers.4.4.0"> <dns> <disable-remote-dns/> </dns> </packet> The graphical representation of the disable-remote-dns node is as follows: Request packet sample This request packet disables use of remote DNS servers. .2. <packet version="1.0"> <dns> <disable-remote-dns/> </dns> </packet> Response Packet Structure The disable-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output.xsd) and is structured as follows:  The result node is required. It wraps the information got from the server.2.1.4.xsd). and you can use the local DNS server.0. Data type: resultType (common. This node is available only in Plesk for Windows 8.Supported Operations 279 Disabling Remote DNS Support The disable-remote-dns operation is used to disable remote DNS servers.1 and next versions. includes the disableremote-dns operation node: <packet version="1.2. Note: The disable-remote-dns operation is supported starting with API RPC protocol v. A request XML packet.

4.2. It is used to return the error code when the enableremote-dns operation fails. Data type: unsignedInt.0"> <dns> <disable-remote-dns/> </dns> </packet> The positive response from the server looks as follows: <packet version="1.4.4. It specifies the execution status of the enable-remote-dns operation. It is used to return the error message if the enableremote-dns operation fails. the response is as follows: <packet version="1. Response Samples This request packet disables use of remote DNS servers.0"> <dns> <disable-remote-dns> <result> <status>error</status> <errcode>1014</errcode> <errtext>Parser error: Request is invalid</errtext> </result> </disable-remote-dns> </dns> </packet> .Supported Operations 280    The status node is required. Data type: string. Allowed values: ok | error.2. <packet version="1. The errtext node is optional.0"> <dns> <disable-remote-dns> <result> <status>ok</status> </result> </disable-remote-dns> </dns> </packet> If the packet is sent to Plesk for Unix server. The errcode node is optional. Data type: string.2.

0"> <dns> <get-status-remote-dns/> </dns> </packet> Response Packet Structure The get-status-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output. <packet version="1.4.2.4.Supported Operations 281 Retrieving Remote DNS Status Remote DNS servers are enabled or disabled.2.0. A request XML packet. all zones are served by the local DNS server. Use the get-status-remote-dns to retrieve the status of remote DNS servers.1 and next versions.xsd) and is structured as follows: . This node is available only in Plesk for Windows 8. includes the get-status-remote-dns operation node: <packet version="1. Note: The get-status-remote-dns operation is supported starting with API RPC protocol v. If remote DNS servers are disabled.4. that retrieves the status of remote DNS servers.0"> <dns> <get-status-remote-dns/> </dns> </packet> The graphical representation of the get-status-remote-dns node is as follows: Request packet sample This request packet retrieves the status of remote DNS servers.1.2.

It wraps the information got from the server. It is required if the operation get-status-remote-dns succeeds.4. Data type: string. Response Samples This request packet retrieves the status of remote DNS servers.Supported Operations 282      The result node is required. The errtext node is optional. Data type: boolean. The status node is required. the response is as follows: <packet version="1. The dns-status node is optional. It is used to return the error message if the get-statusremote-dns operation fails. The errcode node is optional. </result> </get-status-remote-dns> </dns> </packet> If the packet is sent to Plesk for Unix server.0"> <dns> <get-status-remote-dns <result> <status>ok</status> <dns_status>true</dns_status&gt. Data type: unsignedInt.4.xsd).4.2. Allowed values: ok | error. It specifies the execution status of the get-status-remotedns operation. <packet version="1. Data type: string. Data type: resultType (common.2.0"> <dns> <disable-remote-dns> <result> <status>error</status> <errcode>1014</errcode> <errtext>Parser error: Request is invalid</errtext> </result> </disable-remote-dns> </dns> </packet> . It is used to return the error code when the get-statusremote-dns operation fails.2.0"> <dns> <get-status-remote-dns> </dns> </packet> The positive response from the server looks as follows: <packet version="1.

The recursion is allowed for all requests. etc. Four types of recursive requests to the local DNS sever in Plesk are available:     off. localnets.4.1.0.2. The recursion is allowed for requests from local net. Data type: DNSRecursionValueType (plesk_dns. which respond with a referral to the next level DNS servers. Request Packet Structure A request XML packet changing the recursion type includes the set-recursion operation node: <packet version="1. Setting Recursion Type The type of recursion can be changed by the set-recursion operation. The recursion is allowed for requests from local machine. it typically responds immediately with whatever local data it has available at the time without doing any additional processing.xsd) and structured as follows:  The value node is required.2. Note: Not all of the following types can be supported by the server. make sure it is supported by the server. Before setting the recursion type. which respond with a referral to the top level DNS servers. .xsd).0"> <dns> <set-recursion> … </set-recursion> </dns> </packet> The set-recursion node is presented by type DNSSetRecursionInputType (dns_input. Specifies the type of recursion. on. The recursion is not allowed. then asking one of those servers. When a DNS server receives a non-recursive request or a request from a client that it is not willing to perform recursion for. Note: The set-recursion operation is supported starting with API RPC protocol v. localhost. use the get-supported-recursion to make sure it is supported by the server. it will go through the process of resolving the requested domain name by first asking the root servers. Before setting the recursion type.4.Supported Operations 283 Managing DNS Recursion When a DNS server receives a recursive request from a client that it is willing to perform recursion for. Allowed values: on | off | local | localnets.

Allowed values: ok | error.0"> <dns> <set-recursion> <value>on</value> </set-recursion> </dns> </packet> This packet allows recursive requests coming from the local net to the local DNS server.2. It is used to return the error message if the set-recursion operation fails. Data type: string.xsd) and is structured as follows:     The result node is required.xsd). It wraps the information got from the server. <packet version="1. Data type: unsignedInt. The errtext node is optional. The errcode node is optional. The status node is required.Supported Operations 284 Request Samples This packet allows all recursive requests to the local DNS server. It is used to return the error code when the setrecursion operation fails. It specifies the execution status of the set-recursion operation. Data type: string. .0"> <dns> <set-recursion> <value>localnets</value> </set-recursion> </dns> </packet> Response Packet Structure The set-recursion node is presented by type DNSEnableRemoteDNS (dns_output.2. Data type: resultType (common.4.4. <packet version="1.

2.0"> <dns> <set-recursion> <result> <status>error</status> <errcode>4605</errcode> <errtext>Not supported type for DNS recursion</errtext> </result> </set-recursion> </dns> </packet> Retrieving Recursion Type A request XML packet.4.0"> <dns> <get-recursion/> </dns> </packet> The graphical representation of the get-recursion node is as follows: Note: The get-recursion operation is supported starting with API RPC protocol v.0. includes the get-recursion operation node: <packet version="1.2. <packet version="1.2.2. the response is as follows: <packet version="1.2.4.0"> <dns> <set-recursion> <result> <status>ok</status> </result> </set-recursion> </dns> </packet> If the recursion type is not supported by the server. . the response is as follows: <packet version="1.Supported Operations 285 Response Samples This request packet allows all recursive requests to the local DNS server.4.1.0"> <dns> <set-recursion> <value>on</value> </set-recursion> </dns> </packet> If the recursion type is supported by the server. that retrieves a type of recursion.4.4.

xsd) and is structured as follows:      The result node is required. It wraps the information got from the server.4. Allowed values: ok | error. The value node is optional.Supported Operations 286 Request packet sample This request packet retrieves the recursion type. It is used to return the error message if the get-recursion operation fails.0"> <dns> <get-recursion/> </dns> </packet> Response Packet Structure The get-recursion node is presented by type DNSGetRecursionOutputType (dns_output. The errcode node is optional. Data type: string. . It is used to return a type of recursion if the get-recursion operation succeeds. The errtext node is optional. It is used to return the error code when the getrecursion operation fails. Data type: string. It specifies the execution status of the get-recursion operation. Data type: unsignedInt.2. Data type: resultType (common. The status node is required. Data type: string. <packet version="1.xsd).

Request packet sample This request packet retrieves the types of recursive requests supported by the server. that retrieves the supported types of recursion. A request XML packet.Supported Operations 287 Response Samples This request packet retrieves the recursion type. <packet version="1. <packet version="1.4. For more information on types of requests.0"> <dns> <get-recursion> <result> <status>ok</status> <value>on</value> </result> </get-recursion> </dns> </packet> Retrieving Supported Recursion Types The get-supported-recursion operation retrieves the types of recursive requests.4.2.2. supported by the local DNS server.2.0"> <dns> <get-supported-recursion/> </dns> </packet> The graphical representation of the get-supported-recursion node is as follows: Note: The set-recursion operation is supported starting with API RPC protocol v.0"> <dns> <get-supported-recursion/> </dns> </packet> . includes the getsupported-recursion operation node: <packet version="1.0"> <dns> <get-recursion/> </dns> </packet> A response from the server can look as follows: <packet version="1.2.4.4.4.1. please refer to the Managing DNS recursion (see page 283) section.2.0.

Data type: string. It specifies the execution status of the get-supportedrecursion operation.xsd).4. It is used to return the error message if the getsupported-recursion operation fails. It is used to return the supported types of recursion if the get-supported-recursion operation succeeds.2.Supported Operations 288 Response Packet Structure The get-supported-recursion node is presented by type DNSGetSupportedRecursionOutputType (dns_output. The errcode node is optional.4. Data type: resultType (common. <packet version="1.0"> <dns> <get-supported-recursion/> </dns> </packet> A response from the server can look as follows: <packet version="1. Data type: string.2.xsd) and is structured as follows:      The result node is required. The status node is required. Response Samples This request packet retrieves the types of recursive requests supported by the server. It is used to return the error code when the getsupported-recursion operation fails. The errtext node is optional. The value node is optional.0"> <dns> <get-supported-recursion> <result> <status>ok</status> <value>on</value> . Data type: string. It wraps the information got from the server. Allowed values: ok | error. Data type: unsignedInt.

Supported Operations <value>localnets</value> <value>local</value> </result> </get-supported-recursion> </dns> </packet> 289 .

Plesk Administrator can create a domain for any Client registered in Plesk. domain_output. Domain accounts can be created by Plesk users who are allowed to manage domains (Plesk Administrator and Plesk Client). limits on use of Plesk resources. Settings Domain accounts are used to store a collection of domain settings. This domain is visible to/ can be managed by Plesk Administrator and the ‗parent‘ Plesk Client only. Plesk Client Description Adding a new domain in Plesk is equivalent to creating a new domain account. Managing domain accounts includes creating. settings various domain/ Domain Administrator settings. These settings are as follows:          General account information Domain Administrator settings Domain Administrator permissions Hosting settings Limits on use of Plesk resources Disk usage settings Domain statistics settings Domain preferences Performance settings Refer to the Domain Settings (on page 295) section for details. A domain account is created as subordinate to a certain Plesk Client.xsd. and the capabilities of Domain Administrator as well.Supported Operations 290 Managing Domain Accounts Operator: <domain> XML Schema: domain_input. plesk_domain. A domain account holds the information about the domain administrator and various domain settings (hosting settings. performance settings.xsd.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator. while Plesk Client can create a domain for their own needs only. These settings specify various resources at the domain‘s disposal. ). deleting. etc. .

GET (see page 334) gets the getting information on the specified domain(s) from Plesk database. SET (see page 348) sets new preferences. limits. GET_TRAFFIC (see page 361) gets the information about traffic spent by the domain(s) between two dates.       . etc. of the specified domain(s) to Plesk database. CFORM_BUTTONS_LIST (see page 355) gets the list of buttons displayed on the page of the specified domain. SET_TRAFFIC (see page 368) sets the information about traffic spent by the specified domain(s) to the database. DEL (see page 343) deletes the specified domain account(s) from Plesk database. preferences. hosting settings. and domain administrator settings.. limits.Supported Operations 291 Supported operations  ADD (see page 329) creates a new domain account and sets general information.

It specifies the login of Plesk Client who owns requested domains. It specifies id of Plesk Client that owns requested domains.xsd).2. The filter node is presented by the DomainFilterType complex type (domain_input. Data type: string. Data type: integer. Data type: integer. The client_login node is optional. This kind of filtering is allowed for Plesk Administrator only. ‗Individual‘ filtering is allowed for Plesk Administrator and for Plesk Clients (they can manage their own domains only).0”> <domain> <get> <filter> <id>124</id> <id>125</id> <id>127</id> </filter> . The filter allows two kinds of filtering:  Nodes id and domain_name serve to filter one to many domains individually. This data type is structured as follows:     The id node is optional.Supported Operations 292 Filtering Issues Filtering is the way the request packets pick out domains to which the requested operation will be applied. The domain_name node is optional.  Individual filtering The following packet requests hosting settings of three domains specified by their id: <packet version=”1.4. Data type: string. It specifies the domain name. The client_id node is optional. Nodes client_id and client_login serve to filter all domains of a certain Plesk Client (or several) at one stroke. It specifies the domain id.

co.4.4.2.co.uk</domain> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> The following packet is invalid as both the id node and the domain_name node are used in the same filter: <packet version=”1.co.0”> <domain> <get> <filter> <domain_name>advent.co.uk</domain> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> To fix this problem.co.0”> <domain> <get> <filter> <domain_name>advent.uk</domain_name> <id>125</id> <domain_name>talkmore.co.0”> <domain> <get> <filter> <domain_name>advent.4.uk</domain> </filter> <dataset> <hosting/> </dataset> </get> <get> .uk</domain_name> <domain_name>talkmore. use two different <get> sections: <packet version=”1.Supported Operations <dataset> <hosting/> </dataset> </get> </domain> </packet> 293 The following packet is identical except it specifies domains by their names: <packet version=”1.uk</domain_name> <domain_name>freescale.co.uk</domain_name> <domain_name>talkmore.2.2.

4.Supported Operations <filter> <id>125</id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> 294 Bulk filtering The following packet deletes all domains belonging to two Plesk Clients specified by ID: <packet version=”1.2.2.4.0”> <domain> <del> <filter> <client_id>1324</client_id> <client_login>LastClient</client_login> </filter> </del> </domain> </packet> .0”> <domain> <del> <filter> <client_login>FirstClient</client_login> <client_login>LastClient</client_login> </filter> </del> </domain> </packet> The following packet is invalid as it uses both the client_id node and the client_login node within one filter: <packet version=”1.0”> <domain> <del> <filter> <client_id>1324</client_id> <client_id>1325</client_id> </filter> </del> </domain> </packet> The same packet specifies Plesk Clients by login: <packet version=”1.4.2.

it will delete all domains of this Client: <packet version=”1.0”> <domain> <del> <filter/> </del> </domain> </packet> Domain Settings This section describes a collection of domain and Domain Administrator settings.4. If sent by Plesk Client.2. use two different <del> sections: <packet version=”1. These settings are as follows:        General account information (see page 296) Domain Administrator settings (see page 301) Limits.0”> <domain> <del> <filter> <client_id>1324</client_id> </filter> </del> <del> <filter> <client_login>LastClient</client_login> </filter> </del> </domain> </packet> The following packet sent by Plesk Administrator deletes all domains available in Plesk. hosting settings and domain administrator's permissions (see page 305) Disk usage settings (see page 322) Domain statistics settings (see page 324) Domain preferences (see page 326) Performance settings (see page 327) .Supported Operations 295 To fix this packet.4. These settings can be defined when creating a new domain or later. and retrieved from Plesk database as well.2.

updated. It holds the domain name. Data type: string.1. Data type: date. The display_name node is required. It is returned in the gen_info node of type domainGenInfoType (plesk_domain.xsd). this node is structured as follows:    The cr_date node is required. See the structure of this node in the Node gen_info (see page 296) section. . Format: YYYY-MM-DD. See the structure of this node in the Node gen_setup (type SetGenSetupType) (see page 300) section. The name node is required. or read. This is done using the gen_setup node (no data type. General information about the specified domains can be retrieved from Plesk database (the get operation). It is defined by complex type domainGenInfoType (plesk_domain.   Node gen_info (type domainGenInfoType) This node is used in the get response packets. It holds the creation date of the specified domain.xsd) and holds a collection of common domain settings.xsd).  General domain information is always set when creating a domain account (the add operation). defined within the add operation node). This is done using the gen_setup node of type SetGenSetupType (plesk_domain. General domain information can be updated/modified (the set operation).2 and earlier. It holds the domain name displayed in Plesk GUI. Data type: string.4. In API RPC 1.Supported Operations 296 General Account Information General domain information can be added. See the structure of this node in the Node gen_setup (see page 299) section.

The real_size node is required. The htype node is required. It holds the domain's IP address shown in the DNS record.co. Data type: unsignedLong.     The following packet with general domain information can be received from Plesk server: <packet version=”1.alterzone.1. The client_id node is required.Supported Operations 297  The status node is required.uk</name> <display_name>www. It holds the actual size of the domain (in bytes). Data type: objectStatus (plesk_common.xsd). Allowed values: vrt_hst | std_fwd | frm_fwd | none. It specifies the type of hosting set on the domain. Data type: integer.co.13. It holds the current status of the specified domain.4.uk</display_name> <status>256</status> <real_size>54687742156789</real_size> <client_id>111</client_id> <dns_ip_address>123. It holds the identifier of Plesk Client who owns this domain account. Data type: string. Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk Client) | 256 (expired).xsd).123.2”> <domain> <get> <result> <status>ok</status> <id>1234</id> <data> <gen_info> <cr_date>2000-12-12</cr_date> <name>alterzone. Data type: ip_address (common.123</dns_ip_address> <htype>vrt_hst</htype> </gen_info> </data> </result> </get> </domain> </packet> . The dns_ip_address node is optional.

It holds the domain's IP address shown in the DNS record. The ascii-name node is required. Allowed values: vrt_hst | std_fwd | frm_fwd | none.0. Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk Client) | 256 (expired).xsd). It holds the domain name displayed in Plesk GUI. Format: YYYY-MM-DD. The name node is required.2.     The following packet with general domain information can be received from Plesk server if API RPC 1. The htype node is required. The client_id node is required.0”> <domain> <get> <result> <status>ok</status> .xsd).Supported Operations 298 Starting from API RPC 1. It holds the current status of the specified domain. It holds the actual size of the domain (in bytes). It holds the domain name in ASCII format. Data type: string.4.2. It specifies the type of hosting set on the domain. Data type: objectStatus (plesk_common.4. Data type: date. The status node is required. The dns_ip_address node is optional. It holds the creation date of the specified domain.0 is used: <packet version=”1. the gen_info node has got some changes as follows:   The display_name node is now called name The name node was renamed into ascii-name     The cr_date node is required. Data type: ip_address (common. Data type: string. Data type: integer.2. It holds the identifier of Plesk Client who owns this domain account. The real_size node is required.4. Data type: string. Data type: unsignedLong.

0: The response contains the filtering parameter (the filter-id node).2. If the domain account is created by Plesk Client.alterzone. The client_id node is optional. Data type: string. Note that the earlier versions of API RPC protocol do not support this feature. standard forwarding.13. none. The htype node is optional. This node does not have its own type.123</dns_ip_address> <htype>vrt_hst</htype> </gen_info> </data> </result> </get> </domain> </packet> 299 This packet is specific for API RPC 1.co. Note: If you specify this node. Data type: integer.alterzone. Data type: string.4. .uk</ascii-name> <status>256</status> <real_size>54687742156789</real_size> <client_id>111</client_id> <dns_ip_address>123. so the filter-id node of the response packet returns this filtering parameter. It specifies one of the following hosting types: virtual hosting. the node should not be specified. frame forwarding. and the id node returns the domain identifier. you should also include the hosting node into the request packet.uk</name> <ascii-name>www. it is defined within the parent node and has the following structure:    The name node is required.co.123. It specifies the domain name. It specifies the owner of the new domain account (Plesk Client) when the domain is created by Plesk Administrator. Node gen_setup This node is used in the add request packets to set general settings for the newly created domain account. Allowed values: vrt_hst | std_fwd | frm_fwd | none.Supported Operations <filter-id>1234</filter-id> <id>1234</id> <data> <gen_info> <cr_date>2000-12-12</cr_date> <name>www. The request packet filtered the domain by domain id.

The gen_setup node is structured as follows:  The status node is optional. It specifies the status of the domain just created. It is used to modify the domain name. The status node is optional.active. It is used to change the domain owner (Plesk Client) specified by ID. Data type: string. It is used to set the current status of the specified domain. It specifies the ip address associated with the domain. Meanings: 0 .45.2.Supported Operations 300   The ip_address node is required.disabled by Client.11</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> Node gen_setup (type setGenSetupType) This node is used in the set request packets to set the general information for the specified domain(s). 16 . Data type: integer. It is defined by data type setGenSetupType (plesk_domain.4.xsd).0”> <domain> <add> <gen_setup> <name>newdomain. Data type: objectStatus (plesk_common.xsd).0.2. Allowed values: 0 | 16 | 64. The following packet creates a domain and sets all necessary general information for it: <packet version=”1. Allowed values: 0 (active) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk Client).com</name> <htype>vrt_hst</htype> <ip_address>192. Data type: ip_address (common. 64 .   . The name node is optional.xsd). Data type: string.168.disabled by Plesk Administrator. The client_id node is required.

The following packet assigns all domains of one Plesk Client (id = 1111) to another Plesk Client (id = 1122).0”> <domain> <set> <filter> <client_id>1111</client_id> </filter> <values> <gen_setup> <status>0</status> <client_id>1122</client_id> <ip_address>192.2.2. This packet can be sent by Plesk Administrator only. Data type: ip_address (common. It is used to modify the ip address associated with the domain.0.121</ip_address> </gen_setup> </values> </set> </domain> </packet> .xsd). <packet version=”1.4.Supported Operations 301  The ip_address node is required.

This node is structured as follows (pared-down variant):  The enabled node is optional. It specifies the name of the domain administrator. It specifies the phone number of the domain administrator. Data type: string (0 to 255 characters long). The global-login and the uid nodes are deprecated. Data type: Boolean. The fax node is optional.Supported Operations 302 Domain Administrator Settings Domain Administrator settings are defined by two data types. The cname node is optional. Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long).   Type domainUserSet (see page 302) is used in the add and set request packets Type domainUserGet (see page 303) is used in the get response packets Type domainUserSet The user node is used in the add and set request packets. The password node is optional. The phone node is optional. . Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long).        The pname node is optional. It specifies the password of the domain administrator.xsd). It specifies the email address of the domain administrator. It specifies the fax number of the domain administrator. It is specified by complex type domainUserSet (plesk_domain. It specifies the company where the domain administrator works. It is used to enable/disable the domain account. Data type: string (5 to 14 characters long). The email node is optional.

4. Data type: Boolean. See the structure of this node in the Domain Administrator Permissions (see page 305) topic. Data type: string (0 to 2 characters long). Is required for US only. Data type: string (0 to 255 characters long). The following sample packet creates a domain account and sets Domain Administrator information: <packet version=”1.xsd). The city node is optional. 12</address> <city>Totonto</city> <state/> <pcode/> <country>CA</country> <multiply_login>false</multiply_login> <permissions/> </user> </add> </domain> </packet> Type domainUserGet . It specifies a collection of permissions set for the domain administrator. Is required for US only. It specifies the zip code of the domain administrator. The perms node is optional. The country node is optional. Data type: string (0 to 10 characters long).0”> <domain> <add> <gen_setup> <name>newdomain.2. The state node is optional.0.123</ip_address> </gen_setup> <user> <enabled>false</enabled> <password>123456</password> <cname>technolux</cname> <pname>Stephen Holmes</pname> <phone>2121342526</phone> <fax>2121342527</fax> <email>sholmes@technolux.ca</email> <address>Gray Lake Road. The pcode node is optional. The multiply_login node is optional. Data type: string (0 to 255 characters long).com</name> <client_id>1234</client_id> <ip_address>192.Supported Operations 303        The address node is optional. Data type: domainPerms (plesk_domain. Data type: string (0 to 255 characters long). It specifies the city of the domain administrator. It indicates whether multiple logins with the same domain administrator credentials are allowed. It specifies the country code of the domain administrator. It specifies the state of the domain administrator. It specifies the postal address of the domain administrator.2.

The fax node is optional. Data type: string (0 to 255 characters long). It indicates whether multiple logins are allowed under the same domain administrator credentials.xsd). It shows whether the domain account is enabled. Data type: string (0 to 255 characters long). The global-login and the uid nodes are deprecated. Is required for US only. It specifies the name of the domain administrator. Data type: domainPerms (plesk_domain. It specifies the postal address of the domain administrator. Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long). Data type: string (0 to 2 characters long). The phone node is optional. It specifies the zip code of the domain administrator. It specifies the state of the domain administrator. It specifies the country code of the domain administrator. See the structure of this node in the Domain Administrator Permissions (see page 305) topic. The state node is optional. The country node is optional. Data type: string (0 to 255 characters long). It specifies a collection of permissions set for the domain administrator. The multiply_login node is optional. Data type: string (0 to 10 characters long). The address node is optional.Supported Operations 304 The user node used in the get response packets is specified by complex type domainUserGet (plesk_domain. It specifies the city of the domain administrator. It is structured as follows:  The enabled node is optional.xsd). It specifies the email address of the domain administrator.             The city node is optional. It specifies the company where the domain administrator works. The perms node is optional. The pname node is optional. Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long). It specifies the fax number of the domain administrator. Data type: Boolean. The cname node is optional. The email node is optional. Data type: Boolean. Is required for US only. The pcode node is optional. Data type: string (0 to 255 characters long). It specifies the phone number of the domain administrator.  .

0: the response contains the filtering parameter (the filter-id node).2. .ca</email> <address>Gray Lake Road.4. The request packet filtered the domain by domain ID. so the filter-id node of the response packet returns this filtering parameter.Supported Operations 305 The following response packet demonstrates the domain administrator information returned from Plesk server: <packet version=”1. and the id node returns the domain identifier.0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <user> <enabled>true</enabled> <cname>technolux</cname> <pname>Stephen Lowell</pname> <phone>2121342526</phone> <fax>2121342527</fax> <email>slowell@technolux.2. 12</address> <city>Totonto</city> <state> </state> <pcode> </pcode> <country>CA</country> <multiply_login>false</multiply_login> <permissions> </permissions> </user> </data> </result> </get> </domain> </packet> This packet is specific for API RPC 1. Note that the earlier versions of API RPC protocol do not support this feature.4.

For details on descriptors.xsd). Data type: PleskLimitType (plesk_client.0. and its graphical representation is as follows:  The limit node is required.Supported Operations 306 Limits. The value node is required. For details.0 and Later Versions This section contains domain limits and domain administrator permissions' settings. API RPC 1.5. refer to the Presentation of Object Descriptor (on page 16) section in API Reference and the Descriptors section in the Programming Guide.   The name node is required. It specifies parameters of a limit.0 and later. The following code represents mailbox quota limit: <limits> <limit> <name>mbox_quota</name> <value>100</value> </limit> </limits> Note: To manage limits. Limits The limits node is presented by domainLimits type (plesk_domain. It specifies a limit value. that are available in API RPC v.0 you can manage the settings using descriptors. Data type: any.0. containing names of limits. Data type: sting.xsd). refer to the Retrieving Descriptor of Limits (on page 372) section.5. Permissions and Hosting Settings This section contains limits and permissions settings for domain administrators.5. It specifies a limit name. you should first retrieve limits descriptor. .0.1. Starting from API RPC 1. Note: You can specify multiple limit parameters in one limits node.

. It specifies parameters of a permission. It specifies a permission value.Supported Operations 307 Permissions The perms node is presented by domainPerms type (plesk_domain.xsd). you should first retrieve permissions descriptor. Data type: PleskPermissionType (plesk_common.   The name node is required. and its graphical representation is as follows:  The permission node is required. Data type: any. </permissions> Note: To manage preferences. The value node is required. refer to the Retrieving Descriptor of Permissions (on page 378) section. Data type: sting. Note: You can specify multiple permission parameters in one perms node. The following code represents permission to access shell: <permissions> <permission> <name>manage_sh_access</name> <value>100</value> </permission> ..xsd). For details.. It specifies a permission name. containing names of permissions.

2.0) section.5. refer to the Hosting Settings (see page 305) (API RPC 1. refer to the Retrieving Descriptor of Hosting Settings (on page 382) section.5. . The following code represents FTP login parameter: <vrt_hst> <property> <name>ftp_login</name> <value>MyFTPlogin</value> </property> . </vrt_hst> Note: To manage hosting settings. For details on the hosting node. Note: You can specify multiple property parameters in one vrt_hst node. containing names of the settings. It specifies a hosting parameter value. you should first retrieve a hosting settings descriptor. The value node is required.   The name node is required. Data type: ip_address (common..4. It specifies a hosting parameter. The graphical representation of the vrt_hst node (API RPC 1.xsd).   The ip_address node is required. Data type: any. Data type: PleskPhysHostingPropertyType (plesk_domain. For details..0 except for the vrt_hst node.0 and later versions is the same as in API RPC 1. Data type: sting.xsd). It specifies a hosting parameter name.2.0.0) is as follows:  The property node is required.4. It specifies the IP address of the domain.0.Supported Operations 308 Hosting Settings The hosting node in API RPC 1.

Specifies the maximum number of email boxes on the domain.0 and earlier. Data type: integer.4.2. The max_maillists node is optional.xsd). that are available in API RPC v. Specifies the maximum number of mail groups on the domain. The max_db node is optional. Data type: integer.0 and Earlier Versions This section contains domain limits and domain administrators' permissions settings. Data type: integer. Data type: integer. The max_mg node is optional. Data type: integer. The max_redir node is optional. It is structured as follows:  The max_webapps node is optional. Specifies the maximum number of redirects on the domain. Specifies the maximum number of web applications allowed on the domain. Specifies the maximum number of autoresponders (preset messages sent automatically) on the domain.4. Limits Limits imposed on use of system resources are defined by the limits node. The max_box node is optional.Supported Operations 309 API RPC 1. The max_resp node is optional. Data type: integer. This node is specified by complex type domainLimits (plesk_domains. The mbox_quota node is optional.2. Data type: integer.1. It specifies the maximum number of MySQL databases for the domain. Data type: integer. Restricts the maximum amount of disk space (in bytes) allotted for a single mailbox on the domain. Specifies the maximum number of mailing lists on the domain.        .

The disk_space node is optional. Is used for Plesk for Windows only. The max_shared_ssl_links node is optional. Sets the disk space limit (in bytes) on MySQL databases belonging to the domain. Limits the number of Microsoft SQL databases for the domain. The following sample packet creates a domain account and limits the use of Plesk resources for this domain: <packet version=”1. Is used for Plesk for Windows only. The max_subftp_users node is optional. Note: The limits on Plesk resources set for the domain account are restricted by similar limits set for the ‗parent‘ client account. Sets the disk space limit (in bytes) on Microsoft SQL databases belonging to the domain.2.4. Specifies the maximum number of additional MS FrontPage accounts on the domain. Data type: integer.4. Specifies the maximum data traffic per month (in bytes) for the domain.0 and later. The max_fpse_users node is optional.com</name> <client_id>1234</client_id> <ip_address>192. Data type: integer. Is supported by API RPC 1. Data type: integer. Is used for Plesk for Windows only. The max_dom_aliases node is optional. The mssql_dbase_space node is optional. Data type: integer. Specifies the maximum number of subdomains that can be created on the domain. Specifies the maximum number of additional FTP accounts on the domain. The max_mssql_db node is optional. Specifies the validity period for the domain account. Is used for Plesk for Windows only. Specifies the maximum number of ODBC connections allowed on teh domain.0. Is used for Plesk for Windows only. Data type: integer. Data type: integer. Data type: integer. The max_traffic node is optional.123</ip_address> </gen_setup> <limits> <disk_space>209715200</disk_space> <max_traffic>209715200</max_traffic> . Specifies the maximum number of web pages (web users) hosted on the domain.2.Supported Operations 310        The max_wu node is optional. The expiration node is optional. The mysql_dbase_space node is optional. Specifies the maximum number of shared SSL links for the domain. Is used for Plesk for Windows only. Data type: integer. Specifies the maximum number of aliases for the domain.0”> <domain> <add> <gen_setup> <name>newdomain. Data type: integer. Data type: integer. Data type: integer. Restricts the amount of disk space (in bytes) for the domain. Data type: integer (a UNIX timestamp format). Restricts the maximum amount of disk space (in bytes) occupied by all mail boxes on the domain. Data type: integer. Data type: integer. The max_subdom node is optional.2. The total_mboxes_quota node is optional.       The max_odbc node is optional.

Supported Operations <max_subdom>20</max_subdom> <max_wu>10000</max_wu> <max_subftp_users>10000</max_subftp_users> <max_db>100</max_db> <mysql_dbase_space>52428800</mysql_dbase_space> <max_mssql_db>100</max_mssql_db> <mysql_dbase_space>52428800</mysql_dbase_space> </limits> </add> </domain> </packet> 311 .

       . It indicates whether the domain administrator can manage anonymous FTP account settings on the domain. The manage_log node is optional. It indicates whether the domain administrator can manage physical hosting parameters of the domain. Data type: Boolean. The manage_subdomains node is optional. The manage_anonftp node is optional. The manage_dns node is optional. It indicates whether the domain administrator can manage non-chrooted shell access. Data type: Boolean. It indicates whether the domain administrator can manage subdomains created on the domain. It indicates whether the domain administrator can change the hard disk quota set for the domain. Data type: Boolean. Data type: Boolean. The manage_crontab node is optional.Supported Operations 312 Permissions The perms node is specified by complex type domainPerms (plesk_domain. Data type: Boolean.xsd). Data type: Boolean. The manage_not_chroot_shell node is optional. It indicates whether the domain administrator can manage DNS settings on the domain. The manage_quota node is optional. Data type: Boolean. It is structured as follows:  The manage_phosting node is optional. It indicates whether the domain administrator can manage the task scheduler on the domain. Data type: Boolean. It indicates whether the domain administrator can manage logging on the domain.

It indicates whether the domain administrator can manage IIS application pool settings on the domain. Data type: Boolean.0 and later. The allow_ftp_backups node is optional. It indicates whether the domain administrator can change the password of the FTP account on the domain. It indicates whether the domain administrator can make dumps of the domain using backup/restore facilities of Plesk. The site_builder node is optional.4. The manage_domain_aliases node is optional. Is used for Plesk for UNIX only. Data type: Boolean. The element is supported beginning with version 1. Data type: Boolean. Is supported by API RPC 1.1.2. It indicates whether the domain administrator can manage system shell access on the domain. The manage_subftp node is optional. It indicates whether the domain administrator can use the standard GUI of Plesk. Data type: Boolean.4.0 and later. Data type: Boolean. Data type: Boolean. The make_dumps node is optional. Data type: Boolean. Is used for Plesk for UNIX only.2. It indicates whether the domain administrator can manage domain aliases. It indicates whether the domain administrator can manage additional FTP accounts created on the domain. Data type: Boolean. The manage_sh_access node is optional.4. Data type: Boolean. It indicates whether the domain administrator can manage the domain via Plesk desktop. Data type: Boolean. The allow_local_backups node is optional. The manage_performance node is optional. Data type: Boolean. The manage_iis_app_pool node is optional. It indicates whether the domain administrator can manage hosting performance on the domain. It indicates whether the domain administrator can use the local repository for backup/restore operations. It indicates whether the domain administrator can customize Plesk desktop. The manage_drweb node is optional. Data type: Boolean .Supported Operations 313     The manage_webapps node is optional. It indicates whether the domain administrator can manage Tomcat web applications installed on the domain. Data type: Boolean.              . The manage_spamfilter node is optional.0 for Unix and later. It indicates whether the domain administrator can manage the spam filter. It indicates whether the domain administrator can manage mailing lists on the domain. Data type: Boolean. Data type: Boolean. This feature is not supported on Plesk 8. The manage_maillists node is optional.4. It indicates whether the domain administrator can manage DrWeb antivirus software on the domain (if supported by the key).2. Data type: Boolean. Data type: Boolean. Is supported by API RPC 1. The manage_ftp_password node is optional. It indicates whether the domain administrator can use the FTP repository for backup/restore operations.0 of API RPC. Is supported by API RPC 1. The dashboard node is optional.0 and later. It indicates whether the domain administrator can use SiteBuilder. The stdgui node is optional. The manage_dashboard node is optional.

2.4.0”> <domain> <add> <gen_setup> <name>newdomain.2.com</name> <client_id>1234</client_id> <ip_address>192.ca</email> <address>Gray Lake Road. 12</address> <city>Totonto</city> <state/> <pcode/> <country>CA</country> <multiply_login>false</multiply_login> <permissions> <manage_quota>true</manage_quota> <manage_subdomains>true</manage_subdomains> <manage_anonftp>true</manage_anonftp> <manage_webapps>true</manage_webapps> <manage_maillists>true</manage_maillists> <manage_drweb>true</manage_drweb> <make_dumps>true</make_dumps> <manage_ftp_password>true</manage_ftp_password> <manage_performance>true</manage_performance> <manage_domain_aliases>true</manage_domain_aliases> <dashboard>true</dashboard> <manage_dashboard>true</manage_dashboard> <manage_subftp>true</manage_subftp> <allow_ftp_backups>true</allow_ftp_backups> </permissions> </user> </add> </domain> </packet> .123</ip_address> </gen_setup> <user> <enabled>true</enabled> <password>123456</password> <cname>technolux</cname> <pname>Stephen Holmes</pname> <phone>2121342526</phone> <fax>2121342527</fax> <email>sholmes@technolux.Supported Operations 314 The following sample packet creates a domain account and sets Domain Administrator information and permissions: <packet version=”1.0.

except they specify their vrt_hst nodes using different data types: The vrt_hst node is required if physical hosting is specified on the domain. The frm_fwd node is required if frame forwarding is specified on a domain.Supported Operations 315 Hosting Settings Hosting settings are described by two data types. hosting settings will be deleted. Data type: none. See the structure of this node in the Node std_fwd (see page 320) sub-topic. Data type: none.  The vrt_hst node is required if physical hosting is specified on the domain. Data type: none.2”> <domain> <add> <gen_setup> <name>newdomain. Extended by: domainFFHostingBase (plesk_domain. Data type: none. Both data types are similar. Extended by: domainSFHostingBase (plesk_domain. The none node is required if no hosting is specified on a domain.xsd).xsd). Extended by: domainPhHostingGet (plesk_doman.   Complex type domainHostingAgentSet is used in the add and set request packets. Complex type domainHostingAgentGet is used in the get response packets. See the structure of this node in the Node vrt_hst (type domainPhHostongGet) sub-topic. Extended by: domainPhHostingSet (plesk_domain. See the structure of this node in the Node frm_fwd (see page 321) sub-topic.   The following request add packet sent by Administrator creates a domain with disabled hosting : <packet version=”1.xsd). See the structure of this node in the Node vrt_hst (type domainPhHostingSet) (see page 317) subtopic. If specified.com</name> <client_id>1234</client_id> <status>0</status> </gen_setup> <hosting> .  The std_fwd node is required if standard forwarding is specified on the domain.xsd). Data type: none.4.1.

Supported Operations <none/> </hosting> </add> </domain> </packet> 316 .

It specifies the login name of the FTP account created on the domain. The fp_admin_password node is optional.‘). The fp_auth node is optional. For details on unlimited values for FTP quota. It is presented by complex type domainPhHostingSet. refer to the table below.Supported Operations 317 Node vrt_hst (type domainPhHostingSet) The vrt_hst node is used in the add and set request packets. allowed characters: a-z. Data type: integer. Data type: string (up to 64 characters long.          The ssl node is optional. It enables/disables support for FrontPage via SSL. 0-9. It specifies the password of the FTP account created on the domain. It specifies the login name of the FrontPage administrator (if FP is supported on the domain). It indicates whether the domain is accessed via SSL connection. It allows/disallows authoring using FrontPage on the domain. Data type: Boolean. It enables/disables FrontPage support on the domain. . Data type: string (up to 16 characters long). The fp node is optional. The ftp_password node is required. ‗_‘. It restricts the disk space (in bytes) allotted for FTP needs on the domain. not equal to FTP login). It specifies the password of the FrontPage administrator (if FP is supported on the domain). This node is structured as follows:  The ftp_login node is required. The fp_admin_login node is optional. Data type: string (up to 20 characters long). ‗. Data type: string (1 to 17 characters long. Data type: Boolean. Data type: Boolean. The fp_ssl node is optional. A-Z. Data type: Boolean. The ftp_quota node is optional.

Supported Operations 318  The shell node is optional.4.0 and later. If set to true. It enables/disables CGI support on the domain. The shell-forbidden node is optional. This parameter makes sense for Plesk for Windows only.1. The errdocs node is optional.0.NET version which is default for the domain. It allows/disallows shell access to Plesk with FTP user login credentials.4. It enables/disables Apache ASP support on the domain. This parameter makes sense for Plesk for Windows only.0. The ssi_html node is optional.4.                 . It specifies the web server statistics processor to be used on the domain.1. Data type: Boolean.1.4. A path of a shell command interpreter (like ‗/bin/sh‘ or ‗/bin/bash‘) allows shell access. It is supported by API RPC beginning with version 1. STM files). Data type: Boolean. Starting with API RPC v. Is supported by API RPC 1. Data type: string. The ssi node is optional. It is used to prohibit shell access to Plesk for FTP users of the domain. This node is used in API RPC 1. indicates that the use of custom error documents is enabled on the domain.0.1. Data type: Boolean. Allowed values in UNIX: the default value (―/bin/false‖) disables shell access. Data type: Boolean. It enables/disables Coldfusion support on the domain. it indicates that PHP scripts are executed by IIS as ISAPI extensions (otherwise they are executed as CGI applications). It enables/disables SSI support on the domain. It enables/disables Perl support on the domain. SHTM. The managed_runtime_version node is optional. Data type: Boolean. Data type: Boolean. Indicates whether web user scripts are allowed for execution on the domain.4. The php node is optional. Data type: Boolean. Allowed values in Windows: ‗Login Enabled‘ | ‗Login Disabled‘.0.0 | 2. It enables/disables support for ASP.0 and higher. This parameter makes sense for Plesk for Windows only. It is supported by API RPC beginning with version 1. It is supported by API RPC beginning with version 1.1. Data type: Boolean.0.NET on the domain. The mod_perl mode is optional. It specifies ASP. If set to true. you can choose between nodes <shell> and <shell-forbidden> (the latter node prohibits shell access to Plesk). Data type: none.2. This parameter makes sense for Plesk for Windows only. it indicates that the web server should look in HTML and HTM files for SSI scenarios (they are normally used in SHTML. The cgi node is optional. Data type: Boolean. Allowed values: none | awstats | webalizer | smarterstats | urchin. It enables/disables Python support on the domain. The webstat_protected node is optional. The php_isapi node in optional. The wuscripts node is optional. The webstat node is optional. If set to true. Data type: Boolean. Data type: Boolean.0 The coldfusion node is optional.4. The asp node is optional. Data type: string. If set to true. Allowed values: 1. Data type: Boolean. It enables/disables PHP support on the domain. Data type: string (up to 255 characters long). indicates that statistics is accessible via a password protected directory (‗/plesk-stat/‘). Data type: Boolean The asp_dot_net node is optional. The mod_python node is optional.

123.4. Makes sense for Plesk for UNIX only. Data type: Boolean. The php-version node is optional. This element is supported starting with API RPC v. Data type: string.2.1.2. This feature is supported by API RPC 1.4. It specifies what version of PHP should be default for domain directory. Allowed values: 4 | 5. The fastcgi node is optional.0 and earlier Plesk for Windows Plesk for Unix 0 -1 API RPC 1.0. It enables/disables publishing web site on the domain using SiteBuilder. It enables/disables support for the @<domain_name> format on the domain. Data type: Boolean.4. The php_safe_mode node is optional.0 and later -1 -1 The following sample packet creates a new domain and specifies physical hosting settings for it: <packet version=”1. It specifies if the SiteBuilder blog and photo gallery subdomains should be created on the domain. The create-sb-subdomains node is optional. This element is supported starting with API RPC v.2. Data type: Boolean.0”> <domain> <add> <gen_setup> <name>newdomain.1.0 of API RPC.xsd).4.4. Makes sense for Plesk for Windows only. It enables/disables IIS application pool on the domain. Makes sense for Plesk for Windows only. Data type: Boolean. It enables/disables executing php script files in the safe mode on the domain. Data type: ip_address (common.Supported Operations 319   The at_domains node is optional.0. Makes sense for Plesk for Windows only. It specifies the IP address associated with the domain.0. The sb_publishing node is optional. It indicates whether the FastCGI technology is supported on the domain.2.1.4.123. The iis_app_pool node is optional. Makes sense for Plesk for Windows only.2.0 and later.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>ftpuser</ftp_login> <ftp_password>12345</ftp_password> <php>true</php> <ssi>true</ssi> <cgi>true</cgi> . Data type: Boolean.com</name> <client_id>1234</client_id> <ip_address>123. API RPC 1.2.       Values for unlimited FTP quota parameter.4.0.5.1. This element is supported starting with API RPC v. This element is supported beginning with version 1. Data type: boolean. The ip_address node is required.

123</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> 320 If the gen_setup node specifies an IP address and the hosting node indicates a different IP address then the second IP address will be valid. The ip_address node is required. Plesk redirects this user from the requested URL to the ‗destination‘ URL. Node std_fwd The std_fwd node is used to specify standard forwarding on a domain.123.123. Data type: ip_address (common.com</name> <client_id>1234</client_id> <ip_address>123. When the user goes to the domain on which standard forwarding is set.Supported Operations <php_safe_mode>true</php_safe_mode> <ip_address>123.1.123. The std_fwd node is structured as follows:  The dest_url node is required.  The following sample packet specifies standard forwarding for a new domain: <packet version=”1.123. spaces not allowed).olddomain. 1 to 255 characters long.xsd). This is done explicitly: the user sees the real ‗destination‘ address in the path bar of the browser. Data type: forwardingUrl (string. It specifies the IP address associated with the domain.2”> <domain> <add> <gen_setup> <name>newdomain. It specifies the URL to which the user will be redirected explicitly at the attempt to visit the specified domain.123</ip_address> <status>0</status> </gen_setup> <hosting> <std_fwd> <dest_url>www.123.123.4.123</ip_address> </std_fwd> </hosting> </add> </domain> </packet> .com</dest_url> <ip_address>123.

123. When the user goes to the domain on which frame forwarding is set.123.123</ip_address> <status>0</status> </gen_setup> <hosting> <frm_fwd> <dest_url>www.123</ip_address> </frm_fwd> </hosting> </add> </domain> </packet> . spaces not allowed). Data type: forwardingUrl (string.123.  The dest_url node is required.xsd). The ip_address node is required.testdomain.2”> <domain> <add> <gen_setup> <name>newdomain. Plesk redirects this user from the requested URL to the ‗destination‘ URL implicitly (the user still sees the initial URL in the path bar of the browser).1. It specifies the URL to which the user will be redirected implicitly at the attempt to visit the specified domain.  The following sample packet specifies frame forwarding for a new domain: <packet version=”1.Supported Operations 321 Node frm_fwd The frm_fwd node is used to specify frame forwarding on a domain. 1 to 255 characters long.com</dest_url> <ip_address>123. It specifies the IP address associated with the domain. Data type: ip_address (common.123.4.com</name> <client_id>1234</client_id> <ip_address>123.

Specifies the amount of disk space (in bytes) occupied by anonymous FTP. send the get packet and receive the response. Data type: long. The subdomains node is required. folders.) on a domain. The web_users node is required.xsd) and has the following structure.      The httpdocs node is required. Data type: long. To get these settings from Plesk database. Specifies the amount of disk space (in bytes) occupied by the /httpsdocs directory. The anonftp node is required. it is nested within the data node (described in plesk_domain. Specifies the amount of disk space (in bytes) allotted for web users on the domain. The returned disk_usage node has no data type. . The httpsdocs node is required.Supported Operations 322 Disk Space Usage Settings Disk usage settings restrict the amount of disk space set for various entities (logs. Data type: long. Specifies the amount of disk space (in bytes) occupied by the /httpdocs directory. etc. Data type: long. Specifies the amount of disk space (in bytes) occupied by subdomains of this domain. databases. Data type: long.

The dbases node is required. Specifies the amount of disk space (in bytes) occupied by databases created for the domain. Specifies the amount of disk space (in bytes) occupied by dumps of the domain. Data type: long.Supported Operations 323   The logs node is required.0”> <domain> <set> <filter> <id>123</id> <id>124</id> </filter> <values> <disk_usage> . Data type: long. Data type: long. Data type: long. Specifies the amount of disk space (in bytes) allotted by mailboxes of the domain. Data type: long. The maillists node is required. Specifies the amount of disk space (in bytes) occupied by Tomcat web applications deployed on the domain.0. The mysql_dbases node is required. Specifies the amount of disk space (in bytes) occupied by logs. Data type: long. Specifies the amount of disk space (in bytes) occupied by configuration files of the domain. You can set only two of them: mailboxes and maillists. The disk_usage node of the set request packet does not have its own data type and is structured as follows:   The mailboxes node is optional. The configs node is required. Specifies the amount of disk space (in bytes) occupied by MySQL databases created for the domain. Specifies the amount of disk space (in bytes) occupied by the /chroot directory on the domain. Data type: integer. The following set request packet sets the limits on the hard disk space for email boxes and mailing lists: <packet version=”1.         Most of these settings cannot be set up directly. The webapps node is required. Specifies the amount of disk space (in bytes) occupied by mailing lists created on the domain. The maillists node is optional. Data type: long. The mssql_dbases node is required. Makes sense for Plesk for Windows only. Makes sense for Plesk for Windows only. It is supported beginning with API RPC 1. Makes sense for Plesk for UNIX only. Data type: long. Specifies the amount of disk space (in bytes) occupied by mailing lists created on the domain. Data type: long. Specifies the amount of disk space (in bytes) allotted by mailboxes of the domain. Data type: integer.0.3. Specifies the amount of disk space (in bytes) occupied by MSSQL databases created for the domain. The mailboxes node is required. Makes sense for Plesk for UNIX only.5. Makes sense for Plesk for UNIX only. The chroot node is required.3. It is supported beginning with API RPC 1.4.2.5. The domaindumps node is required. Data type: long.

so the filter-id node of the response packet returns this filtering parameter. .4.4.Supported Operations <mailboxes>1073741824</mailboxes> <maillists>1048576</maillists> </disk_usage> </values> </set> </domain> </packet> 324 The following get response packet returns the disk usage information for the specified domain: <packet version=”1. and the id node returns the domain identifier.0: the response contains the filtering parameter (the filter-id node).2. Note that the earlier versions of API RPC protocol do not support this feature.co. The request packet filtered the domain by domain name.0”> <domain> <get> <result> <status>ok</status> <filter-id>technolux.uk</filter-id> <id>2435</id> <data> <disk_usage> <httpdocs>2097152</httpdocs> <httpsdocs>1572864</httpsdocs> <subdomains>12582945</subdomains> <web_users>130023456</web_users> <anonftp>12582975</anonftp> <logs>4194312</logs> <dbases>4194325</dbases> <mailboxes>12582978</mailboxes> <webapps>3145728</webapps> <maillists>1048523</maillists> <domaindumps>209715200</domaindumps> <configs>25078</configs> <chroot>2095647</chroot> </disk_usage> </data> </result> </get> </domain> </packet> This packet is specific for API RPC 1.2.

It returns the number of autoresponders created on the domain. The box node is required.xsd) and contains a collection of statistics data for the specified domains.Supported Operations 325 Statistics Settings Statistics settings can be received from Plesk server in the get response packet. It returns the number of redirects created for the domain.          The maillists node is required. Data type: unsignedInt. The wu node is required. Data type: unsignedInt. Data type: size (unsignedLong). This node is structured as follows:   The traffic node is required. The traffic_prevday node is required. It returns the number of Java applications installed on the domain. Data type: unsignedInt. . It holds the number of email boxes created for the domain. The resp node is required. The subdom node is required. Data type: unsignedLong. Data type: unsignedInt. The mg node is required. It returns the number of mailing groups created on the domain. It holds the number of databases created for the domain. Data type: unsignedInt. The db node is required. Data type: unsignedInt. The stat node of the get response packet is defined by the domainStat data type (plesk_domain. It holds the number of web users created on the domain. It returns the traffic (in bytes) spent by the domain during the previous day. Data type: unsignedInt. Data type: unsignedInt. It returns the traffic (in bytes) spent by the domain during the current day. Data type: unsignedInt. It holds the number of subdomains created on the domain. It returns the number of mailing lists created on the domain. The redir node is required. The webapps node is required.

and the id node returns the domain identifier.4. so the filter-id node of the response packet returns this filtering parameter. The request packet filtered the domain by domain ID.Supported Operations 326 The following response packet returns statistics settings for two filtered domains (ID 2435 and ID 2567): <packet version=”1. .0: the response contains the filtering parameter (the filter-id node).2.4. Note that the earlier versions of API RPC protocol do not support this feature.0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <stat> <traffic>12458966221478885</traffic> <subdom>12</subdom> <wu>134</wu> <box>1024</box> <redir>2</redir> <mg>16</mg> <resp>124</resp> <maillists>4<maillists> <db></db> <webapps>8</webapps> <traffic_prevday>15241632184739856</traffic_prevday> </stat> </data> </result> <result> <status>ok</status> <filter-id>2567</filter-id> <id>2567</id> <data> <stat> <traffic>5896615637124</traffic> <subdom>10</subdom> <wu>18</wu> <box>102</box> <redir></redir> <mg>11</mg> <resp>12</resp> <maillists>6<maillists> <db>2</db> <webapps>5</webapps> <traffic_prevday>152562874868127</traffic_prevday> </stat> </data> </result> </get> </domain> </packet> This packet is specific for API RPC 1.2.

This node is specified by the domainPrefs (plesk_domain.2.0. Data type: integer. The maximal value: 999999.4.com</name> <client_id>1234</client_id> <ip_address>192.  The following sample packet creates a domain account and sets domain preferences: <packet version=”1. Data type: Boolean. The stat_ttl node is optional.0”> <domain> <add> <gen_setup> <name>newdomain.Supported Operations 327 Domain Preferences Domain preferences are defined by the prefs node. It enables/disables the use of the www prefix with the domain name.2.123</ip_address> </gen_setup> <prefs> <www>false</www> <stat_ttl>6</stat_ttl> </prefs> </add> </domain> </packet> . It specifies the number of months during which the domain traffic statistics is kept.xsd). It is structured as follows:  The www node is optional.

Supported Operations 328 Performance Settings Domain performance settings are defined by the performance node.123</ip_address> </gen_setup> <performance> <bandwidth>1000</bandwidth> <max_connections>20</max_connections> </performance> </add> </domain> </packet> To undo the performance settings for this domain.4. the number of connections is unlimited. This node is specified by complex type DomainPerformanceType (plesk_domain. Note: All operations on domain performance settings are supported in API RPC beginning with version 1. If set to -1.4.com</name> <client_id>1234</client_id> <ip_address>192. It restricts the number of connections by the specified value for the domain. If set to -1.0”> <domain> <set> <filter> <domain_name>newdomain.com</domain_name> </filter> . Data type: integer. send a packet as follows: <packet version=”1. It restricts the network use by the specified value (Kb/sec) for the domain. The max_connections node is optional. This type is structured as follows:   The bandwidth node is optional.2. Data type: integer. The following sample packet creates a domain account and sets performance settings: <packet version=”1.1. the bandwidth is unlimited.4.0.0.xsd).0”> <domain> <add> <gen_setup> <name>newdomain.2.2.

Supported Operations <values> <performance> <bandwidth>-1</bandwidth> <max_connections>-1</max_connections> </performance> </values> </set> </domain> </packet>

329

Creating Domain Account
A domain account can be created by Plesk Administrator or by Plesk Client. To register a new domain account in Plesk database, it is enough to specify some general setup information, namely: the domain name, the IP address. If the domain is created by Plesk Administrator, the domain owner (a certain Plesk Client) needs to be specified too. In addition, you can specify various domain settings when creating a domain account (all of them are optional):       Hosting settings (see page 305) Hosting performance settings (see page 327) Limits (see page 305) on use of Plesk resources Domain preferences (see page 326) Domain administrator settings (see page 302) Domain template

A domain account can have all these settings specified, or it can hold just some of them. You can specify domain settings when creating a domain account or later (they can be set using the set operation). The only exception from this rule is a domain template: it cannot be applied to the domain after it is created. To learn more about the domain templates management via API RPC, proceed to section Managing Domain Templates (see page 411).

Request Packet Structure
A request XML packet adding a new domain account to Plesk database includes the add operation node:
<packet version=”1.4.2.0”> <domain> <add> … </add> </domain> </packet>

Supported Operations

330

The add node does not have a separate type, it is nested within type DomainTypeRequest (domain_input.xsd). The add node has the following graphics representation:

The gen_setup node is required. It is used to specify the most important information about the domain account, that is: the name of the new domain, the Plesk client who owns this domain, the hosting type used for this domain, the IP address associated with the domain, and the status got by the domain right after it is created. Data type: setGenSetupType (plesk_domain.xsd). See the structure of this node in the General Account Information (see page 299) topic. The hosting node is optional. It specified hosting settings set for the domain. Data type: domainHostingAgentSet (plesk_domain.xsd). See the structure of this node in the Hosting Settings (see page 305) topic. The limits node is optional. It specifies limits imposed on use of Plesk resources for this domain. Data type: domainLimits (plesk_domain.xsd). See the structure of this node in the Limits (see page 305)topic. The prefs node is optional. It specifies a collection of domain preferences. Data type: domainPrefs (plesk_domain.xsd). See the structure of this node in the Domain Preferences (see page 326) topic. The user node is optional. Is specifies Domain Administrator settings (login, password, phone, fax, email address, postal address, and so on.). Data type: domainUserSet (plesk_domain.xsd). See the structure of this node in the Domain Administrator Settings (see page 302) topic. The performance node is optional. It specifies a collection of domain performance settings (bandwidth, the maximal number of connections). Data type: DomainPerformanceType (plesk_domain.xsd). This node is available in API RPC 1.4.1.0 and later. See the structure of this node in the Performance Settings (see page 327) topic. The template-id node is optional. It specifies the domain template by id if it is necessary to create a domain using a domain template. Data type: id_type (integer). This node is available in API RPC 1.4.1.0 and later. To learn more about domain templates, proceed to section Managing Domain Templates (see page 411).

Supported Operations

331

The template-name node is optional. It specifies the domain template by name if it is necessary to create a domain using a domain template. Data type: string. This node is available in API RPC 1.4.1.0 and later. To learn more about domain templates, proceed to section Managing Domain Templates (see page 411).

Request Samples
Creating domain accounts under different Plesk users Domain accounts can be created by Plesk Administrator and Plesk Clients. Here is a sample request packet that can be used by Plesk Client to create a domain account. The domain account is created with a minimal collection of settings.
<packet version=”1.4.2.0”> <domain> <add> <gen_setup> <name>newdomain.com</name> <htype>vrt_hst</htype> <ip_address>192.0.2.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.0.2.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet>

The same packet sent by Plesk Administrator should specify the client that will own this domain:
<packet version=”1.4.2.0”> <domain> <add> <gen_setup> <name>newdomain.com</name> <client_id>1234</client_id> <htype>vrt_hst</htype> <ip_address>192.0.2.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.0.2.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet>

Supported Operations

332

Creating multiple domain accounts To create two domain accounts with a single packet, include two different add nodes:
<packet version=”1.4.2.0”> <domain> <add> <gen_setup> <name>newdomain.com</name> <htype>vrt_hst</htype> <ip_address>192.0.2.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.0.2.54</ip_address> </vrt_hst> </hosting> </add> <add> <gen_setup> <name>testdomain.com</name> <ip_address>192.0.2.124</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.0.2.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet>

Using a domain template The following sample packet creates a domain account based on the domain template.
<packet version=”1.4.2.0”> <domain> <add> <gen_setup> <name>newdomain.com</name> <htype>vrt_hst</htype> <ip_address>192.0.2.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.0.2.54</ip_address> </vrt_hst> </hosting>

Supported Operations <template-name>base_template</template-name> </add> </domain> </packet>

333

Note: To see the sample packets that set optional domain settings (hosting settings, limits, preferences, and others), proceed to a related topic in the Domain Settings (on page 295)section.

Response Packet Structure
The add node of the response packet is structured as follows:

    

The result node is required. It wraps the result of the requested add operation. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the add operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is used to return the error code when the add operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the add operation fails. Data type: string. The id node is optional. It is required if the add operation succeeds. Returns the unique identifier of the domain account just added to Plesk. Data type: integer.

Response Samples
A positive response got from the server after adding a new domain account looks as follows:
<packet version=”1.4.2.0”> <domain> <add> <result> <status>ok</status> <id>2435</id>

Supported Operations </result> </add> </domain> </packet>

334

A negative response can look as follows (you can get a different error code depending on what caused the failure):
<packet version=”1.4.2.0”> <domain> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> </result> </add> </domain> </packet>

Getting Information About Domain Accounts
Plesk Administrator can request any information about any domain account registered in Plesk database. Plesk Client can get this information about own domain accounts. This information is as follows:         general information (domain name and id, hosting type, the owner) hosting settings performance settings limits on use of Plesk resources domain preferences domain administrator settings disk usage a domain template used to create a domain

Plesk user can get all information in bulk or specify certain kinds of information (e.g., only hosting settings). The information can be selected for a certain domain, for a group of domains, for all domains belonging to a certain client (or several), or for all domains registered in Plesk. To request the information about domains, use a request XML packet with the get operation.

Supported Operations

335

Request Packet Structure
A request XML packet getting information about the specified domain(s) includes the get operation node:
<packet version=”1.4.2.0”> <domain> <get> … </get> </domain> </packet>

The get node does not have a separate data type, it is nested within the DomainTypeRequest complex type (domain_input.xsd). The get node has the following graphics representation:

The filter node is required. It specifies domains whose information will be got from Plesk database. Data type: DomainFilterType (domain_input.xsd). To see the structure of this node, proceed to topic Filtering Issues (see page 292). The dataset node is required. It specifies what type of information about the specified domains is requested. Data type: domainDatasetType (plesk_domain.xsd). The gen_info node is optional. It is used to request general information about the specified domains. Data type: none. The hosting node is optional. It is used to request hosting settings of the specified domains. Data type: none. The limits node is optional. It is used to request the limits on Plesk resources set for the specified domains. Data type: none. The stat node is optional. It is used to request statistics settings of the specified domains. Data type: none. The prefs node is optional. It is used to request preferences set for the specified domains. Data type: none.

    

Supported Operations

336

 

The user node is optional. It is used to request the disk usage information for the specified domains. Data type: none. The performance node is optional. It is used to request performance settings set for the specified domains. Data type: none. This node is supported in API RPC 1.4.0.0 and higher.

Request Samples
Getting multiple domains under Plesk Administrator Multiple domains can be specified within one filter either by id, or by domain_name. The following packet is invalid as it uses both id and domain_name nodes within one filter:
<packet version=”1.4.2.0”> <domain> <get> <filter> <id>123</id> <id>124</id> <domain_name>techservice.co.uk</domain_name> <domain_name>techknowledge.co.uk</domain_name> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet>

To specify some domains by id and others by domain_name, use different <get> sections:
<packet version=”1.4.2.0”> <domain> <get> <filter> <id>123</id> <id>124</id> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <domain_name>techservice.co.uk</domain_name> <domain_name>techknowledge.co.uk</domain_name> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet>

Supported Operations

337

To get the information about all domains registered in Plesk, the following packet can be used:
<packet version=”1.4.2.0”> <domain> <get> <filter/> <dataset> <hosting/> </dataset> </get> </domain> </packet>

To get all domains of a certain Plesk Client, use ‗group‘ filtering (see topic Filtering Issues (see page 292) for details). Plesk Clients whose domains are requested can be specified within one filter either by client_id or by client_login.
<packet version=”1.4.2.0”> <domain> <get> <filter> <client_login>technolux</client_login> <client_login>technologic</client_login> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <client_id>1342</client_id> <client_id>1452</client_id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet>

You cannot specify clients by login and by id in one filter. Use different filters (and <get> sections) instead. Getting multiple domains under Plesk Client Plesk Clients can manage their own domain accounts only. They cannot apply group filtering using nodes client_id and client_login. In all other respects, the request packets shown above can be used by Plesk Clients too.

Supported Operations

338

One more exception is: the following packet gets the information about all domains belonging to the calling Plesk Client.
<packet version=”1.4.2.0”> <domain> <get> <filter/> <dataset> <hosting/> </dataset> </get> </domain> </packet>

Getting different types of information To get the whole set of information about domains registered in Plesk, use the following packet:
<packet version=”1.4.2.0”> <domain> <get> <filter> <client_login>technolux</client_login> </filter> <dataset/> </get> </domain> </packet>

This packet gets the whole information about all domains belonging to a certain Plesk Client. To specify a particular kind of information (e.g. hosting settings, limits, and statistics settings), show it in the dataset section as follows:
<packet version=”1.4.2.0”> <domain> <get> <filter> <id>123</id> </filter> <dataset> <hosting/> <limits/> <stat/> </dataset> </get> </domain> </packet>

Supported Operations

339

Response Packet Structure
The get node of the response packet is structured as follows:

The result node is optional. It wraps the result of the requested get operation. It can be missing if some error occurs before the validation starts. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the get operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Ii is used to return the error code when the get operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return the error message if the get operation fails. Data type: string. The filter-id node is optional. Is supported by API RPC 1.4.2.0 and later. If supported, it is always present and used to return the parameter by which the domain was filtered by in the request packet. Data type: anySimple. The id node is optional. The node is always missing if the request packet fails before the validation on the server side. If present, it returns the identifier of the domain whose settings are requested. Data type: integer. The data node is optional. It is used to return a collection of requested domain settings if the get operation succeeds. Data type: none.

   

Supported Operations

340

The data node of the response get packet is structured as follows:

The gen_info node is optional. If specified in the request packet, it returns a collection of general domain settings. Data type: domainGenInfoType (plesk_domain.xsd). See the General Account Information (see page 296) topic for details. The hosting node is optional. If specified in the request packet, it returns hosting settings of the specified domain. Data type: domainHostingAgentGet (plesk_domain.xsd). See the Hosting Settings (see page 305)topic for details. The limits node is optional. If specified in the request packet, it returns a collection of limits set for the specified domains. Data type: domainLimits (plesk_domain.xsd). See the Limits (see page 305)topic for details. The stat node is optional. If specified in the request packet, it returns a collection of statistics settings set for the specified domain(s). Data type: domainStat (plesk_domain.xsd). See the Statistics Settings (see page 324) topic for details. The prefs node is optional. If specified in the request packet, it returns a collection of preferences set for the specified domains. Data type: domainPrefs (plesk_domain.xsd). See the Domain Preferences (see page 326) topic for details. The user node is optional. If specified in the request packet, it returns a collection of domain administrator settings. Data type: domainUserGet (plesk_domain.xsd). See the Domain Administrator Settings (see page 303)topic for details. The disk_usage node is optional. If specified in the request packet, it returns a collection of hard disk limits set for the specified domains. Data type: none. See the Disk Usage Settings (see page 322)topic for details. The performance node is optional. If specified in the request packet, it returns a collection of performance settings set for the specified domains. Data type: DomainPerformanceType (plesk_domain.xsd). See the Performance Settings (see page 327) topic for details. This node is supported in API RPC 1.4.0.0 and higher.

Supported Operations

341

Response Samples
A positive response received from the server contains the information for each requested domain in a separate result block. The following response packet returns domain preferences for two specified domains:
<packet version=”1.4.2.0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <prefs> <www>true</www> </prefs> </data> </result> <result> <status>ok</status> <id>2567</id> <data> <prefs> <www>true</www> <stat_ttl>6</stat_ttl> </prefs> </data> </result> </get> </domain> </packet> <packet version=”1.4.1.2”> <domain> <get> <result> <status>ok</status> <id>2435</id> <data> <prefs> <www>true</www> </prefs> </data> </result> <result> <status>ok</status> <id>2567</id> <data> <prefs> <www>true</www> <stat_ttl>6</stat_ttl> </prefs> </data> </result> </get> </domain> </packet>

Supported Operations

342

Notice the difference in these identical packets sent using different versions of API RPC:   versions 1.4.1.2 and earlier return the domain identifier in its id node; versions 1.4.2.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node). These two nodes can coincide if the domain was filtered by domain_id.

If you need an example of a particular setting returned in the response get packet, proceed to a related topic of the Domain Settings (on page 295) section. If the request get packet asks for a certain kind of settings, but the specified domain is missing these settings in the database, the response get packet will return the requested node (e.g. prefs) empty:
<packet version=”1.4.2.0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <prefs/> </data> </result> </get> </domain> </packet> <packet version=”1.4.1.2”> <domain> <get> <result> <status>ok</status> <id>2435</id> <data> <prefs/> </data> </result> </get> </domain></packet>

If the get operation fails, a negative response can look as follows (you can get a different error code depending on the cause of the failure):
<packet version=”1.4.2.0”> <domain> <get> <result> <status>error</status> <errcode>1013</errcode>

Supported Operations <errtext>Object not found.</errtext> <filter-id>1234</filter-id> </result> </get> </domain> </packet> <packet version=”1.4.1.2”> <domain> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.</errtext> </result> </get> </domain> </packet>

343

The left packet is sent via API RPC 1.4.1.2 and does not return the domain identifier. The right packet is sent using API RPC 1.4.2.0, it indicates the filtering parameter (this time the domain ID) in the filter-id node.

Deleting Domain Accounts
Domain accounts can be deleted individually or in bulk. Plesk Administrator can delete any domain account available in Plesk, while Plesk Clients can delete their own domain accounts only. Domain accounts are deleted by sending a del request packet to Plesk server.

Request Packet Structure
A request XML packet that deletes domain accounts should include the del operation node:
<packet version=”1.4.2.0”> <domain> <del> … </del> </domain> </packet>

The del node does not have a separate type, it is nested within the DomainTypeRequest complex type (domain_input.xsd). The del node has the following graphics representation:

Supported Operations

344

The filter node is required. It indicates domains to be deleted. Data type: DomainFilterType (domain_input.xsd). To see the structure of this node, proceed to topic Filtering Issues (see page 292).

Request Samples
Deleting multiple domain accounts under Plesk Administrator To delete multiple domains, the request packet should filter them either by id, or by domain_name. The following packet is invalid as it uses both id and domain_name nodes within one filter:
<packet version=”1.4.2.0”> <domain> <del> <filter> <id>123</id> <id>124</id> <domain_name>techservice.co.uk</domain_name> <domain_name>techknowledge.co.uk</domain_name> </filter> </del> </domain> </packet>

To filter some domains by id and others by domain_name, use different <del> sections:
<packet version=”1.4.2.0”> <domain> <del> <filter> <id>123</id> <id>124</id> </filter> </del> <del> <filter> <domain_name>techservice.co.uk</domain_name> <domain_name>techknowledge.co.uk</domain_name> </filter> </del> </domain> </packet>

To delete all domains registered in Plesk, the following packet can be used:
<packet version=”1.4.2.0”> <domain> <del> <filter/> </del> </domain> </packet>

Supported Operations

345

To delete all domains of a certain Plesk Client, use ‗group‘ filtering (see topic Filtering Issues (see page 292) for details). Plesk Clients whose domains are deleted can be specified within one filter either by client_id or by client_login.
<packet version=”1.4.2.0”> <domain> <del> <filter> <client_login>technolux</client_login> <client_login>technologic</client_login> </filter> </del> <del> <filter> <client_id>1342</client_id> <client_id>1452</client_id> </filter> </del> </domain> </packet>

You cannot specify clients by login and by id in one filter. Use different filtering rules instead.

Response Packet Structure
The del node of the response packet is structured as follows:

The result node is optional. It wraps the result of the requested del operation. It can be missing if some error occurs before the validation starts. Data type: resultType (common.xsd). The status node is required. It returns the execution status of the del operation. Data type: string. Allowed values: ok | error.

Supported Operations

346

  

The errcode node is optional. It is used to return an error code when the del operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return an error message if the del operation fails. Data type: string. The filter-id node is optional. Is supported by API RPC 1.4.2.0 and later. If supported, it is always present and used to return the parameter by which the domain was filtered by in the request packet. Data type: anySimple. The id node is optional. It is missing if the request packet fails before the validation on the server side. If present, this node identifies the deleted domain. Data type: integer.

Supported Operations

347

Response Samples
A positive response got from the server after deleting the specified domains (e.g. with id = 2435 and id = 2446) looks as follows:
<packet version=”1.4.1.2”> <domain> <del> <result> <status>ok</status> <id>2435</id> </result> <result> <status>ok</status> <id>2446</id> </result> </del> </domain> </packet> <packet version=”1.4.2.0”> <domain> <del> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> </result> <result> <status>ok</status> <filter-id>2446</filter-id> <id>2446</id> </result> </del> </domain> </packet>

Notice the difference in these identical packets sent using different versions of API RPC:   versions 1.4.1.2 and earlier return the domain identifier in its id node; versions 1.4.2.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node). These two nodes can coincide if the domain was filtered by domain_id.

A negative response can look as follows:
<packet version=”1.4.1.2”> <domain> <del> <result> <status>ok</status> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.</errtext> </result> </del> </domain> </packet> <packet version=”1.4.2.0”> <domain> <del> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.</errtext> <filter-id>2446</filter-id> </result> </del> </domain> </packet>

The left packet is sent via API RPC 1.4.1.2 and does not return the domain identifier. The right packet is sent using API RPC 1.4.2.0, it indicates the filtering parameter (this time the domain id) in the filter-id node.

Supported Operations

348

Setting Domain Parameters
Plesk Administrator can set any setting for any domain account registered in Plesk database. Plesk Clients are allowed to manage their own domains only. The settings are as follows:        General domain account information (see page 296) Hosting settings (see page 305) Performance settings (see page 327) Limits (see page 305) on use of Plesk resources Disk usage settings (see page 322) Domain preferences (see page 326) Domain administrator settings (see page 302)

Plesk Administrator can change the base domain settings - the domain name, the IP address, and the domain owner (Plesk Client). A collection of domain settings can be applied to one or several domain accounts at a time. Plesk Administrator can set domain settings for all domains belonging to a certain Plesk Client, or for several clients. Domain settings are set by sending a request set packet to Plesk server.

Request Packet Structure
A request XML packet that sets a collection of domain settings should include the set operation node:
<packet version=”1.4.2.0”> <domain> <set> … </set> </domain> </packet>

Data type: DomainFilterType (domain_input.0 only. The disk_usage node is optional.xsd). Data type: domainUserSet (plesk_domain. It specifies a collection of preferences for the filtered domains. proceed to topic Domain Administrator Settings (see page 302). Data type: domainLimits (plesk_domain. To see the structure of this node. To see the structure of this node. The user node is optional. proceed to topic Hosting Settings (see page 305).1.xsd). proceed to the Limits (see page 305)topic. Data type: SetGenSetupType (plesk_domain. Data type: domainHostingAgentSet (plesk_domain. It indicates domains to be updated with the specified information. proceed to topic Performance Settings (see page 327). To see the structure of this node. proceed to topic Domain Preferences (see page 326). To see the structure of this node. The gen_setup node is optional. The values node is required. It specifies domain administrator settings.xsd).xsd). To see the structure of this node. The prefs node is optional. It specifies the amount of disk space allotted for email boxes and mailing lists on the filtered domain(s). proceed to topic General Account Information (see page 300). The performance node is optional.         . Data type: domainPrefs (plesk_domain. This node is actual beginning with API RPC 1. it is nested within the DomainTypeRequest complex type (domain_input. To see the structure of this node. Data type: DomainPerformanceType (plesk_domain. To see the structure of this node. Data type: none. It specifies a collection of performance settings for the filtered domains. To see the structure of this node. The set node has the following graphics representation:  The filter node is required. It specifies a collection of general domain settings that will be set for the filtered domains.xsd).xsd).Supported Operations 349 The set node does not have a separate type.xsd). It contains a collection of settings that will be set for the filtered domains.4. proceed to topic Disk Space Usage Settings (see page 322).xsd). The limits node is optional. The hosing node is optional. It specifies hosting settings for the filtered domains. It specifies the limits on use of Plesk resources for the filtered domains. Data type: none. proceed to topic Filtering Issues (see page 292).

2.uk</domain_name> <domain_name>techknowledge.0”> <domain> <set> <filter> <id>123</id> <id>124</id> <domain_name>techservice.co.Supported Operations 350 Request Samples Setting data for multiple domains under Plesk Administrator Multiple domains can be specified within one filter either by id.4.4.co. or by domain_name. The following packet is invalid as it uses both id and domain_name nodes within one filter: <packet version=”1.uk</domain_name> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> To specify some domains by id and others by domain_name.uk</domain_name> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> .co. use different set nodes: <packet version=”1.2.0”> <domain> <set> <filter> <id>123</id> <id>124</id> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> <set> <filter> <domain_name>techservice.co.uk</domain_name> <domain_name>techknowledge.

<packet version=”1. the following packet can be used: <packet version=”1. Plesk Clients whose domains are requested can be specified within one filter either by client_id or by client_login.Supported Operations 351 To set the same settings for all domains registered in Plesk.4.2.4. Use different filters (and set operations) instead. use group filtering (see topic Filtering Issues (see page 292) for details).0”> <domain> <set> <filter> <client_login>technolux</client_login> <client_login>technologic</client_login> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> <set> <filter> <client_id>1342</client_id> <client_id>1452</client_id> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> You cannot specify clients by login and by ID in one filter. .2.0”> <domain> <set> <filter/> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> To set the same settings for all domains of a certain Plesk Client.

Thus.2.0”> <domain> <set> <filter/> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> Since the set packet means the update of domain settings in Plesk database.Supported Operations 352 Setting data for multiple domains under Plesk Client Plesk Clients can manage their own domain accounts only.0”> <domain> <set> <filter> <id>123</id> </filter> <values/> </set> </domain> </packet> The values node can specify some or all kinds of settings. . proceed to the relevant sub-topic of Domain Settings (on page 295). In all other respects.4. the values node cannot be left empty. they cannot apply group filtering using nodes client_id and client_login. To see the sample packet for a certain setting.2.4. the request packets shown for Plesk Administrator (above) can be used by Plesk Clients too. One more exception is: the following packet sets the data for all domains belonging to the calling Plesk Client. <packet version=”1. The following packet will cause the error: <packet version=”1.

Data type: integer. The filter-id node is optional. It is missing if the request packet fails before the validation on the server side. It wraps the result of the requested set operation.1. it is always present and used to return the parameter by which the domain was filtered by in the request packet. Data type: string. Data type: unsignedInt.2”> <domain> <set> <result> <status>ok</status> <id>2435</id> </result> . It can be missing if some error occurs before the validation starts.0 and later. It is used to return the error code if the set operation fails. If present. The errcode node is optional. Allowed values: ok | error. The errtext node is optional.      Response Samples A positive response got from the server after updating the specified domains (e. The status node is required. It returns the execution status of the set operation.2. Data type: string. with ID 2435 and ID 2446) looks as follows: <packet version=”1.g. Can be used to return an error message if the set operation fails. Data type: resultType (common.Supported Operations 353 Response Packet Structure The set node of the response packet is structured as follows:  The result node is optional.xsd). this node identifies the domain whose settings are updated. If supported. It is supported by API RPC 1. The id node is optional.4.4. Data type: anySimple.

4. These two nodes can coincide if the domain was filtered by domain_id.2.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node).</errtext> </result> </set> </domain> </packet> <packet version=”1.2.4.Supported Operations <result> <status>ok</status> <id>2446</id> </result> </set> </domain> </packet> <packet version=”1.2. A negative response can look as follows: <packet version=”1.4.0”> <domain> <set> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> </result> <result> <status>ok</status> <filter-id>2446</filter-id> <id>2446</id> </result> </set> </domain> </packet> 354 Notice the difference in these identical packets sent using different versions of API RPC:   versions 1.0”> <domain> <set> <result> <status>ok</status> .1.1.4.2”> <domain> <set> <result> <status>ok</status> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.2 and earlier return the domain identifier in its id node. versions 1.4.

Request Packet Structure A request XML packet getting the list of domain buttons includes the cform_buttons_list operation node: <packet version=”1. To see the structure of this node. it is nested within the DomainTypeRequest complex type (domain_input.Supported Operations <filter-id>2435</filter-id> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found. Data type: DomainFilterType (domain_input. it indicates the filtering parameter (this time the domain ID) in the filter-id node. you need to send the cform_buttons_list request packet to Plesk server.0”> <domain> <cform_buttons_list> … </cform_buttons_list> </domain> </packet> The cform_buttons_list node does not have a separate data type. .4. The right packet is sent using API RPC 1.xsd).2.2 and does not return the domain identifier. proceed to topic Filtering Issues (see page 292).2. This page displays a collection of buttons.4. It indicates domains whose buttons are requested. Getting the Domain Buttons List Each domain account has its own page in Plesk GUI (Domains -> select any domain from the list). To do so.4.1.xsd).0. The cform_buttons_list node has the following graphics representation:  The filter node is required.</errtext> <filter-id>2446</filter-id> </result> </set> </domain> </packet> 355 The left packet is sent via API RPC 1. This list of buttons can be got from Plesk database for the specified domain.

The following packet is invalid as it uses both id and domain_name nodes within one filter: <packet version=”1.uk</domain_name> <domain_name>techknowledge.Supported Operations 356 Request Samples Getting buttons under Plesk Administrator To get buttons for multiple domains.0”> <domain> <cform_buttons_list> <filter/> </cform_buttons_list> </domain> </packet> .2.co. the cform_buttons_list request packet should filter them in the filter node either by id.uk</domain_name> </filter> </cform_buttons_list> </domain> </packet> To filter some domains by id and others by domain_name.4.2. or by domain_name.co.co. the following packet can be used: <packet version=”1. use different cform_buttons_list nodes: <packet version=”1.uk</domain_name> <domain_name>techknowledge.0”> <domain> <cform_buttons_list> <filter> <id>123</id> <id>124</id> </filter> </cform_buttons_list> <cform_buttons_list> <filter> <domain_name>techservice.co.0”> <domain> <cform_buttons_list> <filter> <id>123</id> <id>124</id> <domain_name>techservice.4.2.4.uk</domain_name> </filter> </cform_buttons_list> </domain> </packet> To get buttons of all domains registered in Plesk.

4.xsd). Data type: resultType (common.Supported Operations 357 To get buttons of all domains belonging to a certain Plesk Client. Response Packet Structure The cform_buttons_list node of the response packet is structured as follows:  The result node is optional. It wraps the result of the requested cform_buttons_list operation. Plesk Clients whose domains are filtered can be specified within one filter either by client_id or by client_login.0”> <domain> <cform_buttons_list> <filter> <client_login>technolux</client_login> <client_login>technologic</client_login> </filter> </cform_buttons_list> <cform_buttons_list> <filter> <client_id>1342</client_id> <client_id>1452</client_id> </filter> </cform_buttons_list> </domain> </packet> You cannot specify clients by login and by ID in one filter. Use different filters (and cform_buttons_list nodes) instead. It can be missing if some error occurs before the validation starts. use group filtering (see topic Filtering Issues (see page 292) for details). <packet version=”1.2. .

It is missing if the request packet fails before the validation on the server side. Data type: string. Data type: string. The type node is required. . It is missing if the request packet fails before the validation on the server side. The id node is optional. The button node is optional. Data type: string. It is supported by API RPC 1. Returns the identifier of the domain whose buttons are requested. Data type: string. It is used to return an error code if the cform_buttons_list operation fails.       The href node is required. it is always present and used to return the parameter by which the domain was filtered by in the request packet. Data type: unsignedInt. It returns the identifier of the button. The filter-id node is optional. Data type: buttonDataType (plesk_common. Data type: string. It returns the localized name of the group containing the button. The name_id node is required. Data type: string.4. It returns the URL referenced by the button. It contains the localized button name displayed in Plesk Control Panel. Data type: string.2. Data type: integer.0 and later. Allowed values: link_button (a typical link that references some URL) | comm_button (a typical button whose click event calls a related event handler). The errtext node is optional. The errcode node is optional.Supported Operations 358     The status node is required. It specifies the localization key of the group name. It specifies the button type.xsd). Data type: anySimple. The group_name node is required.   Buttons are described by complex type buttonDataType (plesk_common. Data type: string.xsd) as follows:  The code node is required. It specifies the localization key associated with the button. It returns a collection of parameters that describe the button (see the details below). It returns the execution status of the cform_buttons_list operation. Data type: string. If supported. Allowed values: ok | error. Can be used to return an error message if the cform_buttons_list operation fails. The group_name_id node is required. The name node is required.

Data type: string. The icon_url node is optional. Default value: 0. It returns the JavaScript code executed at the button click. The conhelp_id node is optional.php3</href> <enabled>true</enabled> <new_window>false</new_window> </button> </result> </cform_buttons_list> </domain> </packet> <packet version=”1. Data type: Boolean. It indicates whether the button in enabled. It specifies the location of the button‘s icon. The enabled node is required. If true. The conhelp node is optional. Data type: text (string.4.  Response Samples A positive response with a single button displayed for the specified domain (ID 1324) looks as follows: <packet version=”1. The new_window node is optional. Data type: string. It indicates whether a new window should be opened in the browser when the button is clicked. It returns the button‘s tabulation index. Data type: integer.2. Data type: Boolean.2”> <domain> <cform_buttons_list> <result> <status>ok</status> <id>1324</id> <button> <code>EDIT_BUTTON</code> <type>link_button</type> <name>Edit</name> <name_id>edit</name_id> <group_name>Tools</group_name> <group_name_id>__tools</group_name_id> <href>/domains/d_ed. It returns a context help message displayed in the HELP section of the Plesk navigation pane when pointing at the button with a mouse.0”> <domain> <cform_buttons_list> <result> <status>ok</status> <filter-id>1324</filter-id> <id>1324</id> <button> <code>EDIT_BUTTON</code> <type>link_button</type> .1. Data type: text (string. the button is active and can be used.Supported Operations 359       The js_onclick node is optional.4. white spaces are allowed). The tabindex node is optional. It specifies the localization key of the context help message associated with the button. white spaces are allowed).

</errtext> <id>1324</id> </result> </cform_buttons_list> </domain> </packet> <packet version=”1.2.4.0”> <domain> <cform_buttons_list> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. a negative response can look as follows: <packet version=”1.2”> <domain> <cform_buttons_list> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.1.1. These two nodes can coincide if the domain was filtered by domain_id. If the operation fails.php3</href> <enabled>true</enabled> <new_window>false</new_window> </button> </result> </cform_buttons_list> </domain> </packet> 360 Notice the difference in these identical packets sent using different versions of API RPC:   versions 1.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node).4.2.4.2 and earlier return the domain identifier in its id node.4.Supported Operations <name>Edit</name> <name_id>edit</name_id> <group_name>Tools</group_name> <group_name_id>__tools</group_name_id> <href>/domains/d_ed.</errtext> <filter-id>1324</filter-id> <id>1324</id> </result> </cform_buttons_list> </domain> </packet> . versions 1.

Data type: date. If the packet is missing this node. The since_date node is optional. the period will be limited by the date of the request execution. it is nested within the DomainTypeRequest complex type (domain_input. Request Packet Structure A request XML packet getting traffic information for the specified domains includes the get_traffic operation node: <packet version=”1.2.xsd). the analyzed days will not be limited below. It specifies the end date of the period. The to_date node is optional.xsd). It specifies domains whose traffic information will be got from Plesk database. . Format: YYYY-MM-DD. the response packet will show the traffic of the specified domain day by day since its creation and up to the date of the request execution. proceed to topic Filtering Issues (see page 292). If the packet is missing this element.4. Data type: DomainFilterType (domain_input. Data type: date. To see the structure of this node. Format: YYYY-MM-DD. The get_traffic node has the following graphics representation:  The filter node is required. The resulting information got for each domain lists all days between the specified dates and shows the daily traffic spent by the domain during this day. It specifies the starting date of the period.   If the packet is missing both nodes since_date and to_date.0”> <domain> <get_traffic> … </get_traffic> </domain> </packet> The get_traffic node does not have a separate data type.Supported Operations 361 Getting Traffic Usage Information The get_traffic is used to retrieve information about the traffic spent by a domain between two dates.

Domains are specified within one filter either by id.uk</domain_name> <domain_name>softlux.0”> <domain> <get_traffic> <filter> <client_login>technolux</client_login> <client_login>technologic</client_login> </filter> <since_date>2006-10-01</since_date> </get_traffic> . or by domain_name.0”> <domain> <get_traffic> <filter> <id>1234</id> <id>1235</id> </filter> <since_date>2006-10-01</since_date> </get_traffic> <get_traffic> <filter> <domain_name>technolux.Supported Operations 362 Request Samples Getting traffic info under Plesk Administrator Plesk Administrator can get traffic information for all domains available in Plesk. The following packet is invalid as it uses both id and domain_name nodes within one filter: <packet version=”1.2.co. use group filtering (see topic Filtering Issues (see page 292) for details).2.4.com</domain_name> </filter> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> A valid packet will use two different filter nodes (in two different get_traffic operations): <packet version=”1. Plesk Clients whose domains are filtered can be specified within one filter either by client_id or by client_login.4.uk</domain_name> <domain_name>softlux. <packet version=”1.0”> <domain> <get_traffic> <filter> <id>1234</id> <id>1235</id> <domain_name>technolux.com</domain_name> </filter> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> To get traffic information for all domains belonging to a certain Plesk Client.2.co.4.

send the following packet: <packet version=”1. It wraps the result of the requested get_traffic operation.2. It can be missing if some error occurs before the validation starts.xsd). The status node is required. Data type: resultType (common.  . It returns the execution status of the get_traffic operation.4. To get traffic information for all domains available in Plesk. Data type: string. Allowed values: ok | error.Supported Operations <get_traffic> <filter> <client_id>1342</client_id> <client_id>1452</client_id> </filter> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> 363 You cannot specify clients by login and by ID in one filter.0”> <domain> <get_traffic> <filter/> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> Response Packet Structure The get_traffic node of the response packet is structured as follows:  The result node is optional. Use different filters (and cform_buttons_list nodes) instead.

Data type: integer. It shows the outgoing SMTP traffic (in bytes). Data type: unsignedInt. It shows the incoming traffic (in bytes) got via HTTP protocol. Data type: integer. The http_in node is required. It shows the outgoing HTTP traffic (in bytes). The traffic node is optional. Data type: integer. Data type: integer. Data type: integer.0 and later. It shows the outgoing FTP traffic (in bytes). The http_out node is required. The smtp_in node is required. The id node is optional. Format: YYYY-MM-DD. It is structured as follows:        The date node is required. It specifies the date for which the traffic is shown. The errtext node is optional. Data type: trafficType (plesk_domain. it is always present and used to return the parameter by which the domain was filtered by in the request packet. The ftp_in node is required. It contains a collection of traffic data obtained from Plesk server (see below). . The smtp_out node is required. Data type: date. Returns the identifier of the domain whose traffic is requested.xsd). Can be used to return an error message if the get_traffic operation fails. It is missing if the request packet fails before the validation on the server side. It is used to return an error code if the get_traffic operation fails.xsd).Supported Operations 364    The errcode node is optional. If supported. The ftp_out node is required. Data type: string. It shows the incoming traffic (in bytes) got via SMTP protocol. The filter-id node is optional. Data type: integer. Is supported by API RPC 1.   The traffic node is defined by type trafficType (plesk_domain. Data type: integer.4. Data type: anySimple.2. It shows the incoming traffic (in bytes) got via FTP protocol.

Response Samples A positive response that returns the traffic spent by the specified domains can look as shown below.4. It shows the incoming traffic (in bytes) got via POP3 and IMAP protocols. Data type: integer.2”> <domain> <get_traffic> <result> <status>ok</status> <id>1234</id> <traffic> <date>2005-12-12</date> <http_in>4371212365846</http_in> <http_out>1234111122</http_out> <ftp_in>4121253</ftp_in> <ftp_out>163553</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341156</smtp_out> <pop3_imap_in>1545682</pop3_imap_in> <pop3_imap_out>15434674</pop3_imap_out> </traffic> <traffic> <date>2005-12-13</date> <http_in>4371978643846</http_in> <http_out>1234548722</http_out> <ftp_in>4121153</ftp_in> <ftp_out>123653</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1511112</pop3_imap_in> <pop3_imap_out>16458674</pop3_imap_out> </traffic> </result> <result> <status>ok</status> <id>1247</id> <traffic> <date>2005-12-12</date> <http_in>4371243251846</http_in> <http_out>1234111122</http_out> <ftp_in>4125453</ftp_in> <ftp_out>123153</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1543512</pop3_imap_in> <pop3_imap_out>15436374</pop3_imap_out> </traffic> <traffic> <date>2005-12-13</date> <http_in>4371243251846</http_in> .Supported Operations 365   The pop3_imap_in node is required. This packet returns the information about traffic for two dates for two domains. The pop3_imap_out node is required.1. Data type: integer. <packet version=”1. It shows the outgoing POP3/IMAP traffic (in bytes).

0”> <domain> <get_traffic> <result> <status>ok</status> <filter-id>1234</filter-id> <id>1234</id> <traffic> <date>2005-12-12</date> <http_in>4371212365846</http_in> <http_out>1234111122</http_out> <ftp_in>4121253</ftp_in> <ftp_out>163553</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341156</smtp_out> <pop3_imap_in>1545682</pop3_imap_in> <pop3_imap_out>15434674</pop3_imap_out> </traffic> <traffic> <date>2005-12-13</date> <http_in>4371978643846</http_in> <http_out>1234548722</http_out> <ftp_in>4121153</ftp_in> <ftp_out>123653</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1511112</pop3_imap_in> <pop3_imap_out>16458674</pop3_imap_out> </traffic> </result> <result> <status>ok</status> <filter-id>1247</filter-id> <id>1247</id> <traffic> <date>2005-12-12</date> <http_in>4371243251846</http_in> <http_out>1234111122</http_out> <ftp_in>4125453</ftp_in> <ftp_out>123153</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1543512</pop3_imap_in> <pop3_imap_out>15436374</pop3_imap_out> </traffic> <traffic> 366 .Supported Operations <http_out>1234111122</http_out> <ftp_in>4125453</ftp_in> <ftp_out>123153</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1543512</pop3_imap_in> <pop3_imap_out>15436374</pop3_imap_out> </traffic> </result> </get_traffic> </domain> </packet> <packet version=”1.4.2.

If the operation fails.2.1.2.</errtext> <id>1247</id> </result> </get_traffic> </domain> </packet> <packet version=”1.4.2”> <domain> <get_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. Versions 1.0”> <domain> <get_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations <date>2005-12-13</date> <http_in>4371243251846</http_in> <http_out>1234111122</http_out> <ftp_in>4125453</ftp_in> <ftp_out>123153</ftp_out> <smtp_in>123535</smpt_in> <smtp_out>341356</smtp_out> <pop3_imap_in>1543512</pop3_imap_in> <pop3_imap_out>15436374</pop3_imap_out> </traffic> </result> </get_traffic> </domain> </packet> 367 Notice the difference in these identical packets sent using different versions of API RPC:   Versions 1.</errtext> <id>1324</id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.4.4.4. These two nodes can coincide if the domain was filtered by domain_id.2 and earlier return the domain identifier in its id node.</errtext> <filter-id>1234</filter-id> <id>1324</id> </result> <result> .0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node). a negative response can look as follows: <packet version=”1.1.

the set_traffic operation can help add this data to Plesk database.2. Data type: integer. It specifies the date for which the traffic data is set. .xsd). The set_traffic node has the following graphics representation:   The dom_id node is required.0. If this data is gathered using some external statistics means.Supported Operations <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. this data is added to Plesk automatically.4. Format: YYYY-MM-DD.0”> <domain> <set_traffic> … </set_traffic> </domain> </packet> The set_traffic node does not have a separate type.2.4. Data type: date. The date node is required. Setting Domain Traffic Settings If the traffic usage is calculated on a domain by statistics facilities of Plesk. Request Packet Structure A request XML packet that sets traffic data for a certain domain should include the set_traffic operation node: <packet version=”1.</errtext> <filter-id>1247</filter-id> <id>1247</id> </result> </get_traffic> </domain> </packet> 368 The right packet is sent using API RPC 1. it is nested within the DomainTypeRequest complex type (domain_input. It identifies the domain whose traffic settings are set. it indicates the filtering parameter (this time the domain ID) in the filter-id node.

0”> <domain> <set_traffic> <dom_id>1134</dom_id> <date>2005-12-12</date> <smtp_in>127417</smtp_in> <smtp_out>342899</smtp_out> <pop3_imap_in>384769</pop3_imap_in> <pop3_imap_out>37947<pop3_imap_out> </set_traffic> <set_traffic> <dom_id>1135</dom_id> <date>2005-12-12</date> <smtp_in/> <smtp_out/> <pop3_imap_in>7835683295457</pop3_imap_in> <pop3_imap_out>32876583765<pop3_imap_out> </set_traffic> </domain> </packet> . The pop3_imap_in node is required.Supported Operations 369     The smtp_in node is required. It specifies the incoming traffic (in bytes) got via POP3 and IMAP protocols. use the following packet: <packet version=”1. It is used to show the outgoing SMTP traffic (in bytes).2.4. It specifies the incoming traffic (in bytes) got via SMTP protocol. The pop3_imap_out node is required. The smtp_out node is required.4. use multiple <set_traffic> nodes: <packet version=”1. Data type: integer. It is used to show the outgoing POP3/IMAP traffic (in bytes). Data type: integer.0”> <domain> <set_traffic> <dom_id>1134</dom_id> <date>2005-12-12</date> <smtp_in>514237124628</smtp_in> <smtp_out>6153462547</smtp_out> <pop3_imap_in>49769379</pop3_imap_in> <pop3_imap_out>7236487263<pop3_imap_out> </set_traffic> </domain> </packet> To set traffic information for multiple domains in one packet. Data type: integer.2. Data type: integer. Request Samples To set traffic information for the specified domain.

Data type: integer. Is used to return an error code when the set_traffic operation fails. The status node is required.4.4.     Response Samples After the traffic data is put to Plesk database. The errcode node is optional. a positive response sent back by Plesk server looks as follows: <packet version=”1. Returns the identifier of the domain whose traffic is set. The id node is optional. the response packet will look as follows: <packet version=”1.xsd).0”> <domain> <set_traffic> <result> <status>ok</status> <id>1234</id> </result> </set_traffic> </domain> </packet> If the request packet sets traffic data for multiple domains. Allowed values: ok | error.Supported Operations 370 Response Packet Structure The set_traffic node of the response packet is structured as follows:  The result node is optional. It wraps the result of the requested set_traffic operation.0”> <domain> <set_traffic> .2. Data type: unsignedInt. Data type: string. The errtext node is optional.2. It can be missing if some error occurs before the validation starts. It is missing if the request packet fails before the validation on the server side. Can be used to return an error message if the set_traffic operation fails. Data type: resultType (common. It returns the execution status of the set_traffic operation. Data type: string.

If the operation fails.</errtext> <id>1324</id> </result> </set_traffic> </domain> </packet> .0”> <domain> <set_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations <result> <status>ok</status> <id>1234</id> </result> </set_traffic> <set_traffic> <result> <status>ok</status> <id>1247</id> </result> </set_traffic> </domain> </packet> 371 The packet will return the result for every filtered domain within a separate set_traffic node.4. a negative response can look as follows: <packet version=”1.2.

Supported Operations 372 Retrieving Descriptor of Limits Use the get-limit-descriptor operation to retrieve descriptor of domain limits. For details on limits of a domain.0. refer to the Representation of Object Descriptor (on page 16) section. For details on descriptors. refer to the Limits (on page 306) section.5. The get-limit-descriptor node has the following graphical representation: . Request Packet Structure A request XML packet retrieving domain limits descriptors includes the get-permitdescriptor operation node: <packet version=”1. or the server-level domain limits descriptor.0”> <domain> <get-limit-descriptor> … </get-limit-descriptor> </domain> </packet> You can retrieve limits descriptor for the specified domain (or multiple domains specified by client ID or login name).

client_id. It specifies the client name. It specifies a filtering rule. Note: You can specify multiple id.0"> <domain> <get-limit-descriptor> <filter> <domain_name>5</domain_name> <domain_name>7</domain_name> </filter> </get-limit-descriptor> </domain> </packet> The request packet retrieving limits descriptor for domains of the client specified by ID 3 looks as follows: <packet version ="1.5. refer to the Filters of Descriptors (on page 16) section. Data type: domainFilterType (domain_input.0. Data type: string.0"> <domain> <get-limit-descriptor> <filter> <client_id>3</client_id> </filter> </get-limit-descriptor> </domain> </packet> . For info on filters. Request Samples The request packet retrieving limits descriptor for the domain with ID 5 looks as follows: <packet version ="1.5.5. Data type: integer. It specifies the domain name.com domains looks as follows: <packet version ="1. domain_name and client_login parameters in one filter node. The domain_name is optional.0.xsd). It specifies the domain ID.0"> <domain> <get-limit-descriptor> <filter> <id>5</id> </filter> </get-limit-descriptor> </domain> </packet> The request packet retrieving limits descriptor for MyDomain.Supported Operations 373  The filter node is required. Data type: string (UTF-8).     The id node is optional. The client_login is optional.0. The client_id node is optional. It specifies the client ID. Data type: integer.com and MySample.

Data type: anySimple. Data type: string. Data type: unsignedInt. refer to the Filters of Descriptors (on page 23) section.0"> <client> <get-limit-descriptor> <filter/> </get-limit-descriptor> </client> </packet> Response Packet Structure The get-limit-descriptor node of the output XML packet is structured as follows:      The result node is required.5. The filter-id node is optional. Can be used to return the error message if the get-limitdescriptor operation fails. The errcode node is optional. or client ID depending on a way of descriptor specification in the request packet. This node is available in API RPC 1.0 and later versions. domain ID.5.xsd). client name. Data type: ResultFilterType (plesk_common. It wraps the response retrieved from the server. The errtext node is optional. Data type: string. It specifies the execution status of the get-limit-descriptor operation. For info on filters. It is used to return the error code when the get-limitdescriptor operation fails. Returns either domain name.0. It is required if the get-limit-descriptor operation succeeds.Supported Operations 374 The request packet retrieving the server-level descriptor of domain limits looks as follows: <packet version ="1.0. Allowed values: ok | error. . The status node is required.

The descriptor node is optional. refer to Representation of Object Descriptor (on page 16).0"> <domain> <get-limit-descriptor> <result> <status>ok</status> <filter-id>MyDomain. For details.5. Note: This descriptor contains limits extensions. Returns the unique identifier of the domain. Data type: integer.com</filter-id> <id>10</id> <descriptor> <property> <name>max_subdom</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_subdom</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_dom_aliases</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_dom_aliases</label> <extension> <shared>false</shared> </extension> </property> <property> <name>disk_space</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__disk_space</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_traffic</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__max_traffic</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_wu</name> . Data type: string.Supported Operations 375   The id node is optional. It specifies the object descriptor. It is required if the get-limit-descriptor operation succeeds.0. refer to the Extension of Limits Descriptor (see page 20) section. For details. Response Samples A positive response from the server can look as follows: <packet version="1.

Supported Operations <type>int</type> <writable-by>admin</writable-by> <label>limit__max_wu</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_db</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_db</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_box</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_box</label> <extension> <shared>false</shared> </extension> </property> <property> <name>mbox_quota</name> <type>bytes</type> <writable-by>admin</writable-by> <label>limit__mbox_quota</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_redir</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_redir</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_mg</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_mg</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_resp</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_resp</label> <extension> <shared>false</shared> </extension> 376 .

0.0"> <domain> <get-limit-descriptor> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>MyDomain.Supported Operations </property> <property> <name>max_maillists</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_maillists</label> <extension> <shared>false</shared> </extension> </property> <property> <name>max_webapps</name> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_webapps</label> <extension> <shared>false</shared> </extension> </property> <property> <name>expiration</name> <type>date</type> <writable-by>admin</writable-by> <label>limit__expiration</label> <extension> <shared>true</shared> </extension> </property> </descriptor> </result> </get-limit-descriptor> </domain> </packet> 377 If the domain specified in the request packet was not found on the server.5.com</filter-id> </result> </get-limit-descriptor> </domain> </packet> . the result is as follows: <packet version="1.

It specifies the client ID.xsd). The client_login is optional. For details on permissions of a domain administrator. Data type: string. The domain_name is optional.0.0”> <domain> <get-limit-descriptor> … </get-limit-descriptor> </domain> </packet> You can retrieve descriptor for the specified domain (or multiple domains specified by client ID or login name) or the server-level descriptor of domain administrator permissions descriptor. Data type: integer. Data type: string (UTF-8). It specifies the domain name. The get-permission-descriptor node has the following graphical representation:  The filter node is required. It specifies a filtering rule.5.     The id node is optional. Data type: domainFilterType (domain_input. refer to the Filters of Descriptors (on page 16) section. It specifies the client name. refer to the Representation of Object Descriptor (on page 16) section. refer to the Permissions (on page 306) section. Data type: integer. For info on filters. It specifies the domain ID. . For details on descriptors. The client_id node is optional. Request Packet Structure A request XML packet retrieving descriptor of domain administrator's permissions includes the get-permission-descriptor operation node: <packet version=”1.Supported Operations 378 Retrieving Descriptor of Permissions Use the get-permission-descriptor operation to retrieve descriptor of domain administrator's permissions.

com and MySample.5.5.5.com domains looks as follows: <packet version ="1.0"> <domain> <get-permission-descriptor> <filter> <domain_name>5</domain_name> <domain_name>7</domain_name> </filter> </get-permission-descriptor> </domain> </packet> The request packet retrieving permissions descriptor for domains of the client specified by ID 3 looks as follows: <packet version ="1. Request Samples The request packet retrieving permissions descriptor for the domain with ID 5 looks as follows: <packet version ="1.0"> <domain> <get-permission-descriptor> <filter> <client_id>3</client_id> </filter> </get-permission-descriptor> </domain> </packet> The request packet retrieving the server-level descriptor of domain administrator's permissions looks as follows: <packet version ="1.0"> <client> <get-limit-descriptor> <filter/> </get-limit-descriptor> </client> . client_id.0.0. domain_name and client_login parameters in one filter node.Supported Operations 379 Note: You can specify multiple id.5.0.0.0"> <domain> <get-permission-descriptor> <filter> <id>5</id> </filter> </get-permission-descriptor> </domain> </packet> The request packet retrieving permissions descriptor for MyDomain.

It is required if the get-permission-descriptor operation succeeds.0 and later versions. Data type: string. Can be used to return the error message if the getpermission-descriptor operation fails.5. The descriptor node is optional. Data type: string. The filter-id node is optional.0. The status node is required. For details. It is required if the get-permission-descriptor operation succeeds.Supported Operations </packet> 380 Response Packet Structure The get-permission-descriptor node of the output XML packet is structured as follows:      The result node is required. or client ID depending on a way of descriptor's specification in the request packet. It specifies the execution status of the get-permissiondescriptor operation. This node is available in API RPC 1. Data type: integer. For info on filters. It is used to return the error code when the getpermission-descriptor operation fails. client name. domain ID. The id node is optional. It wraps the response retrieved from the server. Data type: unsignedInt. Data type: ResultFilterType (plesk_common. refer to Representation of Object Descriptor (on page 16). It specifies the object descriptor. refer to the Filters of Descriptors (on page 23) section. For details. Data type: string. Data type: anySimple. Returns the unique identifier of the domain. The errcode node is optional. .xsd). refer to the Extension of Permissions Descriptor (on page 18) section. Returns either domain name.   Note: This descriptor contains permissions extensions. Allowed values: ok | error. The errtext node is optional.

com</filter-id> <id>10</id> <property> <name>manage_sh_access</name> <type>boolean</type> <default-value>false</default-value> <writable-by>admin</writable-by> <label>cl_perm__manage_sh_access</label> <extension> <level>client</level> <level>domain</level> </extension> </property> .5.0"> <domain> <get-permission-descriptor> <result> <status>ok</status> <filter-id>MyDomain.Supported Operations 381 Response Samples A positive response from the server can look as follows: <packet version="1.0"> <domain> <get-permission-descriptor> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>MyDomain.com</filter-id> </result> </get-permission-descriptor> </domain> </packet> .. <property> <name>manage_dashboard</name> <type>boolean</type> <default-value>true</default-value> <writable-by>admin</writable-by> <writable-by>client</writable-by> <label>cl_perm__manage_dashboard</label> <extension> <level>client</level> <level>domain</level> </extension> </property> </descriptor> </result> </get-permission-descriptor> </domain> </packet> If the domain specified in the request packet was not found on the server..5.0. the result is as follows: <packet version="1.0.

Data type: string. For details on descriptors. refer to the Representation of Object Descriptor (on page 16) section. The client_id node is optional. Data type: domainFilterType (domain_input. The domain_name is optional. refer to the Filters of Descriptors (on page 16) section.     The id node is optional. For info on filters.5. For details on hosting settings. Data type: integer.0.0”> <domain> <get-physical-hosting-descriptor> … </get-physical-hosting-descriptor> </domain> </packet> You can retrieve descriptor for the specified domain (or multiple domains specified by client ID or login name) or the server-level descriptor of hosting settings. It specifies the client ID. Data type: string (UTF-8). It specifies the client name. Data type: integer.xsd).Supported Operations 382 Retrieving Descriptor of Hosting Settings Use the get-physical-hosting-descriptor operation to retrieve descriptor of domain hosting settings. . refer to the Hosting Settings (on page 307) section. The getphysical-hosting-descriptor node has the following graphical representation:  The filter node is required. The client_login is optional. It specifies the domain ID. It specifies a filtering rule. Request Packet Structure A request XML packet retrieving descriptor of hosting settings includes the get-physicalhosting-descriptor operation node: <packet version=”1. It specifies the domain name.

0.5.0"> <domain> <get-physical-hosting-descriptor> <filter> <client_id>3</client_id> </filter> </get-physical-hosting-descriptor> </domain> </packet> The request packet retrieving the server-level descriptor of hosting settings looks as follows: <packet version ="1.Supported Operations 383 Note: You can specify multiple id.5.0. client_id. Request Samples The request packet retrieving descriptor of hosting settings for the domain with ID 5 looks as follows: <packet version ="1.com and MySample.5.0.0"> <domain> <get-physical-hosting-descriptor> <filter> <id>5</id> </filter> </get-physical-hosting-descriptor> </domain> </packet> The request packet retrieving descriptor of hosting settings for MyDomain.0"> <client> <get-physical-hosting-descriptor> <filter/> </get-physical-hosting-descriptor> </client> </packet> .0.5.com domains looks as follows: <packet version ="1. domain_name and client_login parameters in one filter node.0"> <domain> <get-physical-hosting-descriptor> <filter> <domain_name>5</domain_name> <domain_name>7</domain_name> </filter> </get-physical-hosting-descriptor> </domain> </packet> The request packet retrieving descriptor of hosting settings for domains of the client specified by ID 3 looks as follows: <packet version ="1.

refer to the Extension of Hosting Settings Descriptor (on page 19) section.Supported Operations 384 Response Packet Structure The get-physical-hosting-descriptor node of the output XML packet is structured as follows:      The result node is required. Returns either domain name. Data type: string. client name. refer to the Filters of Descriptors (on page 23) section. Allowed values: ok | error. .0. It specifies the object descriptor.xsd). It is required if the get-physical-hosting-descriptor operation succeeds. The status node is required.5. This node is available in API RPC 1. It is required if the get-physical-hosting-descriptor operation succeeds. Data type: unsignedInt. For details. The errcode node is optional. The filter-id node is optional.   Note: This descriptor contains hosting settings extensions. For details. The id node is optional. Returns the unique identifier of the domain. The descriptor node is optional. Data type: string. Data type: string. Can be used to return the error message if the getphysical-hosting-descriptor operation fails. The errtext node is optional. It specifies the execution status of the get-physicalhosting-descriptor operation.0 and later versions. domain ID. For info on filters. refer to Representation of Object Descriptor (on page 16). It is used to return the error code when the get-physicalhosting-descriptor operation fails. It wraps the response retrieved from the server. Data type: integer. or client ID depending on a way of descriptor's specification in the request packet. Data type: anySimple. Data type: ResultFilterType (plesk_common.

the result is as follows: <packet version="1.0. <enum> <value>/usr/local/psa/bin/chrootsh</value> <label>/bin/bash (chrooted)</label> </enum> <enum> <value>/bin/rbash</value> <label>/bin/rbash</label> </enum> <writable-by>admin</writable-by> <label>hst_def__shell</label> </property> If the domain specified in the request packet was not found on the server.Supported Operations 385 Response Samples A positive response from the server can look as follows: <packet version="1.com</filter-id> <id>15</id> <descriptor> <property> <name>ftp_login</name> <type>string</type> <writable-by>admin</writable-by> <label>hst_def__fp_admin_login</label> </property> <property> <name>fp_admin_password</name> <type>passwordString</type> <writable-by>none</writable-by> <label>hst_def__fp_admin_passwd</label> </property> <property> <name>shell</name> <type>string</type> <enum> <value>/bin/false</value> <label>Forbidden</label> </enum> <enum> <value>/bin/ash</value> <label>/bin/ash</label> </enum> <enum> <value>/bin/bash</value> <label>/bin/bash</label> </enum> .5...0.0"> <domain> <get-physical-hosting-descriptor> <result> <status>ok</status> <filter-id>MyDomain.0"> <domain> <get-permission-descriptor> .5.

Supported Operations <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>MyDomain.com</filter-id> </result> </get-permission-descriptor> </domain> </packet> 386 .

or the primary domain ID.0 and later API RPC version: 1. name SET (see page 401) updates the alias settings for the alias specified by ID name.0 and higher Plesk user: Plesk Administrator Description Domain Aliases are alternative names for the domain name.6 Win | Unix 8. Supported operations       CREATE (see page 391) creates an alias for the specified domain GET (see page 395) retrieves the alias settings for the alias specified by ID name.4.5.xsd. domainalias_output.Supported Operations 387 Managing Domain Aliases Operator: <domain_alias> XML Schema: domainalias_input. or the primary domain ID. name DELETE (see page 405) removes the specified alias from the domain RENAME (see page 408) renames the alias related to the specified domain GET-SUPPORTED-SERVICES (see page 411) retrieves the list of domain alias supported services which can be managed on the server .0.4.xsd Plesk version: Plesk 7. Plesk Administrators can manage all domain aliases registered on Plesk server.0 version of API RPC. Tomcat (Java) redirection means that the Tomcat server set on the primary domain (port 9080) handles requests coming from domain aliases (from port 9080). Note: The Tomcat support is provided from the 1. You can also use domain aliases to redirect mail and Java applications from the domain alias to your original domain name.2.

If you need to serve several domain names that point to a web site hosted on another server. Data type: byte.2. It specifies the current status of the domain alias. you should set up domain forwarding. primary domain disabled)  The pref node is optional. Whenever you change mail exchange records in the domain DNS zone. it defines the alias form. This node is used only in Plesk for Unix. If specified.0 and earlier versions) . However. or read from the database. Allowed values:     0 (alias enabled) 1 (alias disabled) 2 (primary domain disabled) 3 (alias disabled. resource records in its DNS zone are copied from the original domain name. the external mail server should be configured accordingly. or they can be set for this domain alias later. be sure to introduce the respective changes in the DNS zone of the domain alias.xsd).4. too. To specify the alias form. your domain alias will point to that mail server. to accept mail for the domain alias. choose between the following options: (API RPC 1. Domain alias settings are defined by the settings node and presented by type Settings (plesk_domainalias. These settings can be set on creation of a domain alias. Domain Alias Settings This section describes settings that can be predefined for a domain alias. This means that if your original domain points to an external mail server.Supported Operations 388 Remarks When you set up a domain alias. It has the following graphics representation:  The status node is optional.

0. This node is required in API RPC v.5.     The manage-dns node is optional. Data type: none.1. Data type: boolean.4.0.2. It contains the following additional nodes:  The domain_id node is required.0.0. Data type: integer.1. be sure to call operation get-supported-services (see page 411) retrieving from server information on which of them are operable. Tomcat redirection is supported from the 1.2.5.1. This node is required in API RPC v. It is used when you want to redirect Java applications from a domain alias to the Tomcat server on the primary domain (Tomcat server port 9080).0 (and later) Data type: boolean.0 (and earlier) and optional in API RPC v. This node is supported starting from API RPC v. It defines if you can manage DNS zone for the domain alias. The full node is used when you want to create both web.0 and later versions)  The web node is used when you want to redirect web content from a domain alias name to your original domain name. AliasInfoType (plesk_domainalias.0 (and earlier) and optional in API RPC v. Data type: boolean.4.Supported Operations 389 (API RPC 1. Note: Before performing any operations on domain alias settings. The mail node is used when you want to redirect mail from a domain alias name to your original domain name.2. The tomcat node is optional.1.5. Data type: boolean.0 version of API RPC.This node is used only in Plesk for Unix.xsd) is an extension of the Settings type.5.0. mail and tomcat aliases. .0 (and later).1. It specifies the id of the primary domain.4.

xsd) allows you to specify a domain alias either by id. Note: Use <filter/> to update settings of all domain aliases on the server or delete all domain aliases from the server. the packet needs a special filter section structured as follows: The DomainAliasFilterType (domainalias_input. Finally. . It specifies the domain alias by id. which means that all domain aliases are selected. name. It specifies the domain alias by name. Data type: integer. The request XML filters domain aliases using a special filter section.Supported Operations 390   The name node is required. or primary domain name. primary domain id. It specifies the name (in Unicode) of the primary domain. When created. Data type: string. The domain_id node is optional. Data type: integer. a domain alias is given a unique identifier and a unique name. The domain_name is optional. it allows you to specify multiple domain aliases within one filter. It specifies the name (in ASCII) of the primary domain. Filtering is the way the request XML packet indicates the object (one or several domain aliases) to which the operation will be applied. It specifies the domain alias by id of the primary domain. Data type: string (Unicode). The ascii_name node is optional. Thus. for the set or get operation). the filter can be left empty. Data type: string (Unicode). to specify a domain alias (e. Filtering Issues This section describes some peculiarities of domain alias filtering.g. Data type: string. It specifies the domain alias by name of the primary domain. In addition. The name node is optional.     The id node is optional.

4.4. Alias settings can be set using the set (see page 401) operation. a packet that retrieves the information about all domain aliases looks as follows: <packet version="1. You can also specify alias settings when creating a domain alias (all of them are optional):   Alias status Alias preferences You can specify alias settings during or after creation of an alias.0"> <domain_alias > <create> … </create> </domain_alias> </packet> . To create a domain alias.2. it is enough to specify the domain ID and the domain name. To get information on which domain alias settings can be set on a particular server.2.Supported Operations 391 For example. use the get-supported-services (see page 411) operation.0"> <domain_alias> <get> <filter/> </get> </domain_alias> </packet> Creating Domain Aliases Only Plesk Administrator can create domain aliases via API RPC. Request Packet Structure A request XML packet creating a new domain alias in Plesk database includes the create operation node: <packet version="1.

For more information.   Note: This node is supported starting from API RPC v. The pref node is optional.com</name> </create> </domain_alias> </packet> .0"> <domain_alias> <create> <domain_id>12</domain_id> <name>myalias.4. Data type: string. Data type: string (Unicode). It specifies the status of a domain alias.2.0. It specifies the name of the primary domain. <packet version="1. Data type: string (ASCII). The ascii-name node is optional.0. Request Samples Creating a single domain alias To create a domain alias.Supported Operations 392 The create node is presented by the AliasInfoType type (plesk_domainalias.1. It specifies the id of the primary domain. Allowed values: ok | error.4. For more information.2. It defines if you can manage DNS zone for the domain alias. specify the ID of the primary domain (the alias will be linked to) and name of the alias. Data type: none. see the Domain Alias Settings (see page 388) section. The name node is required. Remarks The ascii-name node is supported by API RPC 1.xsd). It specifies the name of the primary domain.0 and later versions.    The domain_id node is required. Data type: integer. The manage-dns node is optional.5. Data type: boolean. Its graphical representation is as follows:  The status node is optional. see the Domain Alias Settings (see page 388) section. It specifies preferences of a domain alias.

com</name> </create> </domain_alias> </packet> Alias settings The following packet creates three domain aliases to the domain with ID 12.0"> <domain_alias> <create> <domain_id>12</domain_id> <name>MyAlias.com</name> </create> <create> <status>0</status> <pref> <web>1</web> <mail>0</mail> <tomcat>0</tomcat> </pref> <domain_id>12</domain_id> <name>DisabledAlias. The alias settings are as follows:    DisabledAlias is disabled.com</name> </create> <create> <status>2</status> <pref> <full/> </pref> <domain_id>12</domain_id> <name>DisWebMailAlias.0"> <domain_alias> <create> <status>1</status> <domain_id>12</domain_id> <name>DisabledAlias.com</name> </create> <create> <domain_id>12</domain_id> <name>MySecondAlias. EnabledWebOnlyAlias is enabled and has only web content redirection.Supported Operations 393 Creating multiple domain aliases To create two domain aliases with a single packet. DisWebMaillAlias is disabled because the primary domain (ID 12) is disabled and has both mail.4. web and tomcat redirection.2.com</name> </create> .2.4. <packet version="1. include two different create operations: <packet version="1.

This node is absent starting from API RPC v.xsd).0. It returns the ID of the domain alias. The name node is optional. Allowed values: ok | error. Data type: unsignedInt. it is required if the create operation has succeeded. The status node is required. Can be used to return the error message if the create operation fails. It is used to return the error code when the create operation fails. Data type: string. The errcode node is optional. It wraps the response retrieved from the server. Data type: integer. Returns the unique identifier of the domain alias just added to Plesk. The id node is optional. It does not hold any value for this operation.  Response Samples Creating a single domain alias A positive response received from the server after adding a new domain alias can look as follows: <packet version="1.5.0. It specifies the execution status of the create operation.2. The errtext node is optional. Data type: AliasResultType (domainalias_output. Data type: string. Data type: string.4.1.Supported Operations </domain_alias> </packet> 394 Response Packet Structure The create node of the output XML packet is structured as follows:      The result node is required.0"> <domain_alias> <create> <result> <status>ok</status> <id>34</id> </result> .

0"> <domain_alias > <get> … </get> </domain_alias> </packet> .0"> <domain_alias> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2.Supported Operations </create> </domain_alias> </packet> 395 A negative response can look as follows: <packet version="1.</errtext> </result> </add> </domain_alias> </packet> Retrieving Information On Domain Aliases The get operation is used to retrieve info on domain aliases from Plesk database that includes the following parameters:   Domain alias preferences Primary domain id and name Request Packet Structure A request XML packet retrieving a domain alias settings from Plesk database includes the get operation node: <packet version="1.2.4.4.

Data type: integer. Data type: string (Unicode). It specifies the domain alias by name of the primary domain.0"> <domain_alias> <get> <filter> <name>MyAlias.xsd). Data type: integer. The domain_name is optional. The name node is optional. It specifies the filtering rule.4. <packet version="1. For information on filters. The domain_id node is optional. In the elder versions of API RPC you can use only one domain_id or domain_name in a single filter. The id node is optional.com</name> </filter> </get> </domain_alias> </packet> . Data type: string (Unicode).4.0 and later versions.refer to the Filtering Issues (see page 390) section.com.2. It specifies the domain alias by name.Supported Operations 396 The get node graphical representation is as follows:  The filter node is required. Request Samples Retrieving settings of a single domain alias This packet retrieves preferences of the domain alias called MyAlias. Data type: domainAliasFilterType (domainalias_input.     Note: You can create filtering rules for multiple domain_id and domain_name parameters in API RPC 1. It specifies the domain alias by id.2. It specifies the domain alias by ID of the primary domain.

<packet version="1.0"> <domain_alias> <get> <filter/> </get> </domain_alias> </packet> . <packet version="1.com</name> <name>MySecondAlias.4.0"> <domain_alias> <get> <filter> <name>MyAlias.4.2.0"> <domain_alias> <get> <filter> <name>MyAlias.2.com</name> </filter> </get> </domain_alias> </packet> The following packet is wrong because both name and domain_id are used for identification.2. <packet version="1.Supported Operations 397 Retrieving settings of multiple domain aliases This packet retrieves preferences of the domain aliases called MyAlias.com.4.com and MySecondAlias.com</name> <domain_id>12</domain_id> </filter> </get> </domain_alias> </packet> This packet retrieves preferences of all domain aliases on the server.

Note: If the get operation has succeeded. . Data type: unsignedInt. refer to the Domain Alias Settings (see page 388)section. For more information.1. It returns the domain alias id. It is present if the get operation succeeds and contains the alias preferences.  The info node is optional. response packets contain the name node instead of the filter-id node. The node holds the domain alias name Data type: string. Is used to return the error code when the get operation fails. Data type: string. The errtext node is optional.Supported Operations 398 Response Packet Structure The get node of the output XML packet is structured as follows:      The result node is required. Can be used to return the error message if the get operation fails. It is required if the operation succeeds or if this name was specified in the request packet. Data type:anySimple. Data type: integer. Data type: resultFilterType (common.4. both id and name nodes are required. The filter-id node is optional. It returns a filtering rule parameter. Specifies the execution status of the get operation. Data type: AliasInfoType (plesk_domainalias. Data type: string. it is required if the get operation has succeeded or if this id was specified in the request packet. The id node is optional. The name node is optional. Allowed values: ok | error.xsd).2. For more information. The errcode node is optional. It wraps the response received from the server.xsd). refer to the Filtering Issues section.0 and earlier.  Note: In API RPC v. The status node is required.

0"> <domain_alias> <get> <result> <status>ok</status> <id>34</id> <name>MyAlias.0"> <domain_alias> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain alias does not exist</errtext> <name>MyAlias. the negative response can look as follows: <packet version="1.2.com</name> <ascii-name>PrimaryForThisAlias.4.2.Supported Operations 399 Response Samples Retrieving settings of a single domain alias A positive response received from the server after retrieving info on the domain alias can look as follows: <packet version="1.com</domain_name> </filter> </get> .0"> <domain_alias> <get> <filter> <domain_name>PrimaryDomain.com</ascii-name> </info> </result> </get> </domain_alias> </packet> If a request packet tried to retrieve settings of the non-existent domain alias (MyAlias.2.com).4.com</name> <info> <prefs> <web>true</web> <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryForThisAlias.4.com</name> </result> </get> </domain_alias> </packet> Retrieving settings of multiple domain alias A possible request packet is: <packet version="1.

com</ascii-name> </info> </result> <result> <status>ok</status> <id>127</id> <name>My2Alias.com</ascii-name> </info> </result> </get> </domain_alias> </packet> .com</name> <ascii-name>PrimaryDomain.0"> <domain_alias> <get> <result> <status>ok</status> <id>124</id> <name>MyAlias.0"> <domain_alias> <get> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </result> </get> </domain_alias> </packet> A positive response got from the server can look as follows (two domain aliases exist for this domain name): <packet version="1.2.4.com</name> <info> <prefs> <web>true</web> <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryDomain.4.2.com</name> <ascii-name>PrimaryDomain.Supported Operations </domain_alias> </packet> 400 A possible negative response got from the server is (the domain name does not exist on the server): <packet version="1.com</name> <info> <prefs> <web>false</web> <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryDomain.

com and the primary domain. </set> </domain_alias> </packet> The set node graphical representation is as follows:  The filter node specifies which domain aliases will be affected. use the get-supported-services (see page 411) operation. For more information.0"> <domain_alias> <set> <filter> <name>MyAlias. Request Packet Structure A request XML packet changing the domain alias settings in the Plesk database includes the set operation node: <packet version="1. Mail and Tomcat references between MyAlias. please refer to the Domain Alias Settings (see page 388) section. You can update all settings of a domain alias in bulk or specify some particular settings. For more information visit the Domain Alias Settings (see page 388) section.com</name> </filter> <settings> <pref> <full/> .Supported Operations 401 Updating Domain Aliases Settings The set operation is used to update settings of domain aliases stored in Plesk database..0"> <domain_alias> <set> .2. To get information on which domain alias settings can be updated on a particular server. For more information.4. Data type: Settings (plesk_domainalias.xsd) The settings node defines settings to be applied to these domain aliases.xsd)  Request Samples Updating settings of a single domain alias This packet sets up Web. <packet version="1.4. refer to the Filtering Issues (see page 390) section.2. Data type: DomainAliasFilterType (domainalias_input..

Data type: resultFilterType (common.Supported Operations </pref> </settings> </set> </domain_alias> </packet> 402 Updating settings of multiple domain aliases This packet switches off mail redirection from domain aliases to the primary domain MyPrimary.0"> <domain_alias> <set> <filter> <domain_name>MyPrimary.2.com. <packet version="1.4. Allowed values: ok | error.xsd). It wraps the response retrieved from the server.com</domain_name> </filter> <settings> <pref> <web>1</web> <mail>0</mail> <tomcat>0</tomcat> </pref> </settings> </set> </domain_alias> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:   The result node is required. Specifies the execution status of the set operation. Data type: string. . The status node is required.

2. a negative response will look as follows: <packet version="1.  Response Samples Updating settings of a single domain alias A positive response retrieved from the server after applying domain alias settings can look as follows: <packet version="1.4.  The name node is optional. It returns the error code when the set operation fails. Note: In API RPC v. refer to the Filtering Issues section. Data type: string. response packets contain the name node instead of the filter-id node.4.Supported Operations 403    The errcode node is optional. It returns the error message if the set operation fails. For more information. It is required if the operation succeeds. It returns the domain alias ID. It returns a filtering rule parameter.com</name> </result> </set> </domain_alias> </packet> If a request packet tries to apply settings to a non-existent domain alias (id = 13).0"> <domain_alias> <set> <result> <status>ok</status> <name>MyAlias. Data type: integer. The node holds the primary domain name or alias name depending on the name specified in the request packet.2.4. it is required if the alias id was specified in the request packet.0 and earlier. Data type: string.0"> <domain_alias> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain alias does not exist</errtext> <id>13</id> </result> </set> </domain_alias> </packet> Updating settings of multiple domain aliases A possible request packet can look as follows: . The errtext node is optional. The filter-id node is optional. The id node is optional. Data type:anySimple.1.2. Data type: unsignedInt.

4.com</name> </result> </set> </domain_alias> </packet> .com</domain_name> </filter> <settings> <pref> <full/> </pref> </settings> </set> </domain_alias> </packet> 404 A possible negative response from the server looks as follows: <packet version="1.2.0"> <domain_alias> <set> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </result> </set> </domain_alias> </packet> A possible positive response from the server looks as follows (two domain aliases updated): <packet version="1.com</name> </result> <result> <status>ok</status> <id>101</id> <name>MyPrimary.2.0"> <domain_alias> <set> <result> <status>ok</status> <id>100</id> <name>MyPrimary.2.0"> <domain_alias> <set> <filter> <domain_name>MyPrimary.4.Supported Operations <packet version="1.4.

.0"> <domain_alias> <delete> .4.0"> <domain_alias> <delete> <filter> <domain_name>MyPrimary..com alias: <packet version="1.com and My2Primary.Supported Operations 405 Deleting Domain Aliases Use the delete operation to remove a specified domain alias from Plesk database. </delete> </domain_alias> </packet> The delete node graphical representation is as follows:  The filter node specifies the filtering rule.com. Data type: DomainAliasFilterType (domainalias_input.2. <packet version="1.2.com</name> </filter> </delete> </domain_alias> </packet> Deleting multiple domain aliases This packet deletes all domain aliases from the primary domains MyPrimary.0"> <domain_alias> <delete> <filter> <name>MyAlias. For information on filters. refer to the Filtering Issues (see page 390) section.2.4. Request Packet Structure A request XML packet removing the domain aliases from Plesk database includes the delete operation node: <packet version="1.4.xsd) Request Samples Deleting a single domain alias This packet deletes the MyAlias.com</domain_name> .

Data type: unsignedInt. <packet version="1. The status node is required. Data type: string. For more information.0"> <domain_alias> <delete> <filter/> </delete> </domain_alias> </packet> Response Packet Structure The delete node of the output XML packet is structured as follows:      The result node is required. The filter-id node is optional. Data type:anySimple. Data type: string.Supported Operations <domain_name>My2Primary. The errtext node is optional.com</domain_name> </filter> </delete> </domain_alias> </packet> 406 This packet removes all domain aliases from all domains on the server. It returns the error code when the delete operation fails. The errcode node is optional. Data type: resultFilterType (common. Can be used to return the error message if the delete operation fails.2. Allowed values: ok | error.xsd). refer to the Filtering Issues section. It specifies the execution status of the delete operation. . It wraps the response retrieved from the server.4. It returns a filtering rule parameter.

0"> <domain_alias> <delete> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain does not exist</errtext> <name>MyAlias.0 and earlier.com</name> </result> </delete> </domain_alias> </packet> A negative response from the server can look as follows: <packet version="1.2. it is required if the operation delete succeeds. response packets contain the name node instead of the filter-id node. The name node is optional.4. It returns the domain alias ID.4.0"> <domain_alias> <delete> <result> <status>ok</status> <id>13</id> <name>MyAlias. Data type: string. It is present if the operation succeeds.  The id node is optional.4.1. The node returns the domain alias name.2.4.Supported Operations 407 Note: In API RPC v.2.0"> <domain_alias> <delete> <filter> <domain_id>128</domain_id> </filter> </delete> </domain_alias> </packet> A positive response retrieved from the server can look as follows: <packet version="1. Data type: integer.2. Response Samples Deleting a single domain alias The request packet looks as follows: <packet version="1.com</name> .com</name> </result> <result> <status>ok</status> <id>14</id> <name>My2Alias.

or by name.2... It specifies the domain alias by ID. . The name node is required. It specifies the domain alias by name.Supported Operations </result> </delete> </domain_alias> </packet> 408 Renaming Domain Aliases The rename operation is used to rename the specified domain alias.0"> <domain_alias> <rename> . </rename> </domain_alias> </packet> The rename node graphical representation is as follows:    The id node is required. Data type: integer. The domain alias can be specified either by ID. It is used to assign a new domain alias name. Data type: string (Unicode).4. Request Packet Structure A request XML packet renaming the domain alias in Plesk database includes the rename operation node: <packet version="1. Data type: string (Unicode). The new_name node is required.

<packet version="1.com domain alias to MyNewAlias.4. It wraps the response retrieved from the server. Is used to return the error code when the rename operation fails.2.Supported Operations 409 Request Samples Renaming a domain alias The following XML packet renames the MyAlias.xsd).com</name> <new_name>MyNewAlias.2. . Data type: unsignedInt. Data type: string. The errtext node is optional. Specifies the execution status of the rename operation.0"> <domain_alias> <rename> <id>15</id> <name>MyAlias. The errcode node is optional.4. Data type: resultType (common. The status node is required. Can be used to return the error message if the rename operation fails.com</name> </rename> </domain_alias> </packet> Response Packet Structure The rename node of the output XML packet is structured as follows:     The result node is required.0"> <domain_alias> <rename> <name>MyAlias.com: <packet version="1. Allowed values: ok | error. Data type: string.com</new_name> </rename> </domain_alias> </packet> The following XML packet is not valid because it specifies both alias name and id.

2.4.</errtext> </result> </rename> </domain_alias> </packet> .0"> <domain_alias> <rename> <result> <status>ok</status> </result> </rename> </domain_alias> </packet> A negative response can look as follows: <packet version="1.4.0"> <domain_alias> <rename> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations 410 Response Samples Renaming a domain alias The following packet shows that the domain alias was successfully renamed: <packet version="1.2.

0"> <domain_alias> <get-supported-services/> </domain_alias> </packet> Response Samples Response from server that runs Plesk for Unix.2.can be enabled/ disabled for domain aliases on the server.2.0"> <domain_alias> <get-supported-services> <result> <status>ok</status> <service>web</service> <service>mail</service> <service>tomcat</service> </result> </get-supported-services> </domain_alias> </packet> Response from server that runs Plesk for Windows.4.4. Mail and Tomcat . looks like: <packet version="1. looks like: <packet version="1. The number of manageable services on domain aliases differ in Plesk for Unix and Plesk for Windows: You cannot switch Tomcat service for domain aliases in Plesk for Windows.2.2.Supported Operations 411 Retrieving Information On Manageable Services The get-supported-services operation is used to retrieve a list of server services which can be turned on/ off for domain aliases on that server.1. showing that all 3 services . Request Sample The following XML packet requests which domain alias services can be managed on the server: <packet version="1.0 and is not supported in previous versions.Web and Mail . showing that only 2 services .4.0"> <domain_alias> <get-supported-services> <result> <status>ok</status> <service>web</service> <service>mail</service> </result> </get-supported-services> </domain_alias> </packet> . Note: This operation appears in Plesk XML API v.Web.can be enabled/ disabled for domain aliases on the server.4.

and other preferences. Supported operations  ADD (see page 417) creates a domain template and to add it to the list of domain templates for a certain user.0 for UNIX | Plesk 7.0 and higher Plesk user: Plesk Administrator Description Domain templates are a kind of hosting configuration presets which are useful when it is necessary to create multiple domain accounts with identical hosting/mail settings.6 for Windows and higher API RPC version: 1. These settings are as follows:       Hosting settings Mailing settings Limits on use of Plesk resources Preferences Log rotation settings Performance settings Refer to the Domain Template Settings (see page 413) section for details. limits.Supported Operations 412 Managing Domain Templates Operator: <domain-template> XML Schema: domain_template.4. .1.xsd Plesk version: Plesk 8. All operations on domain templates are allowed to Plesk Administrator only. Settings Domain templates are used to fix a definite collection of domain settings and apply these settings to domains created using these domain templates. This is a temporary limitation of API RPC (Plesk GUI allows domain template management for Plesk Administrator and Plesk Client).

Domain Template Settings This section describes a collection of domain settings that can be predefined in a domain template.Supported Operations 413    GET (see page 424) gets the information on the specified domain template(s) from the server. The reject node is used to reject such email messages (they will not be accepted by the mail server). SET (see page 430) sets new settings to the specified domain template. It has the following graphics model:     The nonexistent-user node is optional. Data type: string. such messages are sent back to the sender with a message: ―this address no longer accepts mail‖. By default. This node is presented by type MailPreferences (plesk_mailname. Data type: no. To specify the handling method. The forward node specifies the email addresses to which undelivered mail should be forwarded. These settings can be set for a domain being created. or they can be set for this domain later. or read from the database. If specified. choose between the following three options: The bounce node is used to modify the default rejection message.xsd). . DEL (see page 440) deletes the specified domain template (or several). Data type: string. it is used to collect and handle email messages sent to users not registered on the domain. permissions and hosting settings (on page 305) Preferences Log rotation settings (see page 414) Domain performance settings (see page 415) Mailing Settings Mailing settings are defined in the domain template by the mail node. These settings are as follows:      Mailing settings (see page 413) Limits.

or when some log file grows too large (the maximal size can be restricted). the oldest file is removed from the server and a new handled log file is added. Data type: Boolean.Supported Operations 414  The webmail node is optional. The log-bytime type is required if the on node is specified and the log-bysize node is not. Data type: none. Log Rotation Settings The idea of log rotation is as follows. The log-email node is optional. Specifies the criterion for triggering log rotation on a domain. Data type: emailType (common. Specifies the maximal number of handled log files belonging to the domain that can be stored on the server. Active log files can be handled daily. Specifies the email address to which the handled log file can be sent. monthly. The log-bysize type is required if the on node is specified and the log-bytime node is not. Indicates that log files should be handled once the specified size (in Kb) is achieved. compressed. The log-max-num-files node is optional.xsd). It is structured as follows:     The off node is required if the on node is not specified. Data type: string. Before being handled. It specifies whether mail users will be able to read mail through the WebMail application. The on node is required if the off node is not specified. and emailed to some address (if this action is specified). The log-compress node is optional. The number of such stored files is limited.xsd). Once the limit is exceeded. while the dropped-out log file is handled. Plesk starts logging to the new log file. Log rotation settings are specified in the log-rotation node defined by complex type LogRotationType (domain_template. Indicates that log files should be handled periodically. Data type: none. Allowed values: Daily | Weekly | Monthly. Enables/disables log file compression. This node enables log rotation on a domain created using this domain template. Data type: boolean. weekly. Data type: integer. The log-condition type is required if the on node is specified. The handled log files are stored on the server. Data type: none. the active log file is removed from logging and a new one is created.     . This node disables log rotation on a domain created using this domain template. Data type: integer.

The max_connections node is optional. This type is structured as follows:   The bandwidth node is optional. Performance Settings Performance settings are defined by the performance node.0”> <domain-template> <add> <name>base_template</name> <gen_setup> <name>newdomain. This node is specified by complex type DomainPerformanceType (plesk_domain.2.123</ip_address> </gen_setup> <performance> <bandwidth>1000</bandwidth> <max_connections>-1</max_connections> </performance> </add> </domain-template> </packet> . the bandwidth is unlimited. It restricts the network use by the specified value (Kb/sec) for the domain created using this domain template.2. Note: Domain performance settings are supported in domain templates by API RPC 1.123. the type of this node is string. The following sample packet creates a domain template and defines performance settings for domains that will be created using this domain template: <packet version=”1. Data type: integer.1.123. It restricts the number of connections by the specified value for the domain created using this domain template.4.5.0 and later. the number of connections is unlimited. If set to -1. Data type: integer.4. If set to -1.com</name> <client_id>1234</client_id> <ip_address>123.0 and later versions.xsd).Supported Operations 415 Note: In API RPC 1.

2. the filter can be left empty. The filter node allows you to specify a domain template either by ID.4.xsd).0”> <domain-template> <get> <filter> <id>12</id> <id>14</id> </filter> </get> </domain-template> </packet> Finally. Data type: string. It specifies the template name.Supported Operations 416 Filtering Issues This topic describes some peculiarities of domain template filtering.2. Filtering is the way the request XML packet indicates the object (a domain template or several) to which the operation will be applied. or by template names.0”> <domain-template> .2. In addition. This node is structured as follows:   The name node is required. The filter node that filters a domain template is presented by the DomainFilterType complex type (domain_input. It specifies a unique identifier of the domain template. <packet version=”1. The request XML packets filter domain templates using a special filter node and by specifying the owner of the template (if necessary). All of them should be specified either by ID. Data type: integer. which means that all domain templates are selected: <packet version=”1. When created.4. The id node is required. or by template name. it allows you to specify multiple domain templates within one filter.4. a domain template is given a unique ID and a unique name.0”> <domain-template> <get> <filter> <name>base_template</name> <name>extra_template</name> </filter> </get> </domain-template> </packet> Or: <packet version=”1.

When created by Plesk Administrator for own needs. When created for a certain Plesk Client. Use the client-id or client-login node for this purpose: <packet version=”1. A domain template can include them all or just some of them.4. Domain templates are searched in the template repository of the current user. a domain template gets to the administrator‘s template repository. it is enough to specify the template name. domain templates are searched in the administrator‘s repository by default.0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <client-login>tecnhnolux</client-login> </get> </domain-template> </packet> Creating Domain Template A domain template can be created by Plesk Administrator for own needs or for a Plesk Client. Since all operations on domain templates are allowed to Plesk Administrator only.Supported Operations <get> <filter/> </get> </domain-template> </packet> 417 Another important issue is the ownership of domain templates. . When creating a domain template. you can specify various domain settings when creating a domain template (all of them are optional):       Hosting settings Mailing settings Limits on use of Plesk resources Preferences Log rotation settings Domain performance settings You can see all these settings on Plesk Control Panel. If this domain template is created for Plesk Client. you also need to specify the client ID or client login. a domain template is added to the template repository of this client. you need to identify this client in the request packet. You can specify domain settings when creating a domain template or later (they can be set using the set operation). In addition.2. To filter some domain template that belongs to a certain client.

1. Data type: string. See the structure of this node in the Mailing settings (see page 413) section. The client-login node is optional. It specifies the name of the domain template. It is used if the domain template is created by Plesk Administrator for a certain client. The mail node is optional. Data type: domainLimits (plesk_domain. Data type: MailPreferences (plesk_mailname. See the structure of this node in the Limits (on page 305) section.  . It is used if the domain template is created by Plesk Administrator for a certain client. It specifies a collection of email preferences that will be assigned to a new domain created using this template. It specifies a collection of limits that will be set for new domains created using this template.xsd). The limits node is optional. The client_id node is optional. Data type: integer. Data type: string.0”> <domain-template> <add> … </add> </domain-template> </packet> The add node is presented by type DomainTemplateAddInputType (domain_template.4.xsd). Its graphical representation is as follows:     The name node is required.Supported Operations 418 Request Packet Structure A request XML packet adding a new domain template to Plesk database includes the add operation node: <packet version=”1.xsd).

0 and later. It is used to turn on/off rotation of log files related to a domain created using this template. Data type: LogRotationType (domain_template. Data type: DomainTemplatePreferecesType (domain_template. The hosting node is optional. or by login (both are unique in Plesk). Specifies physical hosting settings for new domains created using this template.xsd). It specifies performance settings for new domains created using this domain template.4. See the structure of this node in the Log Rotation Settings (see page 414) section.2. Data type: DomainPerformanceType (plesk_domain. See the structure of this node in the Preferences section.0”> <domain-template> <add> <name>base_template</name> <client-id>12</client-id> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> Or: <packet version=”1. This feature is supported by API RPC 1. The performance node is optional. Data type: DomainTemplatePHostingPreferences (domain_template.4. See the structure of this node in the Hosting Settings (on page 305) section.xsd). See the structure of this node in the Performance Settings (see page 415) section.2. <packet version=”1.0”> <domain-template> <add> <name>base_template</name> <client-login>technolux</client-login> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> .2.Supported Operations 419  The log-rotation node is optional.4. specify this client either by ID.xsd).    Request Samples Creating domain templates for different Plesk users To create a domain template for a certain Plesk Client. The preferences node is optional.xsd). It is used to specify a collection of preferences for new domains created using this template.

0”> <domain-template> <add> <name>base_template</name> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> Creating multiple domain templates To create two domain templates with a single packet.4. include two different add blocks: <packet version=”1.0”> <domain-template> <add> <name>bounce_template</name> <mail> <webmail>true</webmail> .2.4. nodes client-id and clientlogin are not used: <packet version=”1.0”> <domain-template> <add> <name>base_template</name> <mail> <webmail>true</webmail> </mail> </add> <add> <name>quick_template</name> <mail> <webmail>false</webmail> </mail> </add> </domain-template> </packet> Mailing settings The following packet creates three domain templates. The mailing settings are as follows:  bounce_template domain template allows mail users to access the mail service of Plesk (the WebMail application) and specifies the text sent back if a message is addressed to a non-existing user forward_template forwards mail addressed to a non-existing user to a certain mail box reject_template rejects mail addressed to a non-existing user (such messages are not accepted by the mail server)   <packet version=”1.2.2.4.Supported Operations 420 When creating a domain template for Plesk Administrator.

Supported Operations <nonexistent-user> <bounce>Email address does not exist. use the following packet: <packet version=”1.2.0”> <domain-template> <add> <name>base_template</name> <log-rotation> <on> <log-condition> <log-bytime>weekly</log-bytime> </log-condition> <log-max-num-files>30</log-max-num-files> <log-compress>true</log-compress> </on> </log-rotation> </add> </domain-template> </packet> .uk</forward> </nonexistent-user> </mail> </add> <add> <name>reject_template</name> <mail> <nonexistent-user> <reject/> </nonexistent-user> </mail> </add> </domain-template> </packet> 421 Log rotation To disable log rotation on a domain created using the specified template.4. allows the storage of up to 30 handled log files related to this domain.4. and removes active log files related to this domain from logging once a week: <packet version=”1.0”> <domain-template> <add> <name>base_template</name> <log-rotation> <off/> </log-rotation> </add> </domain-template> </packet> The following packet creates the domain template that enables log rotation on a domain.co.</bounce> </nonexistent-user> </mail> </add> <add> <name>forward_template</name> <mail> <nonexistent-user> <forward>spam@technolux.2.

4.2. <packet version=”1.0”> <domain-template> <add> <name>base_template</name> <performance> <bandwidth>1000</bandwidth> <max_connections>20</max_connections> </performance> </add> </domain-template> </packet> .0”> <domain-template> <add> <name>base_template</name> <preferences> <stat>6</stat> <maillists>true</maillists> <dns_zone_type>master</dns_zone_type> </preferences> </add> </domain-template> </packet> Hosting Here is the sample packet that creates a domain template and specifies physical hosting settings for domains that will be created using this domain template.4.4.0”> <domain-template> <add> <name>base_template</name> <hosting> <ftp_quota>100000</ftp_quota> <ssl>true</ssl> <php>true</php> <php_safe_mode>true</php_safe_mode> <ssi>true</ssi> <cgi>true</cgi> <mod_perl>true</mod_perl> <mod_python>true</mod_python> <webstat>webalizer</webstat> <errdocs>true</errdocs> </hosting> </add> </domain-template> </packet> Performance settings Here is the sample packet that creates a domain template and specifies performance settings for domains that will be created using this domain template.2. <packet version=”1. <packet version=”1.2.Supported Operations 422 Preferences The following packet creates a domain template and specifies preferences for domains created on its basis.

Data type: integer.0”> <domain-template> <add> <result> <status>ok</status> <id>2435</id> </result> </add> </domain-template> </packet> .2. Returns the unique identifier of the domain template just added to Plesk. Returns the error message if the add operation fails. Allowed values: ok | error.Supported Operations 423 Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. Response Samples A positive response got from the server after adding a new domain template can look as follows: <packet version=”1. It wraps the response got from the server. The status node is required. Data type: resultType (common. The errtext node is optional. Data type: string. Specifies the execution status of the add operation. Returns the error code when the add operation fails. The errcode node is optional. It is required if the add operation has succeeded. Data type: string. Data type: unsignedInt. The id node is optional.4.xsd).

Supported Operations 424 A negative response can look as follows: <packet version=”1. and so on.2. Request Packet Structure A request XML packet getting information about the specified domain templates includes the get operation node: <packet version=”1.0”> <domain-template> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. A domain template can even be empty (specified by its ID and name and not containing any other information). You cannot request for a definite item of the above list. Refer to the Filtering Issues (see page 416)topic for details. Filtering domain templates is a very important issue. The get operation will return only the settings currently stored in the database.2. For instance. This information is as follows:        Domain template ID and name Hosting settings Mailing settings Limits on use of Plesk resources Preferences Log rotation settings Domain performance settings The get operation returns all settings currently present in the database in bulk.</errtext> </result> </add> </domain-template> </packet> Getting Information On Domain Templates The get operation is used to retrieve the information about the domain templates from Plesk database. only preferences. All settings are optional and can be missing in the database. you cannot retrieve only hosting settings.4.4.0”> <domain-template> <get> … </get> </domain-template> </packet> .

or by login.4. specify Plesk Client either by ID. Data type: DomainTemplateFilterType (domain_template. Its graphical representation is as follows:  The filter node is required. Data type: integer. This parameter is not used if the domain template belongs to Plesk Administrator.xsd). It specifies the identifier of the Plesk client who owns the domain template. Data type: string. <packet version=”1. It specifies the login name of the Plesk client who owns the domain template.     Request Samples Getting domain templates that belong to different Plesk user To get the information about a domain template that belongs to some Plesk Client. Data type: string.0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <client-login>tecnhnolux</client-login> </get> </domain-template> </packet> .2. It specifies the names of the domain templates to be selected. The client-login node is optional. It specifies the unique identifier of domain template to be selected. This parameter is not used if the domain template belongs to Plesk Administrator. Data type: integer.Supported Operations 425 The get node is presented by type DomainTemplateGetInputType (domain_template.xsd). The client-id node is optional. It serves to specify the criteria by which the necessary domain templates will be selected from the database. The name node is optional. The id node is optional.

0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <client-id>1234</client-id> </get> </domain-template> </packet> To retrieve information about a domain template that belongs to Plesk Administrator.2. all specified either by ID or by the template name.4.2. do not specify client-id and client-login: <packet version=”1. <packet version=”1.2.2.0”> <domain-template> <get> <filter> <name>base_template</name> </filter> </get> </domain-template> </packet> Operating multiple domain templates A single filter can specify multiple template instances.4.0”> <domain-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> </get> </domain-template> </packet> The following packet sample is wrong: <packet version=”1.4.0”> <domain-template> <get> <filter> <name>base_template</name> <id>12</id> </filter> </get> </domain-template> </packet> .4.Supported Operations 426 The following packet retrieves the same information using Plesk Client ID: <packet version=”1.

4.2.0”> <domain-template> <get> <filter/> </get> </domain-template> </packet> Response Packet Structure The get node of the output XML packet is structured as follows: .Supported Operations 427 The following packet gets the information about all domain templates that belong to a definite Plesk Client: <packet version=”1.0”> <domain-template> <get> <filter/> <client-login>tecnhnolux</client-login> </get> </domain-template> </packet> The following packet gets the information about all domain templates that belong to Plesk Administrator: <packet version=”1.2.4.

Data type: DomainTemplatePHosting (domain_templates. Is present if the get operation succeeds and limits are defined for this domain template.xsd). Data type: LogRotationType (domain_template. Is present if the get operation succeeds and preferences are defined for this domain template. Is present if the get operation succeeds and physical hosting settings are defined for this domain template. The status node is required. otherwise is missing in the packet.4. In all other cases it holds the name of the domain template (if this name was specified in the request packet). The hosting node is optional. otherwise is missing in the packet. See the structure of this node in the Mailing settings (see page 413) topic. otherwise it is missing in the packet. Returns the error code. In all other cases it holds the identifier of the domain template (if this id was specified in the request packet). this node is missing in the response packet. The name node is optional. this node is missing in the response packet.xsd). Data type: string. See the structure of this node in the Preferences topic.xsd). The id node is optional. Data type: DomainTemplatePreferencesType (domain_templates. The log-rotation node is optional. Allowed values: ok | error. The errtext node is optional. otherwise is missing in the packet. The mail node is optional. This node is supported by API RPC 1. otherwise is missing in the packet.2.Supported Operations 428      The result node is required. Data type: result_status (string). Data type: MailPreferences (plesk_mailname.xsd). If the request packet fails before the execution. Specifies the execution status of the get operation.xsd). Data type: unsignedInt. Data type: resultType (common. Is present if the get operation succeeds and mailing settings are defined for this domain template. If the request packet fails before the execution. It wraps the information for one domain template. See the structure of this node in the Performance settings (see page 415) topic. The performance node is optional. otherwise is missing in the packet. The limits node is optional.        . Data type: DomainPerformanceType (plesk_domain. See the structure of this node in the Log rotation settings (see page 414)topic. See the structure of this node in the Limits (on page 305) topic. Returns the error message. The preferences node is optional. The errcode node is optional. This node is present if the get operation succeeds and performance settings are defined for this domain template.xsd). Data type: domainLimits (plesk_domains. Data type: string. See the structure of this node in the Hosting settings (on page 305) topic.xsd). Data type: integer. Is present if the get operation succeeds and log rotation settings are defined for this domain template. Is required if the get operation fails.0 and later.

Supported Operations 429 Response Samples The request packet sent to Plesk is as follows: <packet version=”1.0”> <domain-template> <get> <filter> <id>11</id> <id>12</id> </filter> <client-login>tecnhnolux</client-login> </get> </domain-template> </packet> This packet requests for the information about two domain templates specified by ID. A positive response can look as follows: <packet version=”1.0”> <domain-template> <get> <result> <status>ok</status> <id>11</id> <name>base_template</name> <mail> <webmail>true</webmail> </mail> </result> <result> <status>ok</status> <id>12</id> <name>quick_template</name> <limits> <disk_space>209715200</disk_space> <max_traffic>209715200</max_traffic> <max_db>50</max_db> <mysql_dbase_space>52428800</mysql_dbase_space> <expiration>63072000</expiration> </limits> <hosting> <vrt_hst> <ftp_quota>1000000</ftp_quota> <ssl>true</ssl> <php>true</php> <php_safe_mode>true</php_safe_mode> <ssi>true</ssi> <cgi>true</cgi> <mod_perl>true</mod_perl> <mod_python>true</mod_python> <webstat>webalizer</webstat> <errdocs>true</errdocs> </vrt_hst> </hosting> </result> </get> </domain-template> </packet> .2.2.4.4.

</errtext> </result> </get> </domain-template> </packet> Configuring Domain Template Settings The set operation is used to update domain settings set in the domain templates and stored in Plesk database. Filtering domain templates is made either by the domain template identifier.0”> <domain-template> <get> <result> <status>ok</status> <id>11</id> <name>base_template</name> <mail> <webmail>true</webmail> </mail> </result> <result> <status>error</status> <id>12</id> <errcode>1013</errcode> <errtext>Object not found. A negative response can look as follows: <packet version=”1. while the quick_template domain template holds the limits and hosting settings. the same packet can handle domain templates and templates belonging to different Plesk users. This information is as follows:       Hosting settings E-mail settings Limits on use of Plesk resources by this domain Preferences Log rotation settings Domain performance settings You can update all settings of a domain template in bulk or specify some particular settings.4.2. Also.Supported Operations 430 The base_template domain template holds the mailing settings only. . Proceed to the Filtering Issues (see page 416)topic for details. or by the domain template name.

Its graphical representation is as follows:  The filter node is required.xsd). Data type: DomainTemplateFilterType (domain_template. It specifies the unique identifiers of domain templates to be updated.xsd). The client-id node is optional.    . The name node is optional. Data type: string. Data type: integer. Data type: integer. It specifies the identifier of the Plesk client who owns the domain template.4. It serves to specify the criteria by which domain templates will be updated in the database.0”> <domain-template> <set> … </set> </domain-template> </packet> The set node is presented by type DomainTemplateSetInputType (domain_template. It specifies the names of domain templates to be updated.2.Supported Operations 431 Request Packet Structure A request XML packet Configuring Domain Template Settings to Plesk database includes the set operation node: <packet version=”1. The id node is optional. This parameter is not used if the domain template belongs to Plesk Administrator.

The preferences node is optional.xsd). Data type: DomainPerformanceType (plesk_domain. Sets domain performance settings to the specified domains. The mail node is optional. It sets a collection of limits that will be updated for the specified domain templates.xsd). It specifies the login name of the Plesk client who owns the domain template. This node is supported by API RPC 1. The performance node is optional.xsd).4. It sets a collection of log file rotation settings for the specified domain templates. Data type: DomainTemplatePreferecesType complex type (domain_template. It sets a collection of email preferences that will be updated for the specified domain templates. This parameter is not used if the domain template belongs to Plesk Administrator.2.       Request Samples Update domain templates that belong to different Plesk user To update settings of a domain template that belongs to Plesk Client.xsd). The limits node is optional. Data type: string. specify this client either by id. The hosting node is optional. See the structure of this node in the Hosting settings (on page 305) topic. See the structure of this node in the Preferences topic. See the structure of this node in the Log rotation settings (see page 414)topic. See the structure of this node in the Limits (on page 305) topic.0 and later. See the structure of this node in the Mailing settings (see page 413) topic. The log-rotation node is optional.4. Data type: domainLimits complex type (plesk_domain.Supported Operations 432  The client-login node is optional.xsd). Data type: MailPreferences complex type (plesk_mailname.xsd). <packet version=”1. or by login.0”> <domain-template> <set> <filter> <name>base_template</name> </filter> <client-login>tecnhnolux</client-login> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> . See the structure of this node in the Performance settings (see page 415) topic. Data type: LogRotationType complex type (domain_template. Sets physical hosting settings for the specified domain templates.2. It sets a collection of preferences for the specified domain templates. Data type: DomainTemplatePhosting (domain_template.

<packet version=”1.0”> <domain-template> <set> <filter> <name>base_template</name> </filter> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> Operating multiple domain templates Here is the sample packet that sets similar domain template settings for two different domain templates.0”> <domain-template> <set> <filter> <name>base_template</name> </filter> <client-id>1234</client-id> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> To update settings of a domain template that belongs to Plesk Administrator. both specified by id. do not specify nodes client-id and client-login: <packet version=”1.4.2.2.4.4.2.Supported Operations 433 Or: <packet version=”1.0”> <domain-template> <set> <filter> <id>11</id> <id>12</id> </filter> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> .

0”> <domain-template> <set> <filter/> <mail> <webmail>false</webmail> </mail> </set></domain-template> </packet> .4. use two different set operations: <packet version=”1.0”> <domain-template> <set> <filter/> <client-login>tecnhnolux</client-login> <mail> <webmail>false</webmail> </mail> </set> </domain-template> </packet> The following packet updates all domain templates that belong to Plesk Administrator: <packet version=”1.2.Supported Operations 434 To set different settings for two domain templates.2.2.0”> <domain-template> <set> <filter> <id>12</id> </filter> <client-login>tecnhnolux</client-login> <mail> <webmail>false</webmail> </mail> </set> <set> <filter> <name>base_template</name> </filter> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> The following packet updates all domain templates belonging to the specified Plesk Client: <packet version=”1.4.4.

2.Supported Operations 435 Mailing settings The following packet updates mailing settings of three domain templates that belong to Plesk Administrator.4.</bounce> </nonexistent-user> </mail> </set> <set> <filter> <name>forward_template</name> </filter> <mail> <nonexistent-user> <forward>spam@technolux. The new mailing settings are as follows:  bounce_template allows email users to access the email service of Plesk (the WebMail application) and specifies the text sent back if a message is addressed to a non-existing user forward_template forwards mail addressed to a non-existing user to a certain email box reject_template rejects mail addressed to a non-existing user (such messages are not accepted by the mail server)   <packet version=”1.0”> <domain-template> <set> <filter> <name>bounce_template</name> </filter> <mail> <webmail>true</webmail> <nonexistent-user> <bounce>Email address you specified does not exist.co.uk</forward> </nonexistent-user> </mail> </set> <set> <filter> <name>reject_template</name> </filter> <mail> <nonexistent-user> <reject/> </nonexistent-user> </mail> </set> </domain-template> </packet> .

Supported Operations 436 Setting limits <packet version=”1.2.4. and removes active log files related to this domain from logging once a week: <packet version=”1.0”> <domain-template> <set> <filter> <id>12</id> </filter> <log-rotation> <on> <log-condition> <log-bytime>weekly</log-bytime> </log-condition> <log-max-num-files>30</log-max-num-files> <log-compress>true</log-compress> </on> </log-rotation> </set> </domain-template> </packet> . use the following packet: <packet version=”1. allows the storage of up to 30 handled log files related to this domain.2.4.4.0”> <domain-template> <set> <filter> <id>12</id> </filter> <log-rotation> <off/> </log-rotation> </set> </domain-template> </packet> The following packet enables log file rotation on a domain created using this domain template.2.0”> <domain-template> <set> <filter> <id>12</id> </filter> <limits> <disk_space>2048</disk_space> <max_traffic>10240</max_traffic> <max_db>50</max_db> <mysql_dbase_space>1024</mysql_dbase_space> <expiration>63072000</expiration> </limits> </set> </domain-template> </packet> Log rotation To disable log rotation in the specified template.

Supported Operations 437 Preferences The following packet specifies preferences for a domain template: <packet version=”1.2.0”> <domain-template> <set> <filter> <id>12</id> </filter> <hosting> <vrt_hst> <ftp_quota>100</ftp_quota> <ssl>true</ssl> <php>true</php> <php_safe_mode>true</php_safe_mode> <ssi>true</ssi> <cgi>true</cgi> <mod_perl>true</mod_perl> <mod_python>true</mod_python> <webstat>webalizer</webstat> <errdocs>true</errdocs> </vrt_hst> </hosting> </set> </domain-template> </packet> .2. <packet version=”1.4.4.0”> <domain-template> <set> <filter> <id>12</id> </filter> <preferences> <stat>6</stat> <maillists>true</maillists> <dns_zone_type>master</dns_zone_type> </preferences> </set> </domain-template> </packet> Hosting Here is the sample packet that sets physical hosting settings to a domain template under Plesk Client permissions.

Data type: string. In all other cases it holds the identifier of the domain template (if this id was specified in the request packet).2. The errtext node is optional. Allowed values: ok | error.4. The id node is optional. If the request packet fails before the execution. Returns the error message. Data type: string. Data type: integer. . Data type: unsignedInt. The errcode node is optional. Can be returned if the set operation fails.xsd). Data type: resultType (common. It wraps the result of the set operation for a single domain template. The status node is required. Specifies the execution status of the set operation. Returns the error code. <packet version=”1. Is required if the set operation fails. this node is missing in the response packet.Supported Operations 438 Hosting Here is the sample packet that sets domain performance settings to a domain template under Plesk Client permissions.0”> <domain-template> <set> <filter> <id>12</id> </filter> <performance> <bandwidth>1000</bandwidth> <max_connections>20</max_connections> </performance> </set> </domain-template> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:      The result node is required.

</errtext> <id>12</id> </result> </set> </domain-template> </packet> .Supported Operations 439  The name node is optional.0”> <domain-template> <set> <result> <status>ok</status> <id>11</id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. Response Samples A request packet sent to Plesk server can look as follows: <packet version=”1. If the request packet fails before the execution. Data type: string.2.0”> <domain-template> <set> <filter> <id>11</id> <id>12</id> </filter> <mail> <webmail>false</webmail> </mail> </set> </domain-template> </packet> This packet updates two domain templates specified by ID.0”> <domain-template> <set> <result> <status>ok</status> <id>11</id> </result> <result> <status>ok</status> <id>12</id> </result> </set> </domain-template> </packet> A negative response is returned if any domain template failed to be updated: <packet version=”1. A positive response is sent back if the requested operation succeeds: <packet version=”1.4.4.4. this node is missing in the response packet.2.2. In all other cases it holds the name of the domain template (if this name was specified in the request packet).

This parameter is not used if the domain template belongs to Plesk Administrator. The id node is optional. Its graphical representation is as follows:  The filter node is required. Data type: DomainTemplateFilterType (domain_template.2. Data type: integer. The client-id node is optional. A single packet can delet e multiple domain templates. It specifies the unique identifiers of domain templates to be deleted.0”> <domain-template> <del> … </del> </domain-template> </packet> The del node is presented by type DomainTemplateAddInputType (domain_template. It specifies the name of domain template to be deleted. Request Packet Structure A request XML packet deleting the domain templates from Plesk database includes the del operation node: <packet version=”1.Supported Operations 440 Deleting a Domain Template A domain template can be deleted Plesk Administrator only. It serves to specify the criteria by which the necessary domain templates will be deleted from the database. the same packet can delete domain templates and templates belonging to different Plesk users. Data type: string.4.    . Data type: integer. Refer to the Filtering Issues (see page 416)topic for details. or by the domain template name.xsd). Also. It specifies the identifier of the Plesk client who owns the domain template. Filtering domain templates is made either by the domain template identifier.xsd). The name node is optional.

0”> <domain-template> <del> <filter> <name>base_template</name> </filter> <client-login>tecnhnolux</client-login> </del> </domain-template> </packet> The following packet specifies the same Plesk Client by ID: <packet version=”1. It specifies the login name of the Plesk client who owns the domain template. do not specify nodes client-id and client-login: <packet version=”1.0”> <domain-template> <del> <filter> <name>base_template</name> </filter> <client-id>1234</client-id> </del> </domain-template> </packet> To delete a domain template that belongs to Plesk Administrator.4.4. or by login.0”> <domain-template> <del> <filter> <name>base_template</name> </filter> </del> </domain-template> </packet> . Request Samples Deleting domain templates that belong to different Plesk user To delete a domain template that belongs to a certain Plesk Client.2.2.2. This parameter is not used if the domain template belongs to Plesk Administrator. <packet version=”1. specify this Plesk Client either by ID. Data type: string.Supported Operations 441  The client-login node is optional.4.

4.Supported Operations 442 Deleting multiple domain templates A single filter can specify multiple template instances for deletion.4. use a separate del operation for each: <packet version=”1.2.0”> <domain-template> <del> <filter> <name>base_template</name> <name>quick_template</name> </filter> </del> </domain-template> </packet> To delete templates that belong to different Plesk users. all specified either by ID or by the template name: <packet version=”1.2.0”> <domain-template> <del> <filter> <name>base_template</name> <name>quick_template</name> </filter> </del> <del> <filter> <id>52</id> <id>53</id> </filter> <client-login>tecnhnolux</client-login> </del> <del> <filter> <id>66</id> <id>67</id> </filter> <client-id>12134</client-id> </del> </domain-template> </packet> .

0”> <domain-template> <del> <filter/> </del> </domain-template> </packet> Response Packet Structure The del node of the output XML packet is structured as follows:     The result node is required.xsd). Data type: unsignedInt. Specifies the execution status of the del operation.0”> <domain-template> <del> <filter/> <client-login>tecnhnolux</client-login> </del> </domain-template> </packet> The following packet deletes all domain templates that belong to Plesk Administrator: <packet version=”1.2. Is required if the del operation fails. Returns the error message. The errtext node is optional. Data type: resultType (common. Data type: string. Data type: string.4. .4. It wraps the result of the del operation for a single domain template. Returns the error code. The errcode node is optional. The status node is required. Allowed values: ok | error.Supported Operations 443 The above sample packet deletes domain templates that belong to Plesk Administrator and by two Plesk Clients (one specified by client login and another by client ID) The following packet deletes all domain templates belonging to the specified Plesk Client: <packet version=”1.2.

If the request packet fails before the execution.4.2.4. Data type: string.2. In all other cases it holds the name of the domain template (if this name was specified in the request packet). this node is missing in the response packet.</errtext> </result> </del> </domain-template></packet> . A positive response got from Plesk server can look as follows: <packet version=”1. In all other cases it holds the identifier of the domain template (if this id was specified in the request packet). this node is missing in the response packet.0”> <domain-template> <del> <filter> <id>11</id> <id>12</id> </filter> <client-login>tecnhnolux</client-login> </del> </domain-template> </packet> This packet deletes two domain templates specified by ID.  Response Samples A request packet that orders a del operation is as follows: <packet version=”1. The name node is optional. Data type: integer.0”> <domain-template> <del> <result> <status>ok</status> <id>11</id> </result> <result> <status>ok</status> <id>12</id> </result> </del> </domain-template> </packet> A negative response can look as follows: <packet version=”1.0”> <domain-template> <del> <result> <status>ok</status> <id>11</id> </result> <result> <status>error</status> <id>12/<id> <errcode>1013</errcode> <errtext>Object not found.2.Supported Operations 444  The id node is optional. If the request packet fails before the execution.4.

refer to the Mail Service Settings (see page 447) and Mail User Account Settings (see page 448) sections. The mail service settings specify whether the Webmail application is turned on for a particular domain.3. . Mail account presents a collection of settings and lists of various objects. These settings also specify the mail service behaviour when an incoming message is addressed to a non-existent user.5. Mail user is the less privileged Plesk user. redirects. Plesk Client Description The mail operator allows performing operations on mail service and mail accounts on a particular domain.1 for Windows and later API RPC version: 1. etc.xsd Plesk version: Plesk 7.) share the disk space of the domain that owns this mail account.0 and higher Plesk user: Plesk Administrator.4 for UNIX and later | Plesk 8.xsd. Mail user settings specify the following:           Mail name and password. mail aliases Mail user access to his mail account via Plesk Control Panel Mail box settings Mail user permissions Antivirus protection Mail group members (if a mail account is used as a mail group) Groups in which a mail account has membership Files to store in the repository Automatic response messages Mail addresses to which all incoming correspondence will be redirected automatically For more details. plesk_mailname. A mail account is created on a certain domain and remains associated with this domain during its lifetime. Mail accounts are uniquely identified by name/ID of the parent domain and by mail user name. mail_output.5.Supported Operations 445 Managing Domain-Level Mail Operator: <mail> XML Schema: mail_input. files. This operation is allowed to Plesk Administrator and Plesk Client.xsd. Creating Plesk mail user is equivalent to creating a special mail account on the specified domain. All objects created within the mail account (autoresponders.

repository files. It is specially designed to operate lists of mail group members. and automatic reply messages set for the mail account GET_INFO (see page 470) serves to retrieve various information about the specified mail accounts from Plesk database REMOVE (see page 475) removes the specified mail account and all its settings from Plesk database ENABLE (see page 478) turns on the mail service on the specified domain DISABLE (see page 478) turns off the mail service on the specified domain SET_PREFS (see page 482) sets mail service preferences for the specified domains GET_PREFS (see page 486) gets mail service preferences set for the specified domains RENAME (see page 489) renames the specified mail box         .Supported Operations 446 Supported operations  CREATE (see page 460) creates a mail account on a specified domain and sets a collection of settings for it UPDATE (see page 464) serves to update mail account settings.

Data type: string.Supported Operations 447 Mail Service Preferences Mail service settings are defined in the MailPreferences complex type (plesk_mailname. It specifies whether mail users will have access to their mail via a WebMail application. The webmail node is optional. The forward node specifies the mail address to which undelivered mail should be forwarded. such messages are sent back to the sender with a message: ―this address no longer accepts mail‖.4. The reject node is used to reject such mail messages (they will not be accepted by the mail server).     The following packet sets mail service preferences for three domains: <packet version=”1.2. Data type: none. Data type: string. Data type: Boolean.xsd). By default. The bounce node is used to modify the default rejection message. This type is structured as follows:  The nonexistent-user node is optional.0”> <mail> <set_prefs> <filter> <domain_id>12</domain_id> <domain_id>14</domain_id> <domain_id>15</domain_id> </filter> <prefs> <nonexistent-user> <reject/> </nonexistent-user> <webmail>true</webmail> </prefs> </set_prefs> </mail> </packet> . It specifies the way the server handles messages sent to unknown mail users (not registered on the domain).

It specifies the name of the mail user. Data type: string. It specifies the identifier of the mail user (if this user already exists in Plesk database).Supported Operations 448 Mail Account Settings Mail account settings are specified by complex type mailnameType (plesk_mailname. . See the structure of this node in the Control Panel Settings (see page 450) section.xsd). The name node is required. Data type: integer. Data type: none. It is structured as follows:    The id node is optional. It specifies a collection of Plesk GUI settings for the mail user. The cp_access node is optional.

2. Data type: string. The autoresponders node is optional. It specifies the antivirus protection settings for the incoming/outgoing correspondence.xsd). Allowed values: plain | crypt.Supported Operations 449  The mailbox node is optional.. In the earlier versions of API RPC. See the structure of this node in the Mail Box Settings (see page 451) section. See the structure of this node in the Automatic response settings (see page 453) section.0. It specifies a collection of mail box settings. It specifies the password used by mail user to access the mail box. Data type: none. See the structure of this node in the Redirect Settings (see page 452) section.com and to the original address will get to the same mail box). Data type: none. The repository node is optional. These files can be attached to automatic response messages if necessary. The password node is optional.4. Data type: MailUserPermission (plesk_mailname. Data type: none. It enables the redirect feature for the mail account and specifies the email address where the correspondence will be redirected. Allowed values: off | inout | in | out. The permissions node is optional. The mailgroup node is optional. The alias node is optional.           . the bob alias set for bfisher@example. It defines the list of mail addresses for which the mail account will serve as a mail group. See the structure of this node in the Mail User Permissions (see page 457) section.2. Data type: none. Data type: none. It specifies an alternative name for the given mail name (e. The group node is optional.com means that all mail sent to bob@example. See the structure of this node in the Repository Settings (see page 455) section. Data type: string. Data type: string. The redirect node is optional. This node is supported in API RPC 1. it is called drweb.g. It specifies the type of the password. This feature implements redirecting mail to multiple addresses. It specifies a collection of mail user permissions. This node is renamed to antivir in API RPC 1. See the structure of this node in the Mail Group Settings (see page 453) section. Data type: string. The password_type node is optional. The antivir node is optional. It specifies a mail group in which the given mail account has a membership.4. Data type: string. It defines a collection of automatic response messages and their settings that will be sent from the given mail account. It contains a list of files stored in the repository of the given mail account.0 and later.

Data type: boolean. the cp_access node can specify a collection of GUI preferences for the mail user.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <cp_access> <enabled>true</enabled> </cp_access> <mailbox> <enabled>true</enabled> <quota>10485760</quota> </mailbox> <alias>bob</alias> <antivir>true</antivir> <permissions> <cp_access>true</cp_access> <manage_drweb>true</manage_drweb> <manage_spamfilter>true</manage_spamfilter> </permissions> </mailname> </filter> </create> </mail> </packet> Control Panel Settings The cp_access node is used to enable/disable access to the personal mail user page in Plesk Control Panel (CP).4. It specifies a collection of CP access settings.Supported Operations 450 The following sample packet creates a mail account and sets a collection of settings for it: <packet version=”1. It is used to enable the CP access to the mail user page.2. It is structured as follows:    The enabled node is optional. The locale node is optional. . The cp_access node does not have a special data type. Data type: none. Data type: string. It specifies what language is used when displaying the CP to the mail user. The access node is required. If CP access is allowed. it is nested within the mailname node (see the structure of this node in the Mail User Account Settings (see page 448) section).

2. It specifies what interface skin (by ID) is used when displaying the PCP to the mail user. The disable_lock_screen node is optional.1. use four-letter locale names (RFC 1766). The following sample packet creates mail account and sets up CP access to the mail user page: <packet version=”1. It is structured as follows:   The enabled node is optional.    The skin_id node is optional. Data type: integer.Supported Operations 451 Note: In API RPC v. The mailbox node does not have a special data type. The quota node is optional.0. It shows whether the mail user can use the mail box created on Plesk server. Data type: boolean.5. it is nested within the mailname (see page 448) node. Default value: true. and to restrict the size of the mail box as well. It specifies the maximum size of the mail box (in bytes). Data type: integer. If set to true. it prevents mail user from working with CP until the GUI is completely loaded. It allows/prohibits creating multiple simultaneous CP sessions with the mail user credentials. If you specify a two-letter locale name in a request packet. Data type: Boolean. . Data type: boolean.4. The multiply_login node is optional.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <cp_access> <enabled>true</enabled> <access> <locale>EN-US</locale> <skin_id>11</skin_id> <multiply_login>true</multiply_login> </access> </cp_access> </mailname> </filter> </create> </mail> </packet> Mail Box Settings The mailbox node is used to enable/disable the use of a mail box created for a particular mail account. you will receive the error (error code 1019). The default value for the node is en-US.0 and later.

0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <redirect> <enabled>true</enabled> <address>techdept@example. Default value: false.2. and specifies the limit for the mail box size: <packet version=”1. It holds an email address to which the correspondence will be redirected.4. Data type: boolean.4. it is defined within the parent node as follows:   The enabled node is required. request packet should contain the redirect node within the mailname parent node. It enables the redirect feature for a particular mail account.2. enables the use of mail box on it. The following sample packet creates a mail account.com</address> </redirect> </mailname> </filter> </create> </mail></packet> .com: <packet version=”1. The address node is optional.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <mailbox> <enabled>true</enabled> <quota>1024000</quota> </mailbox> </mailname> </filter> </create> </mail> </packet> Redirecting Settings Mail account can redirect all incoming correspondence to a specified e-mail address. The redirect node does not have a special data type.Supported Operations 452 The following sample packet creates a mail account. Data type: string. To enable the redirect feature for a particular mail account. and makes it redirect all incoming messages to techdept@example.

Data type: string. To enable the mail group functionality for a particular mail account.Supported Operations 453 Mail Group Settings Mail account can serve as a mail group: It can be associated with a list of mail addresses to which it will send all incoming correspondence.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <mailgroup> <enabled>true</enabled> <address>techdept@example. this object specifies the text of this response and the attachment (a file stored in the a mail box repository).2. An autoresponder object is a collection of conditions (events) on which the automatic response message is sent back. request packet should contain the mailgroup node within the mailname parent node. Default value: false. The address node is optional. In addition. it can specify how this automatic response will act. The mailgroup node does not have a special data type.com</address> <address>automation@example. The following sample packet creates a mail account and makes it act as a mail group for the list of email addresses: <packet version=”1. Finally.4. Data type: boolean. . It holds an email address of this mail group member.com</address> </mailgroup> </mailname> </filter> </create> </mail> </packet> Automatic Response Settings The automatic response settings are specified for each mail account by the list of autoresponder objects. It enables the mail group functionality for the mail account. it is defined within the parent node as follows:   The enabled node is required.

It specifies the part of an incoming message (body. It specifies an autoresponder object. Data type: string. The key_where node is optional. It is structured within the autoresponders node as follows:     The name node is required. Data type: string. subject) where the key string should be searched. Data type: boolean. See the structure of this node below. . The autoresponder node is optional. It specifies the name of the autoresponder. It enables/disables the use of the autoresponder object. Data type: boolean. The enabled node is optional. Data type: none. Default value: false. Default value: false. It enables/disables the feature on the mail account. The autoresponder node does not have a special data type. Data type: string. The keystr node is optional.Supported Operations 454 The list of autoresponders is specified in the autoresponders node nested within the mailname parent node and structured as follows:   The enabled node is optional. It specifies the key string in the incoming message that will enable this autoresponder sending back its message. Allowed values: subj | no | body.

co.         The following sample packet creates a mail account and specifies autorespoder settings for it: <packet version=”1. It specifies the text of the automatic response message. Data type: string. It specifies the maximum number of unique email addresses that can be stored. Data type: string. It specifies the charset field in the incoming message header that will enable the autoresponder sending back its message. The text node is optional. The ans_freq node is optional. It specifies the name of the file to be attached to the response message. Thank you. Data type: string. Data type: string. It specifies the subject field in the incoming message header that will enable this autoresponder sending its message back. The forward node is optional. The content_type node is optional. It specifies the email address to which the original message will be forwarded. The mem_limit node is optional.4. Data type: integer.uk</forward> </autoresponder> </autoresponders> </mailname> </filter> </create> </mail> </packet> .</text> <forward>techdept@technolux. It specifies the Reply to field in an incoming message header that will enable the autoresponder sending back its message.Supported Operations 455  The subject node is optional. Data type: string. The charset node is optional.0”> <mail> <create> <filter> <domain_id>123</domain_id> <mailname> <name>bfischer</name> <autoresponders> <enabled>true</enabled> <autoresponder> <name>motorola</name> <subject>Regarding controllers</subject> <text>Your answer will be processed in the nearest 10 days. It specifies the Content type field in the incoming message header that will enable the autoresponder sending back its message. Allowed values: text/html | text/plain. Data type: integer. Data type: string. The attachment node is optional. It specifies the maximum number of automatic replies that can be sent back to the mail address.2. Data type: string. The reply_to node is optional.

Data type: base64.2. The following get_info response packet returns the list of files stored in the repository of the specified mail account: <packet version=”1. It is defined within the parent type mailnameType. The content node is optional. A repository presents a collection of file objects. each describing a single file as file name and file contents. It specifies a single file object. Data type: string.txt</name> </file> </repository> </mailname> </result> </get_info> </mail> </packet> . The name node is required.4. The repository node does not have a special data type.0”> <mail> <get_info> <result> <status>ok</status> <mailname> <name>techdept</name> <repository> <file> <name>attach1.Supported Operations 456 Repository Settings Every mail account is provided with a personal file repository.    The file node is required. This node can be missing in the response packet if the request one asks for a list of file names only. It keeps the file contents. Data type: none. The stored files can be used as attachments to automatically sent messages.txt</name> </file> <file> <name>attach2. or for other needs. It specifies the file name.

5. Data type: anySimple.0 and later versions you should manage mail user permissions according to the following XML schema:  The permission node is required.5.xsd). there are two possible ways of retrieving mail user permissions.5.5. API RPC v.Supported Operations 457 Mail User Permissions Starting from API RPC 1. Data type: sting.2.1.0. The other way is parameter-undependable. It specifies a permission value.1. It specifies a permission name. Sample The following packet creates a mail account and sets permissions for it: <packet version=”1. The value node is required. It specifies mail user permissions.1.0. Data type: PleskPermissionType (plesk_common.0”> <mail> <create> <filter> <domain_id>123</domain_id> <mailname> <name>bfischer</name> <permissions> <permission> <name>cp_access</name> <value>true</value> </permission> <permission> <name>manage_drweb</name> <value>true</value> </permission> .4.0.0.   The name node is required.0. The way used in the API RPC v.0 and earlier versions is parameterdependable.0 and Later Versions In the API RPC v.

4. It allows/prohibits the mail user changing settings of the spam filtering software integrated with Plesk (SpamAssassin). It allows/prohibits the mail user access to their mail box via Plesk Control Panel.2. It allows/prohibits the mail user changing settings of the the antivirus software integrated with Plesk (DrWeb).1. Data type: boolean.4.0 and Earlier Versions Mail user permissions are defined by complex data type MailUserPermission (plesk_mailname. The manage_drweb node is optional. Data type: boolean. The manage_spamfilter node is optional.Supported Operations 458 <permission> <name>manage_spamfilter</name> <value>true</value> </permission> </permissions> </mailname> </filter> </create> </mail> </packet> API RPC v.0”> <mail> <create> <filter> <domain_id>123</domain_id> <mailname> <name>bfischer</name> <permissions> <cp_access>true</cp_access> <manage_drweb>true</manage_drweb> <manage_spamfilter>true</manage_spamfilter> </permissions> </mailname> </filter> </create> </mail> </packet> .  The following packet creates a mail account and sets permissions for it: <packet version=”1. This type is structured as follows:   The cp_access node is optional.2.xsd). Data type: Boolean.

The filter node used in operations create and update is presented by the mailnameFilterType complex type (mail_input. It specifies the domain ID. The mailname node is required. It holds a collection of mail account settings that will be affected.Filtering is the way request packets pick out mail accounts to which the requested operation will be applied. When filtering mail accounts. This data type is structured as follows:   The domain_id node is required.2.xsd).xsd).com</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> The packet above modifies settings of the ann@example. we never specify the entire mail name. Data type: mailnameType (plesk_mailname. and the mail user name is specified by the name node within the mailname section. . Data type: integer. The mail operator uses filtering in most of its operations.Supported Operations 459 Filtering Issues . <packet version=”1.com</address> <address>techgroup@example.4.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>ann</name> <mailgroup> <enabled>true</enabled> <address>techdept@example.com</address> <address>findept@example.com mail account (a mail group) with several new mail addresses. This filter can pick out one to many mail account existing on the same domain. The domain part of it is specified by the domain_id node.

it is enough to specify some general setup information.Supported Operations 460 The mail operator uses two more types of filtering (type GetInfoAdvancedFilter. These types are designed for particular cases and considered in the relevant sections (Getting Mail Account Settings (see page 470) and Deleting Mail Accounts (see page 475). respectively).4. or it can hold just some of them. In addition. To register new mail account in Plesk database. namely: the domain ID where the mail account will be registered. you can specify various mail account settings (all of them are optional):           Mail user access to the account via Plesk Control Panel Mail box size Mail box alias Mail user permissions Antivirus protection Mail group members (if the account acts as a mail group) Mail groups in which the mail account has membership Files to store in the repository Automatic response messages Mail addresses to which all incoming correspondence will be redirected automatically A mail account can have all these settings specified. You can specify these settings when creating a mail account or later (they can be set using the set_prefs operation). Creating Mail Accounts Mail user account can be created on the specified domain either by Plesk Administrator or by Plesk Client. type mailFilterType).2.0”> <mail> <create> … </create> </mail> </packet> . and the mail account name. Request Packet Structure A request XML packet creating a mail account in Plesk database includes the create operation node: <packet version=”1.

Data type: integer. Data type: mailnameType (plesk_mailname. It defines the name of a mail account. It uniquely identifies the domain on which the mail account will be created.2.xsd). Request Samples The following packet creates on a single domain two mail accounts with a minimum of settings: <packet version=”1.Supported Operations 461 The create node does not have a separate type. it is nested within the MailTypeRequest type (mail_input. It holds a collection of data describing mail accounts to be created. The create node has the following graphics representation:    The filter node is required. Data type: mailnameFilterType (plesk_mailname.xsd) The domain_id node is required.xsd).0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailbox> <enabled>true</enabled> </mailbox> <password>12345</password> <password_type>crypt</password_type> <permissions> <cp_access>true</cp_access> </permissions> </mailname> <mailname> <name>techdept</name> <mailbox> <enabled>true</enabled> </mailbox> </mailname> </filter> </create> </mail> </packet> .4. and a collection of mail account settings (if any specified). See the structure of this node in the Mail User Account Settings (see page 448) section. The mailname node is required.

use multiple create nodes: <packet version=”1. The packets are similar in both cases. except for Plesk Clients can create mail accounts on their own domains only.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailbox> <enabled>true</enabled> </mailbox> <password>12345</password> <password_type>crypt<password_type> <permissions> <cp_access>true</cp_access> </permissions> </mailname> </filter> </create> <create> <filter> <domain_id>13</domain_id> <mailname> <name>admin</name> <mailbox> <enabled>true</enabled> </mailbox> <password>qwerty123456</password> <password_type>plain<password_type> </mailname> </filter> </create> </mail> </packet> Mail accounts can be created by Plesk Administrator or by Plesk Clients.Supported Operations 462 To create multiple mail accounts on different domains within one packet.2. .4.

The errtext node is optional.Supported Operations 463 Response Packet Structure The create node of the response packet is structured as follows:      The result node is required.0”> <mail> <create> <result> <status>ok</status> <mailname> <name>techdept</name> </mailname> </result> <result> <status>ok</status> <mailname> <name>findept</name> </mailname> </result> </create> </mail> <output>c</output></packet> . Data type: resultType (common. Returns a collection of settings set for the mail account that has just been created. Data type: string. Data type: unsignedInt.xsd). Returns an error code when the create operation fails. It is required if the create operation succeeds. Data type: string. refer to the Mail User Account Settings (see page 448) section. It returns the execution status of the create operation.4. Returns an error message if the create operation fails. The status node is required. The mailname node is optional.2. To see the structure of this node. Allowed values: ok | error. It wraps the result of the requested create operation.xsd). Data type: mailnameType (plesk_mailname. Response Samples A positive response received from server after creating two mail accounts on the same domain looks as follows: <packet version=”1. The errcode node is optional.

2. To distinguish between multiple requests. Modifying Mail Account Settings Mail account settings can be modified either by Plesk Administrator or by Plesk Client. The settings not mentioned in the packet will be kept unchanged. It means that all the setting specified in the packet will be added to a mail account. This sub-operation can be applied to any setting.Supported Operations 464 A negative response can look as follows: <packet version=”1. and set. These settings are as follows:           Mail user access to his account via Plesk Control Panel Mail box size Mail box alias Mail user permissions Antivirus protection Mail group members (if an account acts as a mail group) Mail groups in which the mail account has membership Files stored in the account repository Automatic response messages Mail addresses to which all incoming correspondence will be redirected automatically The update operation is presented by three sub-operations: add.0”> <mail> <create> <result> <status>error</status> <errcode>1015</errcode> <errtext>Object owner not found. All these sub-operations were designed for working with the lists of objects kept in mail accounts.</errtext> </result> </create> </mail> </packet> The result blocks do not indicate creation of which mail accounts has failed. The remove sub-operation is a typical delete operation.  .  The add sub-operation is a typical update operation.4. you can rely on the order they followed one another in the request packet. and the settings already existing will be kept unchanged.</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. It means that all the setting specified in the packet will be removed from a mail account. remove.

it removes the passed in settings from the specified mail account. If specified. The filter node is required. it removes all previously set settings from the mail user account and sets the passed in settings anew. See the structure of this node in the Filtering Issues (see page 459) section. If specified. and the settings of each account as well. It specifies the domain which mail accounts will be modified. Data type: none. The set node is required.4. Request Packet Structure A request XML packet updating mail account settings includes the update operation node: <packet version=”1.    .xsd). Data type: mailnameFilterType (mail_input.Supported Operations 465  The set sub-operation is a hybrid (delete + update) operation. The update node has the following graphics representation: The update operation breaks into three types of update:  The add node is required. it adds the passed in settings to the mail account (all previously set settings are kept unchanged).0”> <mail> <update> … </update> </mail> </packet> The update node does not have a separate data type. Data type: none. The remove node is required. If specified.2. Data type: none. It means that all settings specified in the packet will replace all the settings already existing for the mail account. it is nested within the MailTypeRequest complex type (mail_input.xsd).

uk</address> <address>techgroup@advent.4.co.co.uk</address> </mailgroup> </mailname> </filter> </add> </update> .co.co.co.uk</address> <address>techgroup@advent.2.uk</address> <address>findept@advent.uk</address> <address>ann@advent.uk</address> <address>findept@advent.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techdept@advent.Supported Operations 466 Request Samples Adding new mail account settings The following packet updates a mail account as follows: New email addresses are added to the mail group created on basis of this account.uk</address> <address>nick@advent.co.co.uk</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> To add new settings to email accounts that belong to different domains.co. use multiple create elements: <packet version=”1.2.uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>bob@advent.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techdept@advent.co. <packet version=”1.4.

uk and findept@advent.0”> <mail> <update> <remove> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techgroup@advent.co.co.co.uk</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> 467 Removing mail account settings The following packet removes several email addresses from mail groups created by the previous sample packet: <packet version=”1.co.co.co.2.uk</address> </mailgroup> </mailname> </filter> </remove> </update> </mail> </packet> The first mail group stores two addresses now (techdept@advent.uk). Setting new mail account settings .uk).uk</address> <address>nick@techservice.co.uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>ann@techservice.4.co. The second mail group stores one address (bob@techservice.co.uk</address> <address>ann@techservice.Supported Operations <update> <add> <filter> <domain_id>13</domain_id> <mailname> <name>bfischer</name> <mailgroup> <enabled>true</enabled> <address>bob@techservice.uk</address> <address>nick@techservice.

It returns the result of the add sub-operation (the passedin settings are added to the mail account. The remove node is required.co.0”> <mail> <update> <set> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techgroup@advent.uk</address> <address>nick@techservice.co. other settings are kept unchanged). Data type: none.2.4.uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>ann@techservice. all previously set settings are kept unchanged). Data type: none.co.Supported Operations 468 The following packet removes all email addresses from mail groups of the specified two email user accounts. It returns the result of the remove sub-operation (the passed-in settings are removed from the mail account. After that the new addresses are added to the lists: <packet version=”1.uk</address> <address>fingroup@advent. .uk</address> </mailgroup> </mailname> </filter> </set> </update> </mail> </packet> Response Packet Structure The update node of the response packet is structured as follows:   The add node is required.co.

xsd).xsd). Returns a collection of updated settings of the specified mail account(s).      Response Samples Here is a sample response received from server after the specified mail accounts are updated with new settings successfully: <packet version=”1.4.Supported Operations 469  The set node is required. Data type: unsignedInt. Data type: operationresultType (mail_output. It is required if the update operation succeeds. refer to the Mail User Account Settings (see page 448) section. after which the passed-in settings are applied to the mail account). The errtext node is optional. . It returns the result of the set sub-operation (all previously set settings are removed. The result node is required. The status node is required. Allowed values: ok | error. To see the structure of this node. Data type: string. It returns the execution status of the update operation.2. It returns an error message if the update operation fails. The mailname node is optional. The errcode node is optional. Data type: mailnameType (plesk_mailname.0”> <mail> <update> <add> <result> <status>ok</status> <mailname> <name>admin</name> </mailname> </result> <result> <status>ok</status> <mailname> <name>webmaster</name> </mailname> </result> </add> </update> </mail> </packet> The packets received after removing/resetting mail account settings have the similar structure. It returns an error code when the update operation fails. Data type: string. It wraps the result of the update operation. Data type: none.

</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. you can rely on the order they followed one another in the request packet. stored files Mail group settings Mail user permissions Use the get_info operation to retrieve domain settings.4. The settings are as follows:       Mail account identifier. a negative response packet looks as follows: <packet version=”1. .Supported Operations 470 If the update operation on any mail account fails. Plesk Clients are allowed to get settings of mail accounts registered on their own domains only.0”> <mail> <update> <add> <result> <status>error</status> <errcode>1015</errcode> <errtext>Object owner not found. and alias Plesk Control Panel access settings Mail box settings Automatic responses. Getting Mail Account Settings Plesk Administrator can get settings of any mail account registered on any domain.2. name. redirects.</errtext> <mailname> <name>techdept</name> </mailname> </result> </add> </update> </mail> </packet> If the result blocks do not indicate what particular email account failed.

4. The name node is optional. . The domain_id node is required. Data type: string. Data type: none. The get_info node has the following graphics representation:     The filter node is required. It specifies the name of the mail account. Data type: GetInfoAdvancedFilter (mail_input. It indicates that Plesk Control Panel settings of the specified mail account are requested.Supported Operations 471 Request Packet Structure A request XML packet getting a collection of mail account settings should include the get_info operation node: <packet version=”1. Data type: integer.xsd).xsd). It specifies the identifier of the domain which mail accounts are requested.2. It holds a collection of data describing which mail account settings to retrieve.0”> <mail> <get_info> … </get_info> </mail> </packet> The get_info node does not have a separate type. The cp_access node is optional. it is nested within the MailTypeRequest complex type (mail_input.

It indicates that the list of automatic-response objects of the given mail account is requested.2. Data type: none.Supported Operations 472         The mailbox node is optional. The aliases node is optional.0”> <mail> <get_info> <filter> <domain_id>12</domain_id> <name>techservice</name> <name>techknowledge</name> </filter> . It indicates that mail box settings of the specified mail account are requested.  Request Samples The following sample packet requests for information on two mail accounts belonging to the same domain: <packet version=”1. The redirect node is optional. Data type: none. Data type: none.0 and later. Data type: none.4. It indicates that the list of mail groups in which the given account has a membership is requested.2. The autoresponders node is optional. It indicates that the mail group settings of the specified mail account are requested. Data type: none. Data type: none.4. Data type: none. use multiple get_info sections: <packet version=”1. Data type: none. Data type: none. It indicates that the list of redirects of the specified mail account is requested. It indicates that the list of files stored in the repository of the given mail account is requested. It indicates that a collection of permissions set for the given mail user is requested. The permissions node is optional. This node is supported by API RPC 1. It indicates that the list of files and their contents stored in the repository of the given mail account is requested.2.4. The groups node is optional. The repository node is optional.0”> <mail> <get_info> <filter> <domain_id>12</domain_id> <name>techservice</name> <name>techknowledge</name> </filter> <cp_access/> <mailbox/> <aliases/> <permissions/> </get_info> </mail> </packet> To request information on mail accounts belonging to different domains. The repository_content node is optional. It indicates that the list of aliases of the given mail account is requested. The group node is optional.

xsd). The mailname node is required if the get_info operation succeeds. The errtext node is optional. Allowed values: ok | error. Data type: resultType (common.Supported Operations <cp_access/> <mailbox/> </get_info> <get_info> <filter> <domain_id>13</domain_id> <name>admin</name> </filter> <permissions/> </get_info> </mail> </packet> 473 Response Packet Structure The get_info node of the response packet is structured as follows:      The result node is optional. It returns the execution status of the get_info operation. It wraps the result of the requested get_info operation. Data type: mailnameType (plesk_mailname. It can be missing if some error occurs before the validation starts. Data type: string. See the structure of this node in the Mail Account Settings (see page 448) section. It is used to return the error code if the get_info operation fails. Data type: unsignedInt. The status node is required. The errcode node is optional. It contains a collection of mail account settings ordered in the request packet. Can be used to return an error message if the get_info operation fails. .xsd). Data type: string.

4.0”> <mail> <get_info> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.4.</errtext> <mailname> <name>techknowledge</name> </mailname> </result> </get_info> </mail></packet> .0”> <mail> <get_info> <result> <status>ok</status> <mailname> <name>techdept</name> <cp_access> <enabled>true</enabled> <access> <locale>EN-US</locale> <skin_id>11</skin_id> <multiply_login>true</multiply_login> <disable_lock_screen>false</disable_lock_screen> </access> </cp_access> </mailname> </result> <result> <status>ok</status> <mailname> <name>techknowledge</name> <cp_access> <enabled>false</enabled> <access> </access> </cp_access> </mailname> </result> </get_info> </mail> </packet> A negative response can look as follows: <packet version=”1.2.Supported Operations 474 Response Samples A positive response that returns the requested information for the specified mail accounts can look as follows: <packet version=”1.2.</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

Data type: string. It specifies the identifier of the domain which mail account (or several) will be deleted. include to your request packet filter rule containing only domain_id node. Plesk Administrator can remove any mail account registered in Plesk.xsd).2.Supported Operations 475 Deleting Mail Accounts The remove operation is used to remove one to many mail accounts at one stroke. Data type: mailFilterType (mail_input. The domain_id node is required. Remarks To remove all mail accounts existing on a domain. . It specifies what mail accounts should be removed.4. it is nested within the MailTypeRequest type (mail_input. while a Plesk Client can delete mail accounts referring to domains that belong to this Plesk Client only. The remove node has the following graphics representation:    The filter node is required. Request Packet Structure A request XML packet that deletes mail accounts should include the remove operation node: <packet version=”1.0”> <mail> <remove> … </remove> </mail> </packet> The remove node does not have a separate type. The name node is optional. It specifies the name of the mail account to be deleted.xsd). provided all these accounts refer to the same domain. Data type: integer.

use multiple remove sections: <packet version=”1.0”> <mail> <remove> <filter> <domain_id>12</domain_id> <name>techdept</name> <name>techknowledge</name> </filter> </remove> <remove> <filter> <domain_id>13</domain_id> <name>findept</name> <name>proddept</name> </filter> </remove> </mail> </packet> To delete all mail accounts from the specified domain.2.0”> <mail> <remove> <filter> <domain_id>12</domain_id> <name>techdept</name> <name>techknowledge</name> <name>findept</name> <name>proddept</name> </filter> </remove> </mail> </packet> To delete several mail accounts belonging to different domains.Supported Operations 476 Request Samples The following packet deletes several mail accounts belonging to one domain: <packet version=”1. the following packet can be used: <packet version=”1.4.2.4.4.0”> <mail> <remove> <filter> <domain_id>12</domain_id> </filter> </remove> </mail> </packet> .2.

Data type: string. The status node is required. Data type: unsignedInt. See the structure of this node in the Mail User Account Settings (see page 448) section. Returns an error code when the remove operation fails.xsd).0”> <mail> <remove> <result> <status>ok</status> <mailname> <name>techdept</name> </mailname> </result> <result> <status>ok</status> <mailname> <name>techknowledge</name> </mailname> </result> </set_prefs> </mail> </packet> . Allowed values: ok | error.2.4. Response Samples A positive response received from server after deleting particular mail accounts looks as follows: <packet version=”1. The errtext node is optional. Returns an error message if the remove operation fails. It wraps the result of the requested remove operation. Data type: mailnameType. Data type: string. The mailname node is required if the remove operation succeeds. The errcode node is optional. It contains a settings of the mail account that has been deleted. Data type: resultType (common.Supported Operations 477 Response Packet Structure The remove node of the response packet is structured as follows:      The result node is optional. It returns the execution status of the del operation.

</errtext> <mailname> <name>techknowledge</name> </mailname> </result> </set_prefs> </mail> </packet> Enabling/Disabling Mail Service on Domain Use the enable (disable) operation to enable (disable) mail service on a particular domain.4.2. Request Packet Structure A request XML packet that enables mail service on the specified domain contains the enable operation node: <packet version=”1.Supported Operations 478 A negative response can look as follows: <packet version=”1. It indicates the domain on which mail service should be turned on. .0”> <mail> <remove> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2. The enable node has the following graphics representation:  The domain_id node is required.xsd).0”> <mail> <enable> … </enable> </mail> </packet> The enable node does not have a separate data type. it is nested within the MailTypeRequest type (mail_input. Data type: integer.4.</errtext> <mailname> <name>techdept</name> </mailname> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

Request Samples The following request packet demonstrates how mail service can be enabled on multiple domains: <packet version=”1.0”> <mail> <enable> <domain_id>11</domain_id> </enable> <enable> <domain_id>12</domain_id> </enable> <enable> <domain_id>15</domain_id> </enable> </mail> </packet> To disable mail service on multiple domains.0”> <mail> <disable> … </disable> </mail> </packet> The disable node does not have a separate data type.2. The disable node has the following graphics representation:  The domain_id node is required.2.0”> <mail> <disable> <domain_id>11</domain_id> </disable> <disable> <domain_id>12</domain_id> </disable> <disable> <domain_id>15</domain_id> </disable> </mail> </packet> .4.2. Data type: it_type (integer).Supported Operations 479 A request XML packet that disables mail service on the specified domain contains the disable operation node: <packet version=”1. It indicates the domain on which mail service should be turned off. it is nested within the MailTypeRequest complex type (mail_input.xsd). send the following request: <packet version=”1.4.4.

It is used to return an error code if the enable operation fails. Can be used to return an error message if the enable operation fails. It returns the execution status of the enable operation. Data type: unsignedInt. The errcode node is optional. The status node is required.xsd). It wraps the result of the requested enable operation.4. Allowed values: ok | error. The errtext node is optional.    . Data type: string.0”> <mail> <enable> <domain_id>11</domain_id> </enable> <disable> <domain_id>12</domain_id> </disable> </mail> </packet> Response Packet Structure The enable node of the response packet is structured as follows:  The result node is optional.Supported Operations 480 API RPC allows the use of both these operations within a single packet and within the same mail operator: <packet version=”1.2. Data type: resultType (common. Data type: string.

It is used to return an error code if the disable operation fails. The status node is required. a positive response arrives from Plesk server: <packet version=”1. The errtext node is optional.Supported Operations 481 The disable node of the response packet is structured as follows:     The result node is optional. Data type: string. a positive response from Plesk server looks as follows: <packet version=”1. Allowed values: ok | error. Data type: string. Data type: resultType (common. Response Samples If the mail service has been turned on the domain successfully. It wraps the result of the requested disable operation.xsd).0”> <mail> <enable> <result> <status>ok</status> </result> <result> <status>ok</status> </result> <result> <status>ok</status> </result> </enable> </mail></packet> .2.0”> <mail> <enable> <result> <status>ok</status> </result> </enable> </mail> </packet> A positive response for the disable operation looks similarly. It returns the execution status of the disable operation. Data type: unsignedInt.4. The errcode node is optional. Can be used to return an error message if the disable operation fails.2. If the mail service has been turned on the multiple domains.4.

</errtext> </result> </enable> </mail> </packet> The results (both positive and negative) will be returned in the order the enable node have been sent in the request packet.0”> <mail> <enable> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2.0”> <mail> <set_prefs> … </set_prefs> </mail> </packet> .</errtext> </result> <result> <status>ok</status> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2. a negative response packet looks as follows: <packet version=”1. Request Packet Structure A request XML packet setting mail service preferences for the specified domains includes the set_prefs operation node: <packet version=”1.4.Supported Operations 482 The results will be returned in the order the enable node have been sent in the request packet. Setting Mail Service Preferences Use the set_prefs operation to set mail service preferences on the specified domains. If the enable operation fails.4.

xsd). Data type: MailPreferences.Supported Operations 483 The set_prefs node does not have a separate data type.0”> <mail> <set_prefs> <filter> <domain_id>12</domain_id> </filter> <prefs> <nonexistent-user> <reject/> . Request Samples Setting Mail Service Preferences under Plesk Administrator Plesk Administrator can set mail service preferences for all domains registered in Plesk. It specifies a collection of mail service preferences that will be set for the specified domains.2. The following packet demonstrates how Plesk Administrator changes mail service settings the same way on three domains. The set_prefs node has the following graphics representation:    The filter node is required. It specifies a list of domains on which mail service settings are modified.4. The prefs node is required. use multiple set_prefs elements: <packet version=”1. Data type: integer. it is nested within the MailTypeRequest type (mail_input. The domain_id node is optional. <packet version=”1.2. It specifies the identifier of the domain on which mail service settings are modified.4. The structure of this node is described in the Mail Service Settings (see page 447) section.0”> <mail> <set_prefs> <filter> <domain_id>12</domain_id> <domain_id>14</domain_id> <domain_id>15</domain_id> </filter> <prefs> <nonexistent-user> <reject/> </nonexistent-user> <webmail>true</webmail> </prefs> </set_prefs> </mail> </packet> To set different settings for different domains within a single packet. Data type: none.

Supported Operations </nonexistent-user> <webmail>true</webmail> </prefs> </set_prefs> <set_prefs> <filter> <domain_id>13</domain_id> <domain_id>14</domain_id> </filter> <prefs> <nonexistent-user> <forward>techdept@advent.uk</forward> </nonexistent-user> <webmail>false</webmail> </prefs> </set_prefs> </mail> </packet> 484 If the filter is empty.2.4.co. The only difference is that an empty filter means that the specified settings will be applied to all domains belonging to the Plesk Client sending the packet: <packet version=”1.0”> <mail> <set_prefs> <filter/> <prefs> <webmail>true</webmail> </prefs> </set_prefs> </mail> </packet> .2.4. the specified settings will be applied to all domains registered in Plesk: <packet version=”1.0”> <mail> <set_prefs> <filter/> <prefs> <webmail>true</webmail> </prefs> </set_prefs> </mail> </packet> Setting Email Service Settings under Plesk Client All the use cases of the set_prefs operation node for Plesk Clients are similar to those for Plesk Administrator.

Can be used to return an error message if the set_prefs operation fails.Supported Operations 485 Response Packet Structure The set_prefs node of the response packet is structured as follows:      The result node is optional. Data type: unsignedInt. The errtext node is optional. This packet returns the result of modifications applied to two domains. Data type: string. Data type: resultType (common.2. Allowed values: ok | error. <packet version=”1. The domain_id node is optional.0”> <mail> <set_prefs> <result> <status>ok</status> <domain_id>12</domain_id> </result> <result> <status>ok</status> <domain_id>13</domain_id> </result> </set_prefs> </mail> </packet> . It is used to return an error code if the set_prefs operation fails. Data type: integer. It returns the execution status of the set_prefs operation. The status node is required.xsd).4. Returns the identifier of the domain on which mail service settings have been modified. Response Samples A positive response received from Plesk server after mail service settings are modified looks as shown below. Data type: string. It wraps the result of the requested set_prefs operation. The errcode node is optional.

2.</errtext> <domain_id>13</domain_id> </result> </set_prefs> </mail> </packet> Getting Mail Service Preferences Use the set_prefs operation to retrieve mail service settings set for the specified domains.0”> <mail> <set_prefs> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2. it is nested within the MailTypeRequest type (mail_input. . Data type: none. It specifies an identifier of the domain which mail service settings are requested. Data type: integer.</errtext> <domain_id>12</domain_id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations 486 If the operation fails. It holds a list of domains which mail service settings are requested.4.0”> <mail> <get_prefs> … </get_prefs> </mail> </packet> The get_prefs node does not have a separate type. The get_prefs node has the following graphics representation:   The filter node is required.4. The domain_id node is optional.xsd). Request Packet Structure A request XML packet that asks for mail service settings for a certain domain should include the get_prefs operation node: <packet version=”1. a negative response can look as follows: <packet version=”1.

Supported Operations 487 Request Samples Getting Mail Service Settings under Plesk Administrator Plesk Administrator can get mail service preferences for all domains registered in Plesk.4. use the following packet: <packet version=”1.2.0”> <mail> <get_prefs> <filter/> </get_prefs> </mail> </packet> Getting Mail Service Settings under Plesk Client All the use cases of the get_prefs operation for Plesk Clients are similar to those for Plesk Administrator. the following packet must be used: <packet version=”1.2.2.0”> <mail> <get_prefs> <filter/> </get_prefs> </mail> </packet> .0”> <mail> <get_prefs> <filter> <domain_id>12</domain_id> <domain_id>14</domain_id> <domain_id>15</domain_id> </filter> </get_prefs> </mail> </packet> To request these settings for all domains registered in Plesk.4.4. The only difference is that an empty filter means that the specified settings will be retrieved from all domains belonging to Plesk Client sending the packet: <packet version=”1. The following packet demonstrates how Plesk Administrator requests for mail service settings of three domains: To get the mail service settings set for particular domains. described above.

     Response Samples A positive response that returns mail service settings for two specified domains looks as follows: <packet version=”1. Returns an error code when the get_prefs operation fails. It can be missing if some error occurs before the validation starts. The structure of the node is described in the Mail Service Settings (see page 447) section. Data type: string. The errcode node is optional. It wraps the result of the requested get_prefs operation. Returns a collection of mail service preferences set for the specified domain.xsd).xsd). The errtext node is optional.Supported Operations 488 Response Packet Structure The get_prefs node of the response packet is structured as follows:  The result node is optional. Returns the execution status of the get_prefs operation. The status node is required. The domain_id node is optional.4. Data type: resultType (common. Data type: string.0”> <mail> <get_prefs> <result> <status>error</status> <domain_id>12</domain_id> <prefs> <nonexistent-user> <reject/> </nonexistent-user> <webmail>true</webmail> </prefs> </result> . Returns an error message if the get_prefs operation fails. Returns the identifier of the domain which mail service settings are retrieved.2. Data type: integer. The prefs node is optional. Data type: unsignedInt. Data type: MailPreferences (plesk_mail. Allowed values: ok | error.

4.Supported Operations <result> <status>error</status> <domain_id>13</domain_id> <prefs> <nonexistent-user> <forward>techdept@advent.0”> <mail> <get_prefs> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> <domain_id>13</domain_id> </result> </get_prefs> </mail> </packet> Renaming Mail Accounts Use the rename operation to rename a mail account.co.</errtext> <domain_id>12</domain_id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2. a negative response can look as follows: <packet version=”1.0”> <mail> <rename> … </rename> </mail> </packet> .2.uk</forward> </nonexistent-user> <webmail>true</webmail> </prefs> </result> </get_prefs> </mail> </packet> 489 If the operation fails. Request Packet Structure A request XML packet setting a new name for an existing mail account should include the rename operation node: <packet version=”1.4.

Data type: string. Request Samples The following request packet renames mail account existing on the domain with ID 11: <packet version=”1. The name node is required.2. It identifies the domain that owns the mail account.0”> <mail> <rename> <domain_id>11</domain_id> <name>admin</name> <new-name>administrator</new-name> </rename> </mail> </packet> To rename multiple mail accounts with a single packet. it is nested within the MailTypeRequest type (mail_input.4. The new-name node is required.Supported Operations 490 The rename node does not have a separate type.4. It specifies the current name of the mail account. Data type: integer. Data type: string. use a separate rename section for each: <packet version=”1.0”> <mail> <rename> <domain_id>11</domain_id> <name>admin</name> <new-name>administrator</new-name> </rename> <rename> <domain_id>11</domain_id> <name>common</name> <new-name>main</new-name> </rename> </mail> </packet> .2. The rename node has the following graphics representation:    The domain_id node is required.xsd). It specifies the new name for the mail account.

4. The errtext node is optional. It wraps the result of the requested rename operation. Data type: string. It returns the execution status of the rename operation. Returns an error message if the rename operation fails. Data type: unsignedInt.2.2.0”> <mail> <rename> <result> <status>ok</status> </result> </rename> </mail> </packet> If the request packet renames multiple accounts. Allowed values: ok | error. The status node is required.4. Data type: string. Data type: resultType (common.0”> <mail> <rename> <result> <status>ok</status> </result> </rename> <rename> <result> <status>ok</status> </result> </rename> </mail> </packet> .xsd).Supported Operations 491 Response Packet Structure The rename node of the response packet is structured as follows:     The result node is optional. Returns an error code when the rename operation fails. a positive response arrives from Plesk server: <packet version=”1. Response Samples After the specified mail account is renamed successfully. The errcode node is optional. the response packet will look as follows: <packet version=”1.

Plesk supports two types of FTP accounts: default and additional. Default FTP accounts are the following:   Domain user's account (see page 317).to access particular domain directory with particular rights.1 for Windows API RPC version: 1. . The results will follow one another in the order they have been sent in the request packet.other than domain. subdomain and web user .2. accounts of the 'default' type are managed with the domain (see page 290) and webuser (see page 891) operators.2.4. The ftp-user operator affects only additional FTP accounts. a negative response can look as follows: <packet version=”1. Web user's account (see page 892).</errtext> </result> </rename> </mail> </packet> Managing FTP Accounts Operator: <ftp-user> XML Schema: ftpuser. which gives access to web user's directory located in domain directory. which gives access to subdomain's directory located in parent domain directory.xsd Plesk version: Plesk 8. It is always created in Plesk during creating new web user. Subdomain user's account.0”> <mail> <rename> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.  Additional FTP accounts are FTP accounts that can be created and used in addition to default ones. which gives access to the whole domain directory. They bring flexibility to managing FTP access to domains. If the operation fails.0 Plesk user: Plesk Administrator. It is always created in Plesk during creating new domain account. Plesk Client Description Generally speaking. allowing users . It is created if the 'Create a separate FTP user account for this subdomain' option was defined while creating a subdomain.Supported Operations 492 The packet will return the result for every filtered domain within a separate rename node.4.

delete and append files).e..  .Supported Operations 493 Plesk Administrators can manage FTP accounts on all domains. Plesk Clients can manage FTP accounts on all domains created for their account on conditions that they are granted the FTP subaccount management permission (see page 38).e. It specifies if the FTP user has write permissions for his home directory (i. list folders and files and download files located in it).xsd). create and delete folders. It is structured as follows:  The read node is optional. upload. Data type: boolean. Supported operations     ADD (see page 497) creates FTP account on a domain specified by its name or ID SET (see page 510) changes properties of a specified FTP account DEL (see page 517) deletes FTP account from a specified domain GET (see page 504) retrieves information on properties of specified FTP accounts on particular domains FTP Account Permissions FTP account permissions are presented by type FtpUserPermissions (ftpuser.. The write node is optional. Data type: boolean. It specifies if the FTP user has read permissions for his home directory (i.

Supported Operations 494 Filtering Issues Filtering is the way the request packets pick out FTP accounts to which the requested operation will be applied. Data type: integer. This data type is structured as follows:     The id node is required. It specifies the name of the domain (in Unicode) on which the FTP account exists. Individual filtering is allowed to Plesk Administrator. It specifies the FTP account ID in Plesk database. The domain-id node is required.xsd). Data type: string. Plesk Client (on their own domains) and Plesk Domain Administrators (on their own domain). The filter allows two kinds of filtering:  Nodes id and name serve to filter one to many FTP accounts individually. Data type: integer. and Plesk Client (on their own domains). This kind of filtering is allowed to Plesk Administrator. The name node is required. It specifies the unique identifier of the domain on which the FTP account exists. The domain-name node is required. Data type: string. It specifies the name of FTP account. Nodes domain-id and domain-name serve to filter all FTP accounts on a certain domain (or several) at one stroke.  . Filtering in Requests The filter node is presented by the FtpUserFilterType complex type (ftpuser.

4.2.0”> <ftp-user> <get> <filter> <id>65</id> <id>66</id> <id>67</id> </filter> </get> </ftp-user> </packet> The following packet is identical except it specifies accounts by their names: <packet version=”1.0”> <ftp-user> <get> <filter> <name>willy</name> <name>billy</name> <name>dilly</name> </filter> </get> </ftp-user> </packet> The following packet is invalid as both the id and the name nodes are used in the same filter: <packet version=”1.Supported Operations 495 Individual filtering The following packet requests information on properties of three FTP accounts specified by their ID: <packet version=”1.4.0”> <ftp-user> <get> <filter> <name>willy</name> <id>66</id> <name>dilly</name> </filter> </get> </ftp-user> </packet> .2.4.2.

0”> <ftp-user> <del> <filter/> </del> </ftp-user> </packet> . <packet version=”1.com</domain-name> <domain-name>doe2.2.2.0”> <ftp-user> <del> <filter> <domain-id>638</domain-id> <domain-id>1498</domain-id> </filter> </del> </ftp-user> </packet> The same packet specifies domains by name: <packet version=”1.4.4. if by Plesk Domain Administrator.com</domain-name> </filter> </del> </ftp-user> </packet> The following packet is invalid as it uses both the domain-id and the domain-name nodes within one filter: <packet version=”1. on his domain.0”> <ftp-user> <del> <filter> <domain-id>638</domain-id> <domain-name>doe2.4. If sent by Plesk Client.com</domain-name> </filter> </del> </ftp-user> </packet> The following packet sent by Plesk Administrator deletes all FTP accounts existing in Plesk.0”> <ftp-user> <del> <filter> <domain-name>doe1. it deletes all FTP accounts on all domains of this Client.4.Supported Operations 496 Bulk filtering The following packet deletes all FTP accounts existing on domains specified by ID: <packet version=”1.2.2.

set) uses filters. Earlier versions of the protocol do not support this node (it is optional for them). Note: The filter-id node appears in API RPC 1. The number of accounts that can be created on a particular domain is restricted with the 'Maximum number of additional FTP accounts domain limit (see page 305). If the filter node is left blank (<filter/>). Note: Plesk Clients can specify quota on disk space used by home directory only if they are granted the Hard disk quota assignment permission (see page 38). use the add operation. or/and by client limit (see page 35) of the same name.4. The blank filter means that all objects are matched by this rule. It returns the filtering rule. If one of the following values was set as a filter rule.2.0”> <ftp-user> <add> … </add> </ftp-user> </packet> . Request Packet Structure A request XML packet creating FTP account on a domain includes the add operation node: <packet version=”1.0. it is returned as the filter-id value in the response packet:     FTP account ID FTP account name Domain ID Domain name It is done so to trace the request parameters in case of an error.2. The node value can be integer (domain or FTP account ID) or a string (domain or FTP account name). get. Creating FTP Accounts To create an FTP account on a domain.4. the filter-id parameter will hold the ID of the object. the filter-id node is nested in a response packet.Supported Operations 497 Filtering in Responses If an operation in a request packet (del. Data type: anySimple.

and the account login. i. The home node is required. This node with value true is required if the home directory defined by the home node does not exist on the domain. Data type: integer. It specifies the ID of the domain on which the FTP account is created. It specifies the maximum total size of files and folders (in bytes) that the FTP account user can create in or upload to the home directory. The permissions node is optional.     . For more information. Data type: string.e. Data type: FtpUserPermissions. The domain-name node is required. It specifies if the home directory should be created or not. It specifies the home directory of the account. The node has the following graphical representation:     The name node is required. It specifies the name under which the FTP account will be known in Plesk. The password node is required. Data type: boolean. It specifies the FTP account permissions for home directory. The quota node is optional. It specifies the name of the domain (in unicode) on which the FTP account is created. The create-non-existent node is optional. The domain-id node is required..Supported Operations 498 The add node is presented by the FtpUserAddInputType complex type (ftpuser. It specifies the FTP account password. Data type: string. Data type: string. Data type: string.xsd). Data type: integer. the directory access to which is granted for the account user. refer to section FTP Account Permissions (see page 493).

To create multiple FTP accounts.4. you can create as many different FTP accounts on different domains as you want. For example: <home>/httpdocs/billy/pub</home> 3. even if you want to crate them on different domains. <packet version="1. with only required settings specified. Do not include to your packets lines like <home>/Global_Upload</home> <create-non-existent>true</create-non-existent> 4. 2. With one packet. With one add operation. Therefore.0"> <ftp-user> <add> <name>ftpuser1</name> <password>jdnHHbe6Gc</password> <home/> <domain-id>48</domain-id> </add> </ftp-user> </packet> . in the home node specify a full path to desired directory. The FTP account created with this packet will have name and login ftpuser1 and password jdnHHbe6Gc. Request Samples Creating single FTP accounts This packet creates FTP account. it is impossible to make some /Global_Upload folder a home directory for an account. specify value "-1" in the quota node: <quota>-1</quota> 5.2. meaning that two FTP accounts with the same name cannot be crated. with unspecified permissions. "/"). use the required number of add nodes in the packet. To create FTP account with unlimited quota. on domain with ID "48". FTP account name must be unique in Plesk. include an empty home node to your request: <home/> If you want to specify account home directory other than default. you can create only one FTP account on a domain specified either by name or by ID. Creating new folders in domain root directory is prohibited by Plesk. starting with root domain directory.Supported Operations 499 Remarks 1. If you want FTP account created with request packet to have a default home directory. The default home directory for any new additional FTP account is the domain root directory (namely. User of this account will have access to the domain directory httpdocs. 6. Total size of files that this FTP user is allowed to upload will be limited to default values defined by domain or domain owner limits.

org.net</domain-name> </add> </ftp-user> </packet> This packet creates FTP account. on domain with ID 50.Supported Operations 500 This packet creates FTP account.4.0"> <ftp-user> <add> <name>ftpuser2</name> <password>GeNehvs570</password> <home>/httpdocs/Pub</home> <create-non-existent>true</create-non-existent> <domain-name>doe. and changing the structure of domain root is not allowed by Plesk. Total size of files that this FTP user is allowed to upload will not be limited.4.org</domain-name> </add> </ftp-user> </packet> This request packet is incorrect because while creating FTP account it is trying to create the account home directory in domain root folder.2. on domain doe.0"> <ftp-user> <add> <name>ftpuser3</name> <password>lkAshr66v</password> <home>/httpdocs/Incoming</home> <quota>-1</quota> <permissions> <read>true</read> <write>true</write> </permissions> <domain-id>50</domain-id> </add> </ftp-user> </packet> . Total size of files that this FTP user is allowed to upload will be limited to default values defined by domain or domain owner limits.0"> <ftp-user> <add> <name>dwarf</name> <password>Kjrnc7HHsn</password> <home>/dwarfyplace</home> <create-non-existent>true</create-non-existent> <domain-name>reddwarf. with the full set of settings specified.2. <packet version="1. The FTP account created with this packet will have name and login ftpuser2 and password GeNehvs570. <packet version="1.4. User of this account will have access to the directory /httpdocs/Pub which does not exist on the domain and which will be created with this request packet. The account created with this packet will have name and login ftpuser3 and password lkAshr66v. with only required settings specified. User of this account will have read and write permissions on accessing directory Incoming located in domain folder/httpdocs.2. <packet version="1.

4.com</domain-name> </add> <add> <name>photo3</name> <password>J7chhend</password> <home>/private/photoshare/Incoming</home> <permissions> <read>true</read> <write>false</write> </permissions> <domain-name>example. Total size of files that the FTP users are allowed to upload will be limited to 100 Mbytes.0"> <ftp-user> <add> <name>photo1</name> <password>dkfje44Fwen</password> <home>/private/photoshare/Incoming</home> <create-non-existent>true</create-non-existent> <quota>104857600</quota> <permissions> <read>true</read> <write>true</write> </permissions> <domain-name>example. The third user created with the packet will have only read permission on accessing the same directory. Two of these accounts will have read and write permissions on accessing directory Incoming located in folder /private/photoshare which does not exist on the domain and which will be created with this request packet. <packet version="1.com.2.com</domain-name> </add> </ftp-user> </packet> .Supported Operations 501 Creating multiple FTP accounts This packet creates three FTP accounts on domain example.com</domain-name> </add> <add> <name>photo2</name> <password>jrtd30fH33</password> <home>/private/photoshare/Incoming</home> <quota>104857600</quota> <permissions> <read>true</read> <write>true</write> </permissions> <domain-name>example.

The errcode node is optional. It wraps the response received from the server. Is used to return the error code when the add operation fails.0"> <ftp-user> <add> <result> <status>ok</status> <id>5</id> </result> </add> </ftp-user> </packet> . It returns the unique identifier of the FTP account created with the add operation. Specifies the execution status of the add operation. Data type: FtpUserSimpleResultType (ftpuser. Data type: integer. The id node is required if the operation succeeds. Is used to return the error message if the add operation fails.4.Supported Operations 502 Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. The status node is required. Allowed values: ok | error. The errtext node is optional. Response Samples Positive responses This packet is received after successful creation of FTP account to which ID 5 was assigned.xsd). Data type: unsignedInt.2. <packet version="1. Data type: string. Data type: string.

2.0"> <ftp-user> <add> <result> <status>ok</status> <id>7</id> </result> </add> <add> <result> <status>ok</status> <id>8</id> </result> </add> <add> <result> <status>ok</status> <id>9</id> </result> </add> </ftp-user> </packet> Negative responses Response packet with such error is received from server if the request packet creating an account tried to create an account home directory in the root domain folder. <packet version="1.0"> <ftp-user> <add> <result> <status>error</status> <errcode>1006</errcode> <errtext>Unable to create directory /Upload: Access denied</errtext> </result> </add> </ftp-user> </packet> You will receive such response if the home node in request packet contains path to folder which does not exist on a domain.2.4.4.2. which is prohibited by Plesk.0"> <ftp-user> <add> <result> <status>error</status> <errcode>1019</errcode> <errtext>Invalid path specified</errtext> </result> </add> </ftp-user> </packet> . and no create-non-existent node is included to the request. <packet version="1.4.Supported Operations 503 This packet is received after successful creation of three FTP accounts. to which IDs 7. 8 and 9 were assigned. <packet version="1.

0"> <ftp-user> <add> <result> <status>error</status> <errcode>1024</errcode> <errtext>FTP subaccounts limit is reached for this domain</errtext> </result> </add> </ftp-user> </packet> Retrieving Information On FTP Accounts The get operation is used to retrieve the following FTP account settings:      Name/ login Home directory Quota on using disk space Permissions for home directory ID of the domain on which FTP account exists You can retrieve information on several FTP accounts in a single get operation by defining the filtering rule.2. Request Packet Structure A request XML packet retrieving information on FTP account settings includes the get operation node: <packet version=”1.4.0”> <ftp-user> <get> … </get> </ftp-user> </packet> .2.Supported Operations 504 Such response is received if the request packet tries to create FTP account on a domain where the maximum allowed number of FTP accounts already exists.4. <packet version="1. Use the blank filter (<filter/>) parameter to get information about all FTP accounts on all domains for the user identified by credentials from HTTP header.

<packet version="1.xsd).4.2.0"> <ftp-user> <get> <filter> <id>16</id> </filter> </get> </ftp-user> </packet> This packet retrieves information on FTP account with name ftpuser1.4. For information on this node structure.Supported Operations 505 The get node is presented by the FtpUserGetInputType complex type (ftpuser. Data type: FtpUserFilterType (ftpuser. It indicates FTP accounts which settings are to be retrieved with the request packet. Remarks Within one get operation you can retrieve information on FTP accounts using only one filtering rule: account IDs. you can always use several different filtering rules within one packet by including to it several get nodes. Request Samples Retrieving information on a single FTP account This packet retrieves information on FTP account with ID 16.0"> <ftp-user> <get> <filter> <name>ftpuser1</name> </filter> </get> </ftp-user> </packet> . However. or domain names. account names. <packet version="1.xsd).2. refer to Filtering Issues (see page 494). domain IDs. The node has the following graphical representation:  The filter node is required.

4.2.com and two.4. <packet version=”1.0”> <ftp-user> <get> <filter> <name>photo1</name> <name>photo3</name> </filter> </get> <get> <filter> <domain-id>34</domain-id> </filter> </get> </ftp-user> </packet> This packet retrieves information on all FTP accounts existing on domains called one.example.com</domain-name> </filter> </get> </ftp-user> </packet> .com</domain-name> <domain-name>two.example.0”> <ftp-user> <get> <filter> <domain-name>one. <packet version=”1.Supported Operations 506 Retrieving information on multiple FTP accounts This request packet is incorrect as both id and name nodes are nested in one filter node within one get operation.example. <packet version=”1.2.4.2.com. and on all FTP accounts existing on domain with ID 34.example.0”> <ftp-user> <get> <filter> <name>some-ftp</name> <id>34</id> </filter> </get> </ftp-user> </packet> This packet retrieves information on FTP accounts with names photo1 and photo3.

<packet version="1.0"> <ftp-user> <get> <filter/> </get> </ftp-user> </packet> Response Packet Structure The get node of the output XML packet is structured as follows: . or on all domains belonging to a Plesk Client whose credentials are specified in the HTTP headers.2.Supported Operations 507 This packet retrieves information on all FTP accounts existing on all domains created in Plesk if it is sent with Plesk Administrator credentials in the packet HTTP headers.4.

For more information. It is required if the get operation succeeds. It is required if the get operation succeeds. It specifies the name under which the FTP account is known in Plesk. The domain-id node is optional.xsd). Data type: result_status. response packet does not contain the name. It is required if the get operation succeeds. The errcode node is optional. refer to the Filtering Issues (see page 497) section. It is required if the get operation succeeds. and there are no FTP accounts existing on that domain. The id node is optional. It returns the unique identifier of the FTP account which settings are retrieved in the response packet. refer to section FTP Account Permissions (see page 493).Supported Operations 508      The result node is required. Data type: integer. It is required if the get operation succeeds. home. Allowed values: ok | error. Data type: unsignedInt. the directory access to which is granted for the account user. Data type: integer. . It specifies the home directory of the FTP account. It returns the filtering rule. It is required if the get operation succeeds. permissions and domain-id nodes. The home node is optional. It is used to return the error code when the get operation fails. It specifies the execution status of the get operation. Data type: string. The quota node is is optional. The errtext node is optional. It specifies the ID of the domain on which the FTP account exists. i.e.       Remarks In case when a domain was specified as filtering rule in a request packet. quota. Data type: integer. It specifies the FTP account permissions for home directory. Data type: FtpUserPermissions. The permissions node is optional. It specifies the maximum total size of files and folders (in bytes) that the FTP account user can create in or upload to the home directory. and the account login.. For more information. Data type: anySimple. The name node is optional. It wraps the response received from the server. It is required if the get operation succeeds. The status node is required. It is used to return the error message if the get operation fails. Data type: string. Data type: string. Data type: FtpUserGetResultType (ftpuser. The filter-id node is optional.

<packet version="1.0"> <ftp-user> <get> <result> <status>ok</status> <filter-id>photo1</filter-id> <id>7</id> <name>photo1</name> <home>/private/photoshare/Incoming</home> <quota>104857600</quota> <permissions> <read>true</read> <write>true</write> </permissions> <domain-id>2</domain-id> </result> <result> <status>ok</status> <filter-id>photo3</filter-id> <id>9</id> <name>photo3</name> <home>/private/photoshare/Incoming</home> <quota>0</quota> <permissions> . For details on adding accounts.4. which means that no FTP accounts exist on the specified domain. and information on FTP accounts existing on a domain with ID 34. The last get node in this response contains only status and filter-id nodes.2.Supported Operations 509 Response Samples Positive responses This packet retrieved information on FTP account created with default home directory and only required settings specified within the node. refer to the Creating FTP Accounts (see page 497) section.2.0"> <ftp-user> <get> <result> <status>ok</status> <filter-id>16</filter-id> <id>16</id> <name>jenny</name> <home></home> <quota>-1</quota> <permissions> <read>false</read> <write>false</write> </permissions> <domain-id>1</domain-id> </result> </get> </ftp-user> </packet> This packet retrieved information on two FTP accounts filtered by names. <packet version="1.4.

Supported Operations <read>true</read> <write>false</write> </permissions> <domain-id>2</domain-id> </result> </get> <get> <result> <status>ok</status> <filter-id>34</filter-id> </result> </get> </ftp-user> </packet> 510 Negative Responses This packet returned error because the request packet sent to the server intended to retrieve information on FTP account with ID 88 which does not exist.0"> <ftp-user> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Permission denied.2.2.</errtext> <filter-id>ivanov. <packet version="1.4. <packet version="1.4.ru</filter-id> </result> </get> </ftp-user> </packet> .0"> <ftp-user> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>ftp-user does not exist</errtext> <filter-id>88</filter-id> <id>88</id> </result> </get> </ftp-user> </packet> This packet returned error because the request packet sent to server by Plesk Client intended to retrieve information on FTP account which exists on a domain belonging to another Plesk Client.

xsd). . You can change settings of particular FTP accounts. It indicates FTP accounts which settings are to be updated with the information specified in values node. Note: Plesk Clients can change quota on disk space used by home directory only if they are granted the Hard disk quota assignment permission (see page 38)..4. or of all FTP accounts existing on particular domains or in the whole Plesk database.xsd). Data type: FtpUserFilterType (ftpuser.. For information on this node structure. Request Packet Structure A request XML packet changing FTP account settings in the Plesk's database includes the set operation node: <packet version="1.2.0"> <ftp-user> <set> . depending on what Plesk user credentials are specified in HTML headers of request packet. its graphical representation is as follows:  The filter node is required. refer to Filtering Issues (see page 494).Supported Operations 511 Changing FTP Account Settings The set operation is used to change settings of additional FTP accounts existing in Plesk database. </set> </ftp-user> </packet> The set node is presented with the FtpUserSetInputType complex type (ftpuser.

The home node is optional. For example: /httpdocs/billy/pub. refer to section FTP Account Permissions (see page 493). Therefore. It specifies the new home directory of the account.Supported Operations 512      The values node is required.. which is the domain root directory. it is impossible to make some /Global_Upload folder a home directory for an account. The create-non-existent node is optional. then home directory for FTP account will be set to default one. you can change settings of as many different FTP accounts with different filtering rules as you want. . The name node is optional. The quota node is optional. To change FTP account quota to unlimited. the directory access to which is granted for the account user. If the home node is left blank (<home/>). The home node should contain a full path to FTP account home directory starting with root domain directory. Do not include to your packets lines like <home>/Global_Upload</home> <create-non-existent>true</create-non-existent> 3. Data type: string. Data type: string. Data type: FtpUserSetType (ftpuser. It specifies the new name under which the FTP account will be known in Plesk. It specifies if the new home directory should be created or not. Creating new folders in domain root directory is prohibited by Plesk. It specifies the FTP account permissions for home directory. 2. To do so. It wraps a collection of settings that will be applied to the accounts specified with filter node. For more information. Data type: string. The permissions node is optional. With one packet. It specifies the new FTP account password. Data type: FtpUserPermissions. use the required number of add nodes in the packet. Data type: integer. specify value "-1" in the quota node: <quota>-1</quota> 4.e. It specifies the maximum total size of files and folders (in bytes) that the FTP account user can create in or upload to the home directory. i.xsd). This node with value true is required if new home directory defined with the home node does not exist. The password node is optional. Data type: boolean.   Remarks 1. and the new account login.

<packet version="1.2.4.2. <packet version="1. <packet version="1.0"> <ftp-user> <set> <filter> <id>46</id> </filter> <values> <home>/httpdocs/Pub</home> <create-non-existent>true</create-non-existent> <permissions> <read>true</read> <write>true</write> </permissions> </values> </set> </ftp-user> </packet> Changing settings of multiple FTP accounts This packet is incorrect as it intends to give the same new name to all FTP accounts existing on domain with ID 85.Supported Operations 513 Request Samples Changing settings of a single FTP account This packet sets up new password for FTP account with name "ftpuser2".2.4.0"> <ftp-user> <set> <filter> <name>ftpuser2</name> </filter> <values> <password>jkRR67hVBB</password> </values> </set> </ftp-user> </packet> This packet updates settings of FTP account with ID 46: It creates new account home directory /httpdocs/Pub and allows read and write permissions.4.0"> <ftp-user> <set> <filter> <domain-id>85</domain-id> </filter> <values> <name>ftp-doe1</name> </values> </set> </ftp-user></packet> .

<packet version="1.4.0"> <ftp-user> <set> <filter> <domain-name>example.2.com.Supported Operations 514 This packet sets 10-Mbytes quota for all FTP accounts existing on domain example.com</domain-name> </filter> <values> <quota>10485760</quota> </values> </set> </ftp-user> </packet> This packet allows read access and denies write access to all FTP accounts that can be managed by Plesk user defined in HTTP headers of the packet. <packet version="1.0"> <ftp-user> <set> <filter/> <values> <permissions> <read>true</read> <write>false</write> </permissions> </values> </set> </ftp-user> </packet> .4.2.

The errtext node is optional. Data type: unsignedInt. Data type: resultFilterType (ftpuser. Data type: integer. Is used to return the error message if the set operation fails. The status node is required. Specifies the execution status of the set operation. It wraps the response received from the server.      . The filter-id node is optional. It returns the filtering rule. The id node is required if the operation succeeds. It returns the unique identifier of the FTP account which settings were modified with add operation in request packet. The errcode node is optional. For more information. refer to the Filtering Issues (see page 497) section. Data type: string.Supported Operations 515 Response Packet Structure The set node of the output XML packet is structured as follows:  The result node is required.xsd). Is used to return the error code when the set operation fails. Allowed values: ok | error. Data type: string.

2. <packet version="1.com.2. <packet version="1.Supported Operations 516 Response Samples Positive responses This packet has been received after successful changing settings of FTP account called ftpuser2.0"> <ftp-user> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>ftp-user does not exist</errtext> <filter-id>666</filter-id> <id>666</id> </result> </set> </ftp-user></packet> .4.com</filter-id> <id>25</id> </result> </set> </ftp-user> </packet> Negative responses Packet with such error is received if the request packet intended to change settings of FTP account which does not exist in Plesk.com</filter-id> <id>16</id> </result> <result> <status>ok</status> <filter-id>example.4.0"> <ftp-user> <set> <result> <status>ok</status> <filter-id>ftpuser2</filter-id> <id>6</id> </result> </set> </ftp-user> </packet> This packet has been received after successful changing settings of FTP accounts existing on domain example.2.4. <packet version="1.0"> <ftp-user> <set> <result> <status>ok</status> <filter-id>example.

In the last case. Plesk Client.2. in turn. deletes all additional FTP accounts created on his domains. also defined by name or ID. the following result nodes contain the same error 1007.2. Request Packet Structure A request XML packet deleting FTP account includes the del operation node: <packet version=”1. or for deleting all FTP accounts existing on all domains you can manage.4. <packet version="1.4.0"> <ftp-user> <set> <result> <status>ok</status> <filter-id>87</filter-id> <id>316</id> </result> <result> <status>error</status> <errcode>1007</errcode> <errtext>User ftp-doe7 already exists.0”> <ftp-user> <del> … </del> </ftp-user> </packet> .</errtext> <filter-id>87</filter-id> <id>318</id> </result> </set> </ftp-user> </packet> Deleting FTP Accounts Use the del operation to remove FTP accounts from Plesk database. Plesk Administrator deletes all additional FTP accounts created on the whole Plesk server. for deleting all FTP accounts existing on particular domains.Supported Operations 517 Such packet is received if the request packet intended to set the same new name for all FTP accounts existing on one domain.</errtext> <filter-id>87</filter-id> <id>317</id> </result> <result> <status>error</status> <errcode>1007</errcode> <errtext>User ftp-doe7 already exists. You can use this operation for deleting particular FTP accounts defined by name or ID. The first result node contains info on successful renaming of FTP account with ID 316.

you can delete as many different FTP accounts with different filtering rules as you want.2.0"> <ftp-user> <del> <filter> <name>photo4</name> </filter> </del> </ftp-user> </packet> This packet deletes FTP account with ID 44. <packet version="1.0"> <ftp-user> <del> <filter> <id>44</id> </filter> </del> </ftp-user> </packet> . For information on this node structure.4.xsd). Data type: FtpUserFilterType (ftpuser.Supported Operations 518 The del node is presented by the FtpUserDelInputType complex type (ftpuser. Remarks With one packet. use the required number of del nodes in the packet. Request Samples Deleting single FTP account This packet deletes FTP account with name photo4.2.4. It indicates which FTP accounts are to be deleted with the request packet. refer to Filtering Issues (see page 494). <packet version="1. The node has the following graphical representation:  The filter node is required.xsd). To do so.

0"> <ftp-user> <del> <filter> <name>ftpuser2</name> <name>photo6</name> </filter> </del> </ftp-user> </packet> This packet deletes all FTP accounts existing on domain example.com. photo6.4.4.com</domain-name> </filter> </del> </ftp-user> </packet> This packet removes all FTP accounts that can be managed by Plesk user defined in HTTP headers of the packet. <packet version="1.0"> <ftp-user> <del> <filter/> </del> </ftp-user> </packet> . <packet version="1.4.0"> <ftp-user> <del> <filter> <domain-name>example.Supported Operations 519 Deleting multiple FTP accounts This packet deletes FTP accounts with names ftpuser2.2.2. <packet version="1.2.

Data type: anySimple. The errtext node is optional. It specifies the execution status of the del operation. The id node is optional.xsd). Data type: string. Data type: string. It is used to return the error code when the del operation fails. Data type: unsignedInt. The filter-id node is optional. It is used to return the error message if the del operation fails. It returns the unique identifier of the FTP account that has been deleted with the request packet. It wraps the response received from the server.      . Data type: integer.Supported Operations 520 Response Packet Structure The del node of the output XML packet is structured as follows:  The result node is required. The status node is required. Data type: FtpUserGetResultType (ftpuser. refer to the Filtering Issues (see page 497) section. Allowed values: ok | error. It returns the filtering rule. The errcode node is optional. For more information.

2.com: These were FTP accounts with IDs 28 and 29.0"> <ftp-user> <del> <result> <status>ok</status> <filter-id>photo4</filter-id> <id>15</id> </result> </del> </ftp-user> </packet> This packet has been received after successful deletion of all FTP accounts that existed on domain doe3.0"> <ftp-user> <del> <result> <status>ok</status> <filter-id>example.0"> <ftp-user> <del> <result> <status>ok</status> <filter-id>doe3. In this case it is domain example.4. <packet version="1.2.2.com.Supported Operations 521 Response Samples Positive responses This packet has been received after successful deletion of FTP account called photo4.com</filter-id> <id>29</id> </result> </del> </ftp-user> </packet> Such packet is received if the request packet intends to delete all FTP accounts from a domain where no FTP accounts exist.4. <packet version="1.4. <packet version="1.com</filter-id> </result> </del> </ftp-user> </packet> .com</filter-id> <id>28</id> </result> <result> <status>ok</status> <filter-id>doe3. which had ID 15.

Supported operations . Exclusive IP address can be assigned to a single customer. IP addresses can be shared or exclusive.0"> <ftp-user> <del> <result> <status>error</status> <errcode>1013</errcode> <errtext>ftp-user does not exist</errtext> <filter-id>photo4</filter-id> </result> </del> </ftp-user> </packet> Managing IP Addresses Operator: <ip> XML Schema: ip_input. In Plesk. ip_output.xsd.4.Supported Operations 522 Negative responses Negative response received from server can look as follows: <packet version="1. SSL protection with authentic digital certificates and Anonymous FTP services are available only to domains hosted on exclusive IP addresses.2.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator Description The ip operator is used to manage IP addresses available on Plesk server. while shared IP address can be shared among several customer accounts.

The type node is required. It specifies the IP address you want to add to Plesk database. The netmask node is required. The interface node is required. if the specified IP is not in VPS (Virtual Private Server) pool. Allowed values: shared | exclusive. the attempt to add it to Plesk database will result in error. .4. It specifies the type of IP address. It specifies the network interface name. Note: In Plesk powered by Virtuozzo. Data type: ip_address (common.2. specifying a netmask and server network interface) GET (see page 527) retrieves the list of IP addresses available on the server SET (see page 530) updates properties for IP addresses available on the server DEL (see page 533) removes an IP address from Plesk server Adding IP Address Use the add operation to add IP address to Plesk server. Request Packet Structure A request XML packet adding IP address to Plesk server includes the add operation node: <packet version="1. It specifies the netmask of the network. Data type: string.0"> <ip> <add> … </add> </ip> </packet> Graphical representation of the add node is as follows:     The ip_address node is required. Data type: string.xsd). Data type: ip_address (common.xsd).Supported Operations 523     ADD (see page 523) adds an IP address to Plesk server as shared or exclusive.

<packet version ="1..17</ip_address> <netmask>255.255.0.2.18</ip_address> <netmask>255.4.2.255.0"> <ip> <add> <ip_address>192.255. <packet version ="1.0</netmask> <type>shared</type> <interface>Network Connection</interface> </add> </ip> </packet> Adding multiple IP addresses This packet adds two exclusive IP addresses to Plesk server. <add> … </add> </ip> Request Samples Adding a single IP address This packet adds a single shared IP address to Plesk server.0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> </ip> </packet> .0.4..0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> <add> <ip_address>192. Add as many add operations as the number of IPs you want to add.2. <ip> <add> … </add> .0.255.18</ip_address> <netmask>255.0"> <ip> <add> <ip_address>192.2.2.Supported Operations 524 Remarks You can add multiple IP addresses in a single packet.255.255.

Response Samples Adding a single IP address This request packet adds a single shared IP address to Plesk server. It specifies the execution status of the add operation.4.Supported Operations 525 Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. It warps the response retrieved from the server. The id_address node is optional.18</ip_address> <netmask>255.2.0. Data type: string.0"> <ip> <add> <ip_address>192. The errcode node is optional. Data type: string. it returns the IP address added to Plesk database. If the add operation succeeds.0</netmask> <type>shared</type> <interface>Network Connection</interface> </add> </ip> </packet> . Allowed values: ok | error.2.255. Is returns the error code if the add operation fails. <packet version ="1.xsd). Data type: ip_address (common. It returns the error message if the add operation fails.xsd). The errtext node is optional. Data type: integer.255. The status node is required. Data type: resultType (common.

2.255.255.16</ip_address> <netmask>255.0.255.4.4.0"> <ip> <add> <result> <status>error</status> <errcode>1013</errcode> <errtext>IP address was already added on the server</errtext> </result> </add> </ip> </packet> Adding multiple IP addresses This request packet adds two exclusive IP addresses to Plesk server.2.0.18</ip_address> </result> </add> </ip> </packet> If the IP address is already in Plesk database.4.2.0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> <add> <ip_address>192.17</ip_address> <netmask>255.0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> </ip> </packet> .0.2. <packet version ="1. the response is as follows: <packet version ="1.0"> <ip> <add> <result> <status>ok</status> <ip_address>192.255.2.2.0"> <ip> <add> <ip_address>192.Supported Operations 526 The positive response from the server looks as follows: <packet version ="1.

Supported Operations 527 A possible response from the server can look as follows: <packet version ="1.0.0"> <ip> <add> <result> <status>ok</status> <ip_address>192.0"> <ip> <get/> </ip> </packet> The get node graphical representation is as follows: Request packet sample The packet retrieving IP addresses from Plesk database looks as follows: <packet version="1. Request Packet A request XML packet retrieving IP addresses from Plesk database includes the get operation node: <packet version="1.0.2.0"> <ip> <get/> </ip> </packet> .2.4.4.2.2.4.2.16</ip_address> </result> </add> </ip> </packet> Retrieving IP addresses Use the get operation to retrieve all IP addresses from Plesk server database.17</ip_address> </result> </add> <add> <result> <status>ok</status> <ip_address>192.

It specifies the netmask of the network.xsd). The netmask node is required. It wraps the IP address info. The errtext node is optional.Supported Operations 528 Response Packet Structure The get node of the output XML packet is structured as follows:      The result node is required. The addresses node is optional. The status node is required. Specifies the IP address in Plesk database. Allowed values: ok | error. Data type: string. Data type: string. Data type: string. Data type: resultType (common.xsd). Data type: ip_address (common. The errcode node is optional. Is returns the error code if the get operation fails. It specifies the execution status of the get operation. It warps the response retrieved from the server. The interface node is required. The type node is required. It specifies the server network interface name. it returns the following data:  The ip_info node is required.xsd). Data type: ip_address (common. . Data type: integer. Data type: string. It returns the error message if the get operation fails. It specifies the type of IP address. Allowed values: shared | exclusive.     The ip_address node is required. If the get operation succeeds.

49.0</netmask> <type>exclusive</type> <interface>eth0</interface> </ip_info> </addresses> </result> </get> </ip> </packet> .4.5.1 version of the protocol.0.Supported Operations 529  The default node is optional.4.0"> <ip> <get> <result> <status>ok</status> <addresses> <ip_info> <ip_address>10.2.4.2.2.0.58. Response Samples The request packet looks as follows: <packet version="1. It specifies if the IP address is default for a domain.1.3.0"> <ip> <get/> </ip> </packet> A response packet can look as follows: <packet version="1. It specifies if any domain is shown when you type the IP address in browser. Use the ip node instead of ip_info node in previous versions of the protocol. Data type: none.221</ip_address> <netmask>255. Note: the default node is supported starting with API RPC protocol v.255. The ip_info node is supported starting with 1.

.Supported Operations 530 Changing Type Use the set operation to change IP address type.4.. Data type: string.0"> <ip> <set> … </set> </ip> </packet> The set node graphical representation is as follows:    The filter node is required.. Remarks You can change type of multiple IP addresses in a single packet.. Data type: ip_address (common. Note: You cannot change type of IP address from shared to exclusive if it is assigned to two or more clients. <ip_address>.2. Specifies the IP address in Plesk database..xsd).xsd) The ip_address node is required. It specifies the type of IP address.. Allowed values: shared | exclusive. Request Packet Structure A request XML packet changing the IP address type includes the set operation node: <packet version="1. Add as many ip_address operations as the number of IP addresses.</ip_address> . Data type: ipFilterType (ip_input. the type of which is to be changed. <filter> <ip_address>.</ip_address> </filter> . Specifies the filtering rule. The type node is required.

0.12 IP addresses to exclusive.Supported Operations 531 Request Samples Changing type of a single IP address This packet changes the type of 192.4.2.2.10 and 192.0.12</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:  The result node is required.2.1</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> Changing type of multiple IP addresses This packet changes the type of 192.0. <packet version="1.2. . It warps the response retrieved from the server.0"> <ip> <set> <filter> <ip_address>192.2.0.2.10</ip_address> <ip_address>192.0. <packet version="1.0.2.xsd).1 IP address to exclusive. Data type: resultType (common.2.0"> <ip> <set> <filter> <ip_address>192.4.

2.2. Response Samples Changing type of a single IP address This request packet changes the type of 192. It returns the IP address which status is changed.2.0.Supported Operations 532     The status node is required.2.2.0"> <ip> <set> <filter> <ip_address>192.0"> <ip> <set> <result> <status>ok</status> <ip_address>192.4.0. The id_address node is optional.</errcode> <ip_address>192.4.1 IP address to exclusive. the response looks as follows: <packet version="1.0.4.2. The errcode node is optional.0"> <ip> <set> <result> <status>error</status> <errcode>1019</errcode> <errcode>General ‘set IP’ error. It returns the error message if the set operation fails.2. Allowed values: ok | error.1</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> The positive response from the server looks as follows: <packet version="1. The errtext node is optional. Data type: string. <packet version="1. Data type: string. It specifies the execution status of the set operation. Is returns the error code if the set operation fails.1</ip_address> </result> </set> </ip></packet> .0.1</ip_address> </result> </set> </ip> </packet> If the IP was assigned to multiple customers. Data type: integer. Data type: ip_address (common.xsd).

12 IP addresses to exclusive.4.0.0"> <ip> <set> <filter> <ip_address>192.0.4.10</ip_address> </result> <result> <status>error</status> <errcode>1013</errcode> <errcode>ip does not exist.</errcode> <ip_address>192.2.2.0"> <ip> <set> <result> <status>ok</status> <ip_address>192.12</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> If the second IP address was not found.Supported Operations 533 Changing type of multiple IP addresses This packet changes the type of 192.2.2.2.2. <packet version="1. the response from the server looks as follows: <packet version="1.0.0.2.0.10 and 192.12</ip_address> </result> </set> </ip> </packet> .2.10</ip_address> <ip_address>192.0.

Add as many ip_address operations as the number of IP addresses you want to remove. You cannot remove the IP of the computer (defined by network configuration)... The ip_address node is required.xsd). You also cannot remove the IP address if one or more domains are hosted on this IP or forwarded from this IP. Data type: ip_address (common.. <filter> <ip_address>. <ip_address>. Request Packet Structure A request XML packet removing the IP address from Plesk database includes the del operation node: <packet version="1.4. Specifies the IP address in Plesk database.2.</ip_address> </filter> ..0"> <ip> <del> … </del> </ip> </packet> The del node graphical representation is as follows:   The filter node is required.Supported Operations 534 Removing IP Use the del operation to remove the IP address from Plesk database. Remarks You can remove multiple IP addresses in a single packet. Specifies the filtering rule.xsd). Data type: ipFilterType (ip_input...</ip_address> . where Plesk server is located.

1 IP address from Plesk database.2.2.2. It warps the response retrieved from the server.2.2.0.10</ip_address> <ip_address>192.Supported Operations 535 Request Samples Removing a single IP address This packet removers 192. <packet version="1.12 IP addresses.2.12</ip_address> </filter> </del> </ip> </packet> Response Packet Structure The set node of the output XML packet is structured as follows:   The result node is required.0. It specifies the execution status of the del operation.0"> <ip> <del> <filter> <ip_address>192. Data type: string. <packet version="1. The status node is required. .0.2.0.0.0. Data type: resultType (common.0"> <ip> <del> <filter> <ip_address>192.4. Allowed values: ok | error.2.xsd).1</ip_address> </filter> </del> </ip> </packet> Removing multiple IP addresses This packet removes 192.4.10 and 192.

or this IP is used by hosting or forwarding services.2.1 IP address from Plesk database. Data type: string. </errtext> </result> </del> </ip> </packet> The positive response from the server looks as follows: <packet version="1.0.4. It returns the error message if the del operation fails.1</ip_address> </filter> </del> </ip> </packet> If it was Plesk server IP address. Is returns the error code if the del operation fails.2.2.4.xsd).Supported Operations 536    The errcode node is optional. Data type: ip_address (common. The errtext node is optional. It returns the removed IP address.0.0.1</ip_address> </result> </del> </ip> </packet> .2. The id_address node is optional.1 is used for hosting or forwarding.0"> <ip> <del> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192. Data type: integer.0.2.4. <packet version="1. the response from the server looks as follows: <packet version="1. Response Samples Removing a single IP address This request packet removers 192.2.2.0"> <ip> <del> <filter> <ip_address>192.0"> <ip> <del> <result> <status>ok</status> <ip_address>192.

2 IP addresses.4.2</ip_address> </filter> </del> </ip> </packet> A possible response from the server can look as follows: <packet version="1.0.1 is used for hosting or forwarding.2.2.1</ip_address> <ip_address>192.2.2.2.2. </errtext> </result> </del> </ip> </packet> .0"> <ip> <del> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192.4. </errtext> </result> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192. <packet version="1.2.0.Supported Operations 537 Removing multiple IP addresses This request packet removes 192.0.0.2.2 is used for hosting or forwarding.0"> <ip> <del> <filter> <ip_address>192.0.1 and 192.0.

1. Language pack is an installable file containing resource files. a particular locale is represented by the corresponding language pack (LP). refer to the Descriptors Overview section of the Programming Guide.5. Supported operations       GET (on page 540) retrieves info on LP's installed on Plesk server INSTALL (on page 545) installs a specified LP to Plesk server GET-MESSAGE (on page 547) retrieves the message specified by a key from resource files of LP REMOVE (on page 552) removes LP from the server ENABLE (on page 555) enables LP on the server DISABLE (on page 559) disables LP on the server . On the implementation level.1 API RPC version: 1.0 Plesk user: Plesk Administrator Description A subset of Plesk user's environment adjusted to a particular language is called locale. The locale operator is used to manage LP's and to localize messages wrapped in object descriptors. For information on descriptors.0. The files are associative arrays structured like "key => value".Supported Operations 538 Managing Locales Operator: <locale> XML Schema: locale.xsd Plesk version: 8.

xsd) and structured as follows:  The id node is optional. Filter for Language Packs The filter for this operator is presented by type LocaleFilterType (locale. Filtering Issues Filtering is the way the request XML packet indicates the object (a web user or several) to which the operation will be applied. U. Local Code. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. It specifies name of a LP.S. where <languagecode2> is a lower-case two-letter code derived from ISO 639-1 and <country/regioncode2> is an upper-case two-letter code derived from ISO 3166. nested in the filter node are called filtering rule. A single filter can specify multiple LP names. Parameters. The filter that matches the US English and Taiwan Chinese LP's looks as follows: <filter> <id>en-US</id> <id>zh-TW</id> </filter> . (on page 563) section. In this case all LP's on the server will be matched. For details on LP names. A single operation can use only parameters of the same type in the filtering rule. The request XML packet filters web user accounts using a special filter node. refer to the LP Names (on page 539) section. English locale is named "enUS". For example. refer to the Appendix. Remarks The filter node can be left blank (<filter/>).Supported Operations 539 LP Names Plesk locale and language pack names follow the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>". To see list of locale names supported by Plesk. Data type: string.

Data type: LocaleFilter (locale.xsd). It returns the filtering rule parameter. Retrieving List of LP's Use the get operation in the following cases:   To retrieve list of language packs installed on the server To retrieve detailed info on each LP Request Packet Structure A request XML packet retrieving info on LP's includes the get operation node: <packet version="1. If LP name was set as a filter rule parameter. Specifies the filtering rule.0.Supported Operations 540 filter-id If an operation in a request packet uses filters. refer to the Filtering Issues (on page 539) section.0"> <locale> <get> … </get> </locale> </packet> The get node is presented by type LocaleGetInput (locale. and its graphical representation is as follows:  The filter node is required. it is returned in the filter-id node of the response packet. It is done to trace the request parameters in case of error. . For more information.5.xsd). Data type: anySimple. the filter-id node is nested in a response packet.

Supported Operations 541 Request Samples Retrieving info on a single LP The following request packet retrieves info on US English LP: <packet version="1.0.0"> <locale> <get> <filter> <id>en-US</id> <id>ru-RU</id> </filter> </get> </locale> </packet> The following request packet retrieves info on all LP's installed on the server: <packet version="1.5.0.0"> <locale> <get> <filter/> </get> </locale> </packet> .0"> <locale> <get> <filter> <id>en-US</id> </filter> </get> </locale> </packet> Retrieving info on multiple LP's The following request packet retrieves info on US English and Russian LP's: <packet version="1.0.5.5.

Data type: string. The errtext node is optional.xsd). The id node is optional.It does not return any value for this operation.xsd). The filter-id node is optional. The message node is optional. It warps the response retrieved from the server. Data type: unsignedInt.It holds name of the language pack matched by the filtering rule if the operation fails. Data type: string. The errcode node is optional. Allowed values: ok | error. If the info node is present in the response packet. It returns the error code if the get operation fails.Supported Operations 542 Response Packet Structure The get node of the output XML packet is presented by type LocaleGetOutput (locale.xsd) and structured as follows:      The result node is required. Data type: string. refer to the Filtering Issues (on page 568) section. It specifies LP settings. Data type: string. It specifies the execution status of the get operation. Data type: resultFilterType (common. It returns the error message if the get operation fails. Data type: LocaleInfo (locale. For more information. It returns a filtering rule parameter if the operation fails. The info node is optional. the following nodes are required:    . The status node is required. Data type:anySimpleType.

0.0"> <locale> <get> <filter> <id>en-US</id> </filter> </get> </locale> </packet> A positive response from the server can look as follows: <packet version="1.Supported Operations 543      The id node specifies the LP name. for details on language pack names. Response Samples Retrieving info on a single LP The following request packet retrieves info on US English LP: <packet version="1. The country node specifies countries where this language is native. Data type: string.5. Data type: string.5. Data type: integer. The lang node specifies the LP language. Data type: string. refer to the LP Names (on page 539) section. The enabled node specifies if this LP is available for users. Data type: boolean.0. The used node specifies the number of users at all levels that use this language in their interface.0"> <locale> <get> <result> <status>ok</status> <info> <id>en-US</id> <lang>ENGLISH</lang> <country>United States</country> <used>17</used> <enabled>true</enabled> </info> </result> </get></locale></packet> .

5. the response is as follows: <packet version="1.Supported Operations 544 If the LP was not found. and Russian LP was not found on the server. the response from the server looks as follows: <packet version="1.0.5.5.0.0"> <locale> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>en-US</filter-id> <id>en-US</id> </result> </get> </locale> </packet> Retrieving info on multiple LP's The following request packet retrieves info on US English and Russian LP's: <packet version="1.0"> <locale> <get> <result> <status>ok</status> <info> <id>en-US</id> <lang>ENGLISH</lang> <country>United States</country> <used>17</used> <enabled>true</enabled> </info> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>ru-RU</filter-id> <id>ru-RU</id> </result> </get> </locale> </packet> .0"> <locale> <get> <filter> <id>en-US</id> <id>ru-RU</id> </filter> </get> </locale> </packet> If US English LP was found.0.

Supported Operations 545 Installing LP The install operation is used to install a specified language pack to Plesk server. Note:This operation is unavailable in Plesk for Windows. and its graphical representation is as follows:  The filename node is required. This file should reside on the server.rpm</filename> </install> </locale> </packet> .0"> <locale> <install> … </install> </locale> </packet> The install node is presented by type LocaleInstallInput (locale. Specifies the LP package full name.0"> <locale> <install> <filename>.5.0.xsd).0. Data type: string. Request Packet Structure A request XML packet installing LP includes the install operation node: <packet version="1. You can use the upload operator to upload files to the server./tmp/en-RU. Request Samples The following request packet installs US English LP to the server: <packet version="1.5.

Allowed values: ok | error.rpm</filename> </install> </locale> </packet> The positive response from the server looks as follows: <packet version="1.xsd). Data type: string. Data type: unsignedInt.5. It returns the error code if the install operation fails.xsd) and structured as follows:     The result node is required. It specifies the execution status of the install operation. The errtext node is optional.0. Response Samples The following request packet installs US English LP to the server: <packet version="1. It warps the response retrieved from the server.5. Data type: string. The status node is required. The errcode node is optional. Data type: resultFilterType (common.0"> <locale> <install> <result> <status>ok</status> </result> </install> </locale> </packet> .Supported Operations 546 Response Packet Structure The install node of the output XML packet is presented by type LocaleInstallOutput (locale. It returns the error message if the install operation fails.0"> <locale> <install> <filename>.0./tmp/en-RU.

0.0. use the get-message operation. Request Packet Structure A request XML packet retrieving localized messages includes the get-message operation node: <packet version="1. structured like key => value. For instance.0"> <get-message> <install> … </install> </get-message> </packet> .0"> <locale> <install> <result> <status>error</status> <errcode>1013</errcode> <errtext>File not found</errtext> </result> </install> </locale> </packet> If the request packet was sent to Plesk for Windows server. To retrieve a key value for a specified locale.0"> <locale> <install> <result> <status>error</status> <errcode>1017</errcode> <errtext>Feature not supported by Plesk API-RPC</errtext> </result> </install> </locale> </packet> Retrieving Localized Messages Resource files of LP are associative arrays. the response is as follows: <packet version="1.5. One key can be equal to different values depending on a locale name. hst_def__fp_admin_login key can be equal to "FrontPage Administrator's Login" in US English locale and to "Login administrateur FrontPage" in French locale.Supported Operations 547 If the file was not found on the server.5.5.0. the response from the server looks as follows: <packet version="1.

0"> <locale> <get-message> <filter> <key>hst_def__fp_admin_login</key> <key>hst_def__fp_admin_passwd</key> </filter> <id>fr-FR</id> </get-message> </locale> </packet> .5. It specifies the key name. It specifies the language pack name. and its graphical representation is as follows:  The filter node is required. refer to the LP Names (on page 539) section. refer to the Filtering Issues (on page 539) section. The id node is required. Data type: string. The key node is required.xsd). Data type: LocaleGetMessageFilter (locale. Specifies the filtering rule.xsd). For more information. Data type: string.Supported Operations 548 The get-message node is presented by type LocaleGetMessageInput (locale.   Request Samples Retrieving value for a single key The following request packet retrieves value for the hst_def__fp_admin_login key in US English locale: <packet version="1. For details.5.0"> <locale> <get-message> <filter> <key>hst_def__fp_admin_login</key> </filter> <id>en-US</id> </get-message> </locale> </packet> Retrieving value for multiple keys The following request packet retrieves values for the hst_def__fp_admin_login and hst_def__fp_admin_passwd keys in French locale: <packet version="1.0.0.

Supported Operations 549 The following request packet retrieves values for the hst_def__fp_admin_login and hst_def__fp_admin_passwd keys in French and US English locales: <packet version="1.5. It warps the response retrieved from the server.xsd) and structured as follows:  The result node is required. .xsd).0"> <locale> <get-message> <filter> <key>hst_def__fp_admin_login</key> <key>hst_def__fp_admin_passwd</key> </filter> <id>fr-FR</id> </get-message> <get-message> <filter> <key>hst_def__fp_admin_login</key> <key>hst_def__fp_admin_passwd</key> </filter> <id>en-US</id> </get-message> </locale> </packet> Response Packet Structure The get-message node of the output XML packet is presented by type LocaleGetMessageOutput (locale. Data type: resultFilterType (common.0.

The message node is optional. It returns the error message if the operation fails.5.0.0. Data type: string. Data type: string.It holds name of the language pack matched by the filtering rule. The id node is optional. Allowed values: ok | error. The filter-id node is optional. It returns a filtering rule parameter. The errcode node is optional. The errtext node is optional.5.Supported Operations 550     The status node is required.It holds value of the key received from the request packet. It specifies the execution status of the operation. Data type: string. Data type: unsignedInt.0"> <locale> <get-message> <result> <status>ok</status> <filter-id>hst_def__fp_admin_login</filter-id> <id>en-US</id> <message>FrontPage Administrator's Login</message> </result> </get-message> </locale> </packet> . Data type: string.   Response Samples Retrieving value for a single key The following request packet retrieves value for the hst_def__fp_admin_login key in US English locale: <packet version="1. Data type: anySimple. For more information. refer to the Filtering Issues (on page 568) section.0"> <locale> <get-message> <filter> <key>hst_def__fp_admin_login</key> </filter> <id>en-US</id> </get-message> </locale> </packet> The positive response from the server looks as follows: <packet version="1. It returns the error code if the operation fails.

5.0"> <locale> <get-message> <filter> <key>hst_def__fp_admin_login</key> <key>hst_def__fp_admin_passwd</key> </filter> <id>fr-FR</id> </get-message> </locale> </packet> A possible response from the server can look as follows: <packet version="1. the response is as follows: <packet version="1.0"> <locale> <get-message> <result> <status>ok</status> <filter-id>hst_def__fp_admin_login</filter-id> <id>en-US</id> <message>FrontPage Administrator's Login</message> </result> <result> <status>ok</status> <filter-id>hst_def__fp_admin_passwd</filter-id> <id>fr-FR</id> <message>Mot de passe administrateur de FrontPage</message> </result> </get-message> </locale> </packet> .0"> <locale> <get-message> <result> <status>error</status> <errcode>1013</errcode> <errtext>Key does not exist</errtext> <filter-id>hst_def__fp_admin_login</filter-id> <id>fr-FR</id> </result> </get-message> </locale> </packet> Retrieving value for multiple keys The following request packet retrieves values for the hst_def__fp_admin_login and hst_def__fp_admin_passwd keys in French locale: <packet version="1.0.5.0.0.Supported Operations 551 If the key was not found.5.

and its graphical representation is as follows:  The filter node is required. Specifies the filtering rule.xsd). Data type: LocaleFilter (locale.0"> <locale> <remove> … </remove> </locale> </packet> The remove node is presented by type LocaleRemoveInput (locale.0.xsd).Supported Operations 552 Removing LP The remove operation is used to remove a specified language pack from the server. Note: You cannot remove the default language pack.0"> <locale> <remove> <filter> <id>fr-FR</id> </filter> </remove> </locale> </packet> . Request Samples Removing a single LP The following request packet removes French LP: <packet version="1.0. For more information.5. refer to the Filtering Issues (on page 539) section.5. Request Packet Structure A request XML packet removing LP's includes the remove operation node: <packet version="1.

It warps the response retrieved from the server.xsd). Allowed values: ok | error. Data type: string. .xsd) and structured as follows:   The result node is required.Supported Operations 553 Removing multiple LP's The following request packet removes German and French LP's: <packet version="1. Data type: resultFilterType (common.0"> <locale> <remove> <filter/> </remove> </locale> </packet> Response Packet Structure The remove node of the output XML packet is presented by type LocaleRemoveOutput (locale. The status node is required. It specifies the execution status of the operation.0"> <locale> <remove> <filter> <id>de-DE</id> <id>fr-FR</id> </filter> </remove> </locale> </packet> The following request packet removers all LP's installed on the server (except for enUS): <packet version="1.0.0.5.5.

5.0"> <locale> <remove> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </remove> </locale> </packet> If the LP was not found. It returns the error code if the operation fails.Supported Operations 554    The errcode node is optional. The filter-id node is optional. refer to the Filtering Issues (on page 568) section.0"> <locale> <remove> <filter> <id>fr-FR</id> </filter> </remove> </locale> </packet> The positive response from the server looks as follows: <packet version="1.0. It returns a filtering rule parameter. The id node is optional.0"> <locale> <remove> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </remove> </locale></packet> . the response from the server looks as follows: <packet version="1.It holds name of the language pack matched by the filtering rule.5. Data type: string.0.  Response Samples Removing a single LP The following request packet removes French LP: <packet version="1.5.0. For more information. Data type: anySimple. It returns the error message if the operation fails. Data type: unsignedInt. The errtext node is optional. Data type: string.

0"> <locale> <remove> <result> <status>error</status> <errcode>1023</errcode> <errtext>Unable to remove Plesk base locale</errtext> <filter-id>en-US</filter-id> <id>en-US</id> </result> <result> <status>ok</status> <filter-id>ru-RU</filter-id> <id>ru-RU</id> </result> </remove> </locale> </packet> Enabling LP The enable operation is used to enable LP on the server. Request Packet Structure A request XML packet enabling LP's includes the enable operation node: <packet version="1.5.0"> <locale> <get> <filter> <id>en-US</id> <id>ru-RU</id> </filter> </get> </locale> </packet> A possible response from the server can look as follows: <packet version="1.5.Supported Operations 555 Removing multiple LP's The following request packet removes US English and Russian LP's: <packet version="1.0.0"> <locale> <enable> … </enable> </locale> </packet> .0.5.0.

xsd).5.0. refer to the Filtering Issues (on page 539) section. Specifies the filtering rule.0"> <locale> <enable> <filter/> </enable> </locale> </packet> .0. For more information.xsd).5.0.0"> <locale> <enable> <filter> <id>fr-FR</id> </filter> </enable> </locale> </packet> Enabling multiple LP's The following request packet enables German and French LP's: <packet version="1.5. Data type: LocaleFilter (locale.0"> <locale> <enable> <filter> <id>de-DE</id> <id>fr-FR</id> </filter> </enable> </locale> </packet> The following request packet enables all LP's installed on the server: <packet version="1. Request Samples Enabling a single LP The following request packet enables French LP: <packet version="1.Supported Operations 556 The enable node is presented by type LocaleEnableInput (locale. and its graphical representation is as follows:  The filter node is required.

Data type: unsignedInt. It returns the error message if the operation fails.      . Data type: anySimple.Supported Operations 557 Response Packet Structure The enable node of the output XML packet is presented by type LocaleEnableOutput (locale.xsd) and structured as follows:  The result node is required. Data type: string. Data type: string. The id node is optional. It returns a filtering rule parameter. The status node is required. refer to the Filtering Issues (on page 568) section. It specifies the execution status of the operation. Data type: resultFilterType (common. It warps the response retrieved from the server. The errtext node is optional. The errcode node is optional. Data type: string. Allowed values: ok | error. The filter-id node is optional. It returns the error code if the operation fails.It holds name of the language pack matched by the filtering rule. For more information.xsd).

0.5.0.5.0"> <locale> <enable> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </enable> </locale> </packet> Enabling multiple LP's The following request packet enables French and Russian LP's: <packet version="1. the response from the server looks as follows: <packet version="1.Supported Operations 558 Response Samples Enabling a single LP The following request packet enables French LP: <packet version="1.0.5.0.0"> <locale> <enable> <filter> <id>fr-FR</id> <id>ru-RU</id> </filter> </enable> </locale> </packet> .0"> <locale> <enable> <filter> <id>fr-FR</id> </filter> </enable> </locale> </packet> The positive response from the server looks as follows: <packet version="1.5.0"> <locale> <enable> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </enable> </locale> </packet> If the LP was not found.

5. refer to the Filtering Issues (on page 539) section.xsd).Supported Operations 559 A possible response from the server can look as follows: <packet version="1. Data type: LocaleFilter (locale. . For more information. Specifies the filtering rule.5.xsd).0"> <locale> <disable> … </disable> </locale> </packet> The disable node is presented by type LocaleDisableInput (locale.0"> <locale> <enable> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>fr-FR</filter-id> <id>en-US</id> </result> <result> <status>ok</status> <filter-id>ru-RU</filter-id> <id>ru-RU</id> </result> </enable> </locale> </packet> Disabling LP The disable operation is used to enable LP on the server. Request Packet Structure A request XML packet disabling LP's includes the disable operation node: <packet version="1. Note: You cannot disable the default language pack.0.0. and its graphical representation is as follows:  The filter node is required.

0.0"> <locale> <disable> <filter/> </disable> </locale> </packet> .0.0.5.5.0"> <locale> <disable> <filter> <id>de-DE</id> <id>fr-FR</id> </filter> </disable> </locale> </packet> The following request packet disables all LP's installed on the server: <packet version="1.5.0"> <locale> <disable> <filter> <id>fr-FR</id> </filter> </disable> </locale> </packet> Disabling multiple LP's The following request packet disables German and French LP's: <packet version="1.Supported Operations 560 Request Samples Disabling a single LP The following request packet disables French LP: <packet version="1.

Data type: resultFilterType (common.xsd) and structured as follows:      The result node is required. The errtext node is optional. The id node is optional. Data type: string. Data type: string. For more information.xsd). Data type: string. The errcode node is optional. It returns a filtering rule parameter. It specifies the execution status of the operation. The status node is required. Data type: unsignedInt.  .Supported Operations 561 Response Packet Structure The disable node of the output XML packet is presented by type LocaleDisableOutput (locale.It holds name of the language pack matched by the filtering rule. It returns the error message if the operation fails. Allowed values: ok | error. The filter-id node is optional. refer to the Filtering Issues (on page 568) section. It returns the error code if the operation fails. Data type: anySimple. It warps the response retrieved from the server.

5. the response from the server looks as follows: <packet version="1.0.5.0.0"> <locale> <disable> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </disable> </locale> </packet> If the LP was not found.Supported Operations 562 Response Samples Disabling a single LP The following request packet disables French LP: <packet version="1.0"> <locale> <disable> <filter> <id>fr-FR</id> <id>ru-RU</id> </filter> </disable> </locale></packet> .0.5.5.0"> <locale> <disable> <filter> <id>fr-FR</id> </filter> </disable> </locale> </packet> The positive response from the server looks as follows: <packet version="1.0"> <locale> <disable> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </disable> </locale> </packet> Disabling multiple LP's The following request packet disables French and Russian LP's: <packet version="1.0.

Switzerland Japanese Japanese .Oman Arabic .Supported Operations 563 A possible response from the server can look as follows: <packet version="1. Locale Codes Language Country/Region Afrikaans Albanian Albanian .India Kazakh Kazakh .United Arab Emirates Code af sq sq-AL ar ar-DZ ar-BH ar-EG ar-IQ ar-JO ar-KW ar-LB ar-LY ar-MA ar-OM ar-QA ar-SA ar-SY ar-TN ar-AE Language Country/Region Icelandic Icelandic .Japan Kannada Kannada .Kyrgyzstan Latvian Latvian .Indonesia Italian Italian .Algeria Arabic – Bahrain Arabic – Egypt Arabic – Iraq Arabic – Jordan Arabic – Kuwait Arabic – Lebanon Arabic – Libya Arabic .South Africa af-ZA .Kazakhstan Korean Korean .Saudi Arabia Arabic .Italy Italian .Syria Arabic .Korea Kyrgyz Kyrgyz .5.Tunisia Arabic .Morocco Arabic .Qatar Arabic .Albania Arabic Arabic .0.Iceland Indonesian Indonesian .Latvia Lithuanian Code is is-IS id id-ID it it-IT it-CH ja ja-JP kn kn-IN kk kk-KZ ko ko-KR ky ky-KG lv lv-LV lt Afrikaans .0"> <locale> <disable> <result> <status>error</status> <errcode>1013</errcode> <errtext>Locale does not exist</errtext> <filter-id>fr-FR</filter-id> <id>en-US</id> </result> <result> <status>ok</status> <filter-id>ru-RU</filter-id> <id>ru-RU</id> </result> </disable> </locale> </packet> Appendix.

Brunei Malay .Singapore Chinese .Romania Russian Russian .Former Yugoslav mk-MK Republic of Macedonia Malay Malay .Croatia Czech Czech .Czech Republic Danish Danish .Brazil Portuguese .India Romanian Romanian .Hong Kong SAR Chinese .Basque Belarusian Belarusian .Mongolia Norwegian Norwegian (Bokmål) .Lithuania Macedonian Code lt-LT mk Macedonian .Denmark Code ar-YE hy hy-AM az az-AZ eu eu-ES be be-BY bg bg-BG ca ca-ES zh zh-HK zh-MO zh-CN zh-SG zh-TW hr hr-HR cs cs-CZ da da-DK Language Country/Region Lithuanian .Portugal Punjabi Punjabi .Belarus Bulgarian Bulgarian .China (Simplified Chinese) Chinese .Azerbaijan Basque Basque .Supported Operations 564 Language Country/Region Arabic .Yemen Armenian Armenian .Russia Sanskrit ms ms-BN ms-MY mr mr-IN mn mn-MN no nb-NO nn-NO pl pl-PL pt pt-BR pt-PT pa pa-IN ro ro-RO ru ru-RU sa .Poland Portuguese Portuguese .India Mongolian Mongolian .Macao SAR Chinese .Norway Polish Polish .Norway Norwegian (Nynorsk) .Taiwan (Traditional Chinese) Croatian Croatian .Spain Chinese Chinese .Malaysia Marathi Marathi .Bulgaria Catalan Catalan .Armenia Azeri Azeri .

Bolivia Spanish .Caribbean English .Canada English .Peru Spanish .Colombia Spanish .New Zealand English .Uruguay Spanish .Country/Region Sanskrit .Nicaragua Spanish .Honduras Spanish .Australia English .Belgium Code nl nl-BE nl-NL en en-AU en-BZ en-CA en-CB en-IE en-JM en-NZ en-PH en-ZA en-TT en-GB Language .Philippines English .Belize English .El Salvador Spanish .United States en-US en-ZW et et-EE fo fo-FO fa fa-IR fi fi-FI fr fr-BE .Paraguay Spanish .Zimbabwe Estonian Estonian .Spain Spanish .Iran Finnish Finnish .Puerto Rico Spanish .Finland French French .Mexico Spanish .Slovakia Slovenian Slovenian .Serbia Slovak Slovak .Jamaica English .Estonia Faroese Faroese .Faroe Islands Farsi Farsi .Chile Spanish .Guatemala Spanish .The Netherlands English English .Ireland English .Costa Rica Spanish .Venezuela Code sa-IN sr sr-SP sk sk-SK sl sl-SI es es-AR es-BO es-CL es-CO es-CR es-DO es-EC es-SV es-GT es-HN es-MX es-NI es-PA es-PY es-PE es-PR es-ES es-UY es-VE English .Slovenia Spanish Spanish .Ecuador Spanish .Belgium Dutch .Panama Spanish .Dominican Republic Spanish .Trinidad and Tobago English .United Kingdom English .Argentina Spanish .South Africa English .India Serbian Serbian .Supported Operations 565 Language Country/Region Dutch Dutch .

Finland Swedish .India Tatar Tatar .Uzbekistan Vietnamese Vietnamese .Luxembourg French .Kenya Swedish Swedish .France French .Galician Georgian Georgian .Israel Hindi Hindi .Sweden Tamil Tamil .India Hebrew Hebrew .India Hungarian Hungarian .Hungary fr-CA fr-FR fr-LU fr-MC fr-CH gl gl-ES ka ka-GE de de-AT de-DE de-LU de-CH el el-GR gu gu-IN he he-IL hi hi-IN hu hu-HU Swahili Swahili .Russia Telugu Telugu .Germany German .Ukraine Urdu Urdu .Pakistan Uzbek Uzbek .Luxembourg German .Austria German .India Thai Thai .Vietnam sw sw-KE sv sv-FI sv-SE ta ta-IN tt tt-RU te te-IN th th-TH tr tr-TR uk uk-UA ur ur-PK uz uz-UZ vi vi-VN German .Switzerland Greek Greek .Greece Gujarati Gujarati .Supported Operations 566 French .Georgia German German .Monaco French .Turkey Ukrainian Ukrainian .Liechtenstein de-LI .Switzerland Galician Galician .Canada French .Thailand Turkish Turkish .

Plesk client Description All connections to a domain and errors on the domain are registered in domain log files. GET (on page 576) retrieves Log Rotation settings.0.1 API RPC version: 1. Supported operations      SET (on page 570) changes Log Rotation settings. In other words. These log files are analyzed by the statistical utilities running on the server. logrotation represents Log Rotation service (Plesk control panel) functionality. The log-rotation operator is used to manage raw and processed log files.xsd Plesk version: 8.5.0 Plesk user: Plesk Administrator. ENABLE (on page 582) enables Log Rotation service on a domain DISABLE (on page 587) disables Log Rotation service on a domain GET-STATUS (on page 591) retrieves status of Log Rotation service .1.Supported Operations 567 Managing Log Rotation on Domain Operator: <log-rotation> XML Schema: logrotation.

specifies log limits. The request XML packet filters web user accounts using a special <filter> node. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. . The graphical representation of the type is as follows:  The log-rotation node is required. Data type: LogRotationConditionType (logrotation. Filtering Issues Filtering is the way the request XML packet indicates the object (a web user or several) to which the operation will be applied.xsd). It specifies maximum size of a log file in bytes.xsd)   The log-bysize node is required. The log-compress node is optional. It specifies how many processed by statistical utilities log files are stored on the server. It specifies if log files are compressed. nested in the filter node are called filtering rule. Allowed values: Daily | Weekly | Monthly    The log-max-num-files node is optional. It specifies interval of logging. Data type: string. Parameters. Data type: integer. On achieving a limit the log file is removed and new log file is started. Data type: integer.Supported Operations 568 Log Rotation Settings The settings are defined by type LogRotationSettingsType (logrotation. The log-bytime node is required. It specifies e-mail address on which processed log files will be sent. Data type: boolean. The log-email node is optional. A single operation can use only parameters of the same type in the filtering rule.

It specifies ID of a domain. For example.9. It specifies ID of a client. It specifies the client login name.xsd) and structured as follows:     The domain-id node is required. The client-id node is required. the filter that matches all domains of the clients with IDs 8. client ID or client name in the second. name. Remarks The filter node can be left blank (<filter/>). In this case all domains available for user specified by login credentials will be matched. The domain-name node is required. Data type: string. and 10 looks as follows: <filter> <client-id>8</client-id> <client-id>9</client-id> <client-id>10</client-id> </filter> . The client-login node is required. It specifies the domain name. Data type: integer. Data type: integer. A single filter can specify multiple domains defined either by ID.Supported Operations 569 Log Rotation Filter The filter for this operator is presented by type logRotationFilterType (logrotation. Data type: string (UTF-8).

    Domain ID Domain name Client ID Client login name It is done to trace request parameters in case of error.xsd). Data type: LogRotationSettingsType (logrotation. It returns the filtering rule parameter. it is returned in the filter-id node of the response packet. If one of the following values was set as a filter rule parameter.xsd).0.Supported Operations 570 filter-id If an operation in a request packet uses filters. Request Packet Structure A request XML packet changing Log Rotation settings includes the set operation node: <packet version="1. and its graphical representation is as follows:  The filter node is required. refer to the Log Rotation Settings (on page 568) section. It specifies Log Rotation settings. Data type: logRotationFilterType (logrotation. For more information. Specifies the filtering rule.0"> <log-rotation> <set> … </set> </log-rotation> </packet> The set node is presented by type LogRotationSetInput (logrotation. Changing Log Rotation Settings The set operation is used to change settings of Log Rotation. refer to the Filtering Issues (on page 568) section.  .5. Data type: anySimple. the filter-id node is nested in a response packet.xsd). For details. The settings node is required.

0"> <log-rotation> <set> … </set> . Add as many set operations as the number of different filtering rules.com: <packet version="1.5.0.5.0.5. <packet version="1. <set> … </set> </log-rotation> </packet> Request Samples Changing settings of a single domain The following request packet changes Log Rotation settings of domain example.0.com</domain-name> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </set> </log-rotation> </packet> Changing settings of multiple domains The following request packet changes Log Rotation settings of domains used by the clients with ID 5 and ID 8: <packet version="1.0"> <log-rotation> <set> <filter> <domain-name>example..0"> <log-rotation> <set> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> </settings> </set> </log-rotation> </packet> ..Supported Operations 571 Remarks You can use different filtering rules in a single packet.

0"> <log-rotation> <set> <filter> <domain-id>6</domain-id> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </set> <set> <filter> <domain-name>example.5.0.5.0"> <log-rotation> <set> <filter/> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> </settings> </set> </log-rotation> </packet> .com and the domain with ID 6: <packet version="1.0.Supported Operations 572 The following request packet changes Log Rotation settings of domain example.com</domain-name> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </set> </log-rotation> </packet> The following request packet changes Log Rotation settings of all domains available for a packet sender: <packet version="1.

It returns the error code if the set operation fails.xsd) and structured as follows:  The result node is required. The filter-id node is required. For more information. It warps the response retrieved from the server. Allowed values: ok | error. The errcode node is optional. Data type:anySimple. Data type: string. Data type: resultFilterType (common.      .Supported Operations 573 Response Packet Structure The set node of the output XML packet is presented by type LogRotationSetOutput (logrotation. It returns the error message if the set operation fails. Data type: integer. The errtext node is optional. Data type: string. If the set operation succeeds. It returns a filtering rule parameter.xsd). The id node is optional. it holds the ID of the domain matched by the filtering rule. The status node is required. Data type: unsignedInt. It specifies the execution status of the set operation. refer to the Filtering Issues (on page 568) section.

5.5.0.0"> <log-rotation> <set> <result> <status>ok</status> <filter-id>example.Supported Operations 574 Response Samples Changing settings of a single domain The following request packet changes Log Rotation settings of domain example.com: <packet version="1.com</filter-id> </result> </set> </log-rotation> </packet> .5.0.com</domain-name> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </set> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0"> <log-rotation> <set> <filter> <domain-name>example. the response from the server looks as follows: <packet version="1.0.com</filter-id> <id>33</id> </result> </set> </log-rotation> </packet> If the domain was not found.0"> <log-rotation> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.

0"> <log-rotation> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Access denied</errtext> <filter-id>example.5.0.5.Supported Operations 575 If a packet sender has no rights ot manage physical hosting.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1034</errcode> <errtext>The domain is not hosted physically</errtext> <filter-id>example.0.0.0"> <log-rotation> <set> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> </settings> </set> </log-rotation> </packet> .com</filter-id> </result> </get> </log-rotation> </packet> If the domain is not hosted physically. the response from the server looks as follows: <packet version="1.com</filter-id> </result> </get> </log-rotation> </packet> Changing settings of multiple domains The following request packet changes Log Rotation settings of domains used by the clients with ID 5 and ID 8: <packet version="1.5. the response looks as follows: <packet version="1.

5.0.0.5.0"> <log-rotation> <get> … </get> </log-rotation> </packet> . Request Packet Structure A request XML packet retrieving Log Rotation settings includes the get operation node: <packet version="1.Supported Operations 576 If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows: <packet version="1.0"> <set> <log-rotation> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist</errtext> <filter-id>5</filter-id> </result> </set> <set> <result> <status>ok</status> <filter-id>8</filter-id> <id>17</id> </result> </set> <set> <result> <status>ok</status> <filter-id>8</filter-id> <id>29</id> </result> </set> </log-rotation> </packet> Retrieving Log Rotation Settings The get operation is used to change settings of Log Rotation.

5.0. and its graphical representation is as follows:  The filter node is required. For more information.xsd).com: <packet version="1. Add as many get operations as the number of different filtering rules. Remarks You can use different filtering rules in a single packet..Supported Operations 577 The get node is presented by type LogRotationGetInput (logrotation.xsd).0.0"> <log-rotation> <get> … </get> . refer to the Filtering Issues (on page 568) section. Specifies the filtering rule. <get> … </get> </log-rotation> </packet> Request Samples Retrieving settings of a single domain The following request packet retrieves Log Rotation settings of domain example.0"> <log-rotation> <get> <filter> <domain-name>example.5.. Data type: logRotationFilterType (logrotation.com</domain-name> </filter> </get> </log-rotation> </packet> . <packet version="1.

5.0"> <log-rotation> <get> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </get> </log-rotation> </packet> The following request packet retrieves Log Rotation settings of domain example.5.0.0"> <log-rotation> <get> <filter> <domain-id>6</domain-id> </filter> </get> <get> <filter> <domain-name>example.0"> <log-rotation> <get> <filter/> </get> </log-rotation> </packet> .Supported Operations 578 Retrieving settings of multiple domains The following request packet retrieves Log Rotation settings of domains used by the clients with ID 5 and ID 8: <packet version="1.com</domain-name> </filter> </get> </log-rotation> </packet> The following request packet retrieves Log Rotation settings of all domains available for packet sender: <packet version="1.0.com and the domain with ID 6: <packet version="1.5.0.

It returns the error message if the get operation fails. The errtext node is optional. Allowed values: ok | error. For more information. The id node is optional. Data type: resultFilterType (common. Data type: string.xsd).   . Data type: LogRotationSettingsType (logrotation. It returns the error code if the get operation fails. refer to the Log Rotation Settings (on page 568) section. It returns a filtering rule parameter. Data type:anySimple. It specifies the execution status of the get operation. Data type: unsignedInt.xsd). refer to the Filtering Issues (on page 568) section.xsd) and structured as follows:      The result node is required. Data type: integer. The status node is required. If the get operation succeeds. it holds the ID of the domain matched by the filtering rule. It warps the response retrieved from the server. It specifies Log Rotation settings. The settings node is optional. For details. Data type: string. The errcode node is optional.Supported Operations 579 Response Packet Structure The get node of the output XML packet is presented by type LogRotationGetOutput (logrotation. The filter-id node is required.

0.com</filter-id> </result> </get> </log-rotation> </packet> .com: <packet version="1.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.com</domain-name> </filter> </get> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0.0"> <log-rotation> <get> <result> <filter-id>example.5. the response from the server looks as follows: <packet version="1.Supported Operations 580 Response Samples Retrieving settings of a single domain The following request packet retrieves Log Rotation settings of domain example.com</filter-id> <id>33</id> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </result> </get> </log-rotation> </packet> If the domain was not found.5.0.0"> <log-rotation> <get> <filter> <domain-name>example.5.

the response looks as follows: <packet version="1.5.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist</errtext> <filter-id>5</filter-id> </result> </get> <get> <result> .0"> <log-rotation> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Access denied</errtext> <filter-id>example.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1034</errcode> <errtext>The domain is not hosted physically</errtext> <filter-id>example.5.5.0.0"> <log-rotation> <get> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </get> </log-rotation> </packet> If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows: <packet version="1. the response from the server looks as follows: <packet version="1.0.com</filter-id> </result> </get> </log-rotation> </packet> Retrieving settings of multiple domains The following request packet retrieves Log Rotation settings of domains used by the clients with ID 5 and ID 8: <packet version="1.5.0.Supported Operations 581 If a packet sender has no rights ot manage physical hosting.0.com</filter-id> </result> </get> </log-rotation> </packet> If the domain is not hosted physically.

Request Packet Structure A request XML packet enabling Log Rotation service includes the enable operation node: <packet version="1.5.0"> <log-rotation> <enable> … </enable> </log-rotation> </packet> .Supported Operations <status>ok</status> <filter-id>8</filter-id> <id>17</id> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </result> </get> <get> <result> <status>ok</status> <filter-id>8</filter-id> <id>29</id> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> <log-max-num-files>1</log-max-num-files> <log-compress>true</log-compress> </settings> </result> </get> </log-rotation> </packet> 582 Enabling Log Rotation Service Use the enable operation to enable Log Rotation service on domains.0.

Add as many enable operations as the number of different filtering rules.0. and its graphical representation is as follows:  The filter node is required. refer to the Filtering Issues (on page 568) section.com</domain-name> </filter> </enable> </log-rotation> </packet> Enabling Log Rotation service on multiple domain The following request packet enabes Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1. Data type: logRotationFilterType (logrotation.5.5. <enable> … </enable> </log-rotation> </packet> Request Samples Enabling Log Rotation service on a single domain The following request packet enables Log Rotation service on domain example. <packet version="1.0.com: <packet version="1.0..Supported Operations 583 The enable node is presented by type LogRotationEnableInput (logrotation.0"> <log-rotation> <enable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> . Remarks You can use different filtering rules in a single packet.0"> <log-rotation> <enable> <filter> <domain-name>example..5.xsd). For more information.0"> <log-rotation> <enable> … </enable> . Specifies the filtering rule.xsd).

0"> <log-rotation> <enable> <filter/> </enable> </log-rotation> </packet> Response Packet Structure The enable node of the output XML packet is presented by type LogRotationEnableOutput (logrotation.0.com</domain-name> </filter> </enable> </log-rotation> </packet> The following request packet enables Log Rotation service on all domains available for packet sender: <packet version="1.5.com and the domain with ID 6: <packet version="1.0"> <log-rotation> <enable> <filter> <domain-id>6</domain-id> </filter> </enable> <enable> <filter> <domain-name>example.xsd) and structured as follows: .5.Supported Operations </enable> </log-rotation> </packet> 584 The following request packet enables Log Rotation service on domain example.0.

It specifies the execution status of the enable operation.com</domain-name> </filter> </enable> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0.0. Data type: string. the response from the server looks as follows: <packet version="1. Data type:anySimple.5. It returns the error message if the enable operation fails. refer to the Filtering Issues (on page 568) section. It warps the response retrieved from the server. Data type: resultFilterType (common.com</filter-id> <id>33</id> </result> </enable> </log-rotation> </packet> If the domain was not found.0"> <log-rotation> <enable> <filter> <domain-name>example. Data type: integer.com: <packet version="1.0"> <log-rotation> <enable> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example. Data type: unsignedInt.5. it holds the ID of the domain matched by the filtering rule.0.com</filter-id> </result> </enable> </log-rotation> </packet> . If the enable operation succeeds. Data type: string. The status node is required. The errcode node is optional. The id node is optional. It returns the error code if the enable operation fails.xsd).0"> <log-rotation> <enable> <result> <status>ok</status> <filter-id>example. For more information.5. Allowed values: ok | error. The errtext node is optional.  Response Samples Enabling Log Rotation service on a single domain The following request packet enables Log Rotation service on domain example.Supported Operations 585      The result node is required. It returns a filtering rule parameter. The filter-id node is required.

0"> <log-rotation> <enable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </enable> </log-rotation> </packet> If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows: <packet version="1.0"> <enable> <log-rotation> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist</errtext> <filter-id>5</filter-id> </result> </enable> <enable> <result> <status>ok</status> <filter-id>8</filter-id> <id>17</id> </result> </enable> <enable> <result> <status>ok</status> <filter-id>8</filter-id> <id>29</id> </result> </enable> </log-rotation> </packet> .0.Supported Operations 586 Enabling Log Rotation service on multiple domains The following request packet enables Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1.5.0.5.

<packet version="1.Supported Operations 587 Disabling Log Rotation Service Use the disable operation to disable Log Rotation service on domains. Add as many disable operations as the number of different filtering rules.xsd). Request Packet Structure A request XML packet disabling Log Rotation service includes the disable operation node: <packet version="1.0"> <log-rotation> <disable> … </disable> . and its graphical representation is as follows:  The filter node is required.5.. refer to the Filtering Issues (on page 568) section. <disable> … </disable> </log-rotation> </packet> .xsd). Data type: logRotationFilterType (logrotation. Specifies the filtering rule.0.5.0"> <log-rotation> <disable> … </disable> </log-rotation> </packet> The disable node is presented by type LogRotationDisableInput (logrotation. Remarks You can use different filtering rules in a single packet. For more information..0.

5.com</domain-name> </filter> </disable> </log-rotation> </packet> Disabling Log Rotation service on multiple domain The following request packet disables Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1.0"> <log-rotation> <disable> <filter/> </disable> </log-rotation> </packet> .5.0"> <log-rotation> <disable> <filter> <domain-name>example.5.0.Supported Operations 588 Request Samples Disabling Log Rotation service on a single domain The following request packet disables Log Rotation service on domain example.com</domain-name> </filter> </disable> </log-rotation> </packet> The following request packet disables Log Rotation service on all domains available for packet sender: <packet version="1.com and the domain with ID 6: <packet version="1.0.com: <packet version="1.5.0"> <log-rotation> <disable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </disable> </log-rotation> </packet> The following request packet disables Log Rotation service on domain example.0"> <log-rotation> <disable> <filter> <domain-id>6</domain-id> </filter> </disable> <disable> <filter> <domain-name>example.0.0.

Allowed values: ok | error. For more information. It returns a filtering rule parameter. The errtext node is optional. Data type: anySimple. The id node is optional.xsd) and structured as follows:      The result node is required.  . It returns the error message if the disable operation fails. It specifies the execution status of the disable operation. The filter-id node is required. It warps the response retrieved from the server. it holds the ID of the domain matched by the filtering rule. Data type: string. Data type: unsignedInt. refer to the Filtering Issues (on page 568) section. It returns the error code if the disable operation fails. Data type: integer. Data type: string. Data type: resultFilterType (common. The status node is required.Supported Operations 589 Response Packet Structure The disable node of the output XML packet is presented by type LogRotationDisableOutput (logrotation. The errcode node is optional.xsd). If the disable operation succeeds.

0"> <log-rotation> <disable> <filter> <domain-name>example.0.0"> <log-rotation> <disable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </disable> </log-rotation> </packet> .0.com: <packet version="1.5.0. the response from the server looks as follows: <packet version="1.com</filter-id> </result> </disable> </log-rotation> </packet> Disabling Log Rotation service on multiple domains The following request packet disables Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1.com</domain-name> </filter> </disable> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0"> <log-rotation> <disable> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.0.5.Supported Operations 590 Response Samples Disabling Log Rotation service on a single domain The following request packet disables Log Rotation service on domain example.0"> <log-rotation> <disable> <result> <status>ok</status> <filter-id>example.5.com</filter-id> <id>33</id> </result> </disable> </log-rotation> </packet> If the domain was not found.5.

5.0"> <disable> <log-rotation> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist</errtext> <filter-id>5</filter-id> </result> </disable> <disable> <result> <status>ok</status> <filter-id>8</filter-id> <id>17</id> </result> </disable> <disable> <result> <status>ok</status> <filter-id>8</filter-id> <id>29</id> </result> </disable> </log-rotation> </packet> Checking Status of Log Rotation Service Use the get-status operation to retrieve status of Log Rotation service on domains.Supported Operations 591 If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows: <packet version="1. and its graphical representation is as follows: .5.0"> <log-rotation> <get-status> … </get-status> </log-rotation> </packet> The get-status node is presented by type LogRotationDisableInput (logrotation.xsd).0. Request Packet Structure A request XML packet retrieving status of Log Rotation service includes the get-status operation node: <packet version="1.0.

com: <packet version="1. Specifies the filtering rule.5. <get-status> … </get-status> </log-rotation> </packet> Request Samples Retrieving status of Log Rotation service on a single domain The following request packet retrieves status of Log Rotation service on domain example. <packet version="1.xsd).0.0"> <log-rotation> <get-status> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </get-status> </log-rotation> </packet> . Add as many get-status operations as the number of different filtering rules. Remarks You can use different filtering rules in a single packet..5..Supported Operations 592  The filter node is required.5. refer to the Filtering Issues (on page 568) section.0.0.0"> <log-rotation> <get-status> … </get-status . Data type: logRotationFilterType (logrotation.0"> <log-rotation> <get-status> <filter> <domain-name>example.com</domain-name> </filter> </get-status> </log-rotation> </packet> Retrieving status of Log Rotation service on multiple domain The following request packet retrieves status of Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1. For more information.

xsd) and structured as follows: .Supported Operations 593 The following request packet retrieves status of Log Rotation service on domain example.com and the domain with ID 6: <packet version="1.0"> <log-rotation> <get-status> <filter> <domain-id>6</domain-id> </filter> </get-status> <get-status> <filter> <domain-name>example.0"> <log-rotation> <get-status> <filter/> </get-status> </log-rotation> </packet> Response Packet Structure The get-status node of the output XML packet is presented by type LogRotationGetStatusOutput (logrotation.5.0.0.com</domain-name> </filter> </get-status> </log-rotation> </packet> The following request packet retrieves status of Log Rotation service on all domains available for packet sender: <packet version="1.5.

The errtext node is optional. refer to the Filtering Issues (on page 568) section.com</domain-name> </filter> </get-status> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1. The errcode node is optional.xsd). It returns the error message if the get-status operation fails. Data type: integer. For more information. The filter-id node is required.0"> <log-rotation> <get-status> <result> <status>ok</status> <filter-id>example. It specifies the execution status of the get-status operation.   Response Samples Retrieving status of Log Rotation service on a single domain The following request packet retrieves status of Log Rotation service on domain example. Data type:anySimple. Data type: string. The enabled node is optional. If the get-status operation succeeds. It warps the response retrieved from the server.5. Data type: resultFilterType (common. It returns a filtering rule parameter.0"> <log-rotation> <get-status> <filter> <domain-name>example.5.Supported Operations 594      The result node is required. Data type: string. Allowed values: ok | error. The id node is optional.com: <packet version="1. It returns the error code if the get-status operation fails.0.0. The status node is required.com</filter-id> <id>33</id> </result> </get-status> </log-rotation> </packet> . If the get-status operation succeeds it holds the ID of the domain matched by the filtering rule. Data type: unsignedInt. it holds status of the service on the domain. Data type: integer.

5.Supported Operations 595 If the domain was not found.5.0"> <log-rotation> <get-status> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.com</filter-id> </result> </get-status> </log-rotation> </packet> Retrieving status of Log Rotation service on multiple domains The following request packet retrieves status of Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1. the response from the server looks as follows: <packet version="1.0.5.0.0"> <get-status> <log-rotation> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist</errtext> <filter-id>5</filter-id> </result> </get-status> <get-status> <result> <status>ok</status> <filter-id>8</filter-id> <id>17</id> </result> </get-status> <get-status> <result> <status>ok</status> <filter-id>8</filter-id> <id>29</id> </result> </get-status> </log-rotation></packet> .0"> <log-rotation> <get-status> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </get-status> </log-rotation> </packet> If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows: <packet version="1.0.

The e-mail address that is used for messages delivery to subscribers looks as follows: name@domain. Before using the operator. Plesk Client Description The maillist operator is designed for managing mailing lists on domains. all messages from all mailing list owners of a specified domain will not be sent to subscribers. The mailing service (managing all mailing lists on a domain) can be activated or deactivated.Supported Operations 596 Managing Mailing Lists Operator: <maillist> XML Schema: maillist. .0 and higher Plesk user: Plesk Administrator. The name of the mailing list cannot be changed. Mailing lists are provided by the GNU Mailman software.xsd Plesk version: all versions API RPC version: 1. Each mailing list should have unique name parameter. the messages from mailing list owner will not be sent to subscribers. If it is deactivated. If it is disabled.4.2. Each mailing list can be enabled or disabled. make sure that the specified software is installed on your Plesk server.

Supported Operations 597 Supported operations            ADD-LIST (see page 600) adds a new mailing list to the specified domain DEL-LIST (see page 605) deletes mailing lists using filtering rules GET-LIST (see page 610) retrieves mailing lists name and status using filtering rules ADD-MEMBER (see page 614) adds a new subscriber to the specified mailing list GET-MEMBERS (see page 625) retrieves the subscribers of the specified mailing lists DEL-MEMBERS (see page 624) removes a subscriber from the specified mailing lists ENABLE (see page 629) activates the mailing list service on the specified domains DISABLE (see page 634) deactivates the mailing list service on the specified domains ENABLE-LIST (see page 640) activates the specified mailing lists DISABLE-LIST (see page 645) deactivates the specified mailing lists GET-STATUS (see page 649) retrieves the status of the mailing service on the specified domain .

Use this parameter to specify all mailing lists on the domain (specified by ID). Use this parameter to specify all mailing lists on the domain (specified by name). remove. Disabling Mailing List (see page 645) sections.xsd). The name node is required. Enabling Mailing List (see page 640). It specifies the mailing list ID in Plesk database. The graphical representation of the filter node is as follows:    The id node is required. get-list. It specifies the domain ID in Plesk database. It specifies the mailing list name. Data type:MaillistFilterType (maillist. For more information on the operations. Retrieving Mailing Lists (see page 614). Data type: integer. It specifies the domain name. Data type: integer. refer to the Removing Mailing List (see page 605). nested in the filter node are called filtering rule. MaillistFilterType The MaillistFilterType filter is used in del-list. The domain-id node is required. Parameters. Data type: string. enable-list. The request XML filters objects using a special <filter> section. enable or disable mailing lists. disable-list operations to retrieve.  . Data type: string.Supported Operations 598 Filtering Issues Filtering is the way the request XML packet indicates the object (one or several mailing lists or domains) to which an operation will be applied. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. A single operation can use only parameters of the same type in the filtering rule. The domain-name node is required.

name. MaillistSimpleFilterType The MaillistSimpleFilterType filter is used in add-member. domain-id.Supported Operations 599 You can match multiple mailing lists using this filter as in the following example: <filter> <domain-id>192</domain-id> <domain-id>19</domain-id> </filter> Note: Use either id. or remove mailing list subscribers. and del-member operations to add. and domain-name parameters in a single filter node will be considered invalid by Plesk server. A packet containing a combination of id. or domain-name parameters when creating a filtering rule. Data type: integer.xsd). The graphical representation of the filter node is as follows:    The list-id node is required. refer to the Adding Subscriber to Mailing List (see page 610). Data type: string. or list-name parameters when creating a filtering rule. You can match multiple mailing lists using this filter as in the following example: <filter> <list-id>1</list-id> <list-id>4</list-id> </filter> Note: Use either list-id. domain-id. It specifies the mailing list ID in Plesk database. Data type:MaillistSimpleFilterType (maillist. . Removing Subscriber (see page 624) sections. get-members. name. It specifies the mailing list name. The list-name node is required. A packet containing a combination of list-id and list-name parameters in a single filter node will be considered invalid by Plesk server. Retrieving Subscribers' Info (see page 625). For more information on the operations. retrieve.

refer to the Activating Mailing Lists Service (see page 629).xsd). Data type: anySimpleType. or domain-name parameters when creating a filtering rule. Data type: integer. Data type:MaillistToggleFilterType (maillist. It specifies the domain name. All operations except for the add-list possess the filter-id node in the response packet. it is returned in the filter-id node of the response packet.com</domain-name> </filter> Note: Use either domain-id. disable. For more information on the operations. A packet containing a combination of domain-id and domain-name parameters in a single filter node will be considered invalid by Plesk server. . deactivate. or retrieve status of a mailing list service on a specified domain. Deactivating Mailing Lists Service (see page 634). You can match multiple domains using this filter as in the following example: <filter> <domain-name>example. filter-id Node If an operation uses filters in a request packet.com</domain-name> <domain-name>mydomain.     mailing list ID mailing list name domain ID domain name It is done to trace the request parameters in case of error. Retrieving Status of Mailing List Service (see page 649) sections.Supported Operations 600 MaillistToggleFilterType The MaillistToggleFilterType filter is used in enable. and get-status operations to activate. The domain-name node is required. The graphical representation of the filter node is as follows:   The domain-id node is required. It returns the filtering rule parameter. Data type: string. It specifies the domain ID in Plesk database. the filter-id node is nested in a response packet. If one of the following values was set as a filter rule parameter.

0"> <maillist> <add-list> . Request Packet Structure A request XML packet adding a mailing list to Plesk database includes the add-list operation node: <packet version="1. The notify node is optional. The admin-email node is required..4. It specifies the name of the mailing list. Data type: integer. The password node is required. Data type: string. and its graphical representation is as follows:     The domain-id node is required. All information on the mailing list management is sent to this e-mail address.  . It specifies the domain ID in Plesk database. Data type: string. The name node is required. It specifies the mailing list administrator's password. It specifies the mailing list administrator's e-mail address.Supported Operations 601 Adding Mailing List Use the add-list operation to add a new mailing list.2. </add-list> </maillist> </packet> The add-list node is presented by the MaillistAddListInputType type (maillist.. Data type: string. Data type: boolean. Specifies if a notification of the mailing list creation will be sent to the administrator.xsd).

com</admin-email> </add-list> <add-list> <domain-id>45</domain-id> <name>SubscribeMe</name> <password>123456</password> <admin-email>admin@mydomain.2.com</admin-email> </add-list> </maillist> </packet> Adding multiple mailing lists This packet adds mailing lists MyMailer and SubscribeMe to the domain specified by ID 45. <packet version="1.0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain.4. <packet version="1. Add as many add-list operations as the number of mailing lists to be added.2. <add-list> … </add-list> … <add-list> … </add-list> Request Samples Adding a single mailing list This packet adds mailing list MyMailer to the domain specified by ID 45.com</admin-email> </add-list> </maillist> </packet> .0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain.Supported Operations 602 Remarks You can add multiple mailing lists in a single packet.4.

The errtext node is optional. Data type: ResultType (common.4. It returns the mailing list ID in Plesk database if the operation succeeds.xsd). Data type: integer. Is returns the error code if the add-list operation fails.xsd) and structured as follows:      The result node is required. Allowed values: ok | error. It returns the error message if the add-list operation fails. Data type: string.com</admin-email> </add-list> </maillist> </packet> . The status node is required. It warps the response retrieved from the server.2. The errcode node is optional. Data type: integer. It specifies the execution status of the add-list operation. The id node is optional.0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain.Supported Operations 603 Response Packet Structure The add-list node of the output XML packet is presented by type MaillistAddOutputType (maillist. Response Samples Adding a single mailing list This request packet adds mailing list MyMailer to the domain specified by ID 45. <packet version="1. Data type: string.

2. the response looks as follows: <packet version="1.0"> <maillist> <add-list> <result> <status>ok</status> <id>133</id> </result> </add-list> </maillist> </packet> If the Mailman software is not installed on the server.0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain.4.Supported Operations 604 A positive response from the server can look as follows: <packet version="1.4.2.0"> <maillist> <add-list> <result> <status>error</status> <errcode>1031</errcode> <errtext>Component is not configured on server</errtext> </result> </add-list> </maillist> </packet> Adding multiple mailing lists This request packet adds mailing lists MyMailer and SubscribeMe to the domain specified by ID 45.4.com</admin-email> </add-list> </maillist> </packet> . <packet version="1.2.com</admin-email> </add-list> <add-list> <domain-id>45</domain-id> <name>SubscribeMe</name> <password>123456</password> <admin-email>admin@mydomain.

4.xsd).0"> <maillist> <add-list> <result> <status>ok</status> <id>133</id> </result> </add-list> <add-list> <result> <status>ok</status> <id>134</id> </result> </add-list> </maillist> </packet> Removing Mailing List Use the del-list operation to remove mailing lists.2. For information on this filter.0"> <maillist> <del-list> . Request Packet Structure A request XML packet removing a mailing list from Plesk database includes the del-list operation node: <packet version="1. For information on filters. Data type: MaillistFilterType (maillist. refer to Filtering Issues (see page 601) section. refer to the Filtering Issues (see page 598) section.xsd). </del-list> </maillist> </packet> The del-list node is presented by the MaillistDelListInputType type (maillist.4.Supported Operations 605 A positive response from the server can look as follows: <packet version="1. or domain name.. ID.2. Use filters to specify mailing lists by name. . It specifies the filtering rule. and its graphical representation is as follows:  The filter node is required. domain ID..

2. <del-list> … </del-list> … <del-list> … </del-list> Request Samples Removing a single mailing list This packet removes mailing list MyMailer.2.com and My2domain.com</domain-name> <domain-name>My2domain. <packet version="1.0"> <maillist> <del-list> <filter> <domain-name>Mydomain.4.Supported Operations 606 Remarks You can remove mailing lists using different filtering rules in a single packet.com.0"> <maillist> <del-list> <filter> <name>MyMailer</name> <name>SubscribeMe</name> </filter> </del-list> </maillist> </packet> This packet removes all mailing lists from domains Mydomain.4.4. Add as many del-list operations as the number of different filtering rules to be applied. <packet version="1.com</domain-name> </filter> </del-list> </maillist> </packet> .2. <packet version="1.0"> <maillist> <del-list> <filter> <name>MyMailer</name> </filter> </del-list> </maillist> </packet> Removing multiple mailing lists This packet removes mailing lists MyMailer and SubscribeMe.

4. The errtext node is optional. Data type: string.xsd).Supported Operations 607 This packet removes all mailing lists from domain Mydomain. The status node is required. Is returns the error code if the del-list operation fails. It specifies the execution status of the del-list operation. It warps the response retrieved from the server. . Data type: string.com and the domain specified by ID 7.xsd) and structured as follows:      The result node is required.com</domain-name> </filter> </del-list> <del-list> <filter> <domain-id>7</domain-id> </filter> </del-list> </maillist> </packet> Response Packet Structure The del-list node of the output XML packet is presented by type MaillistDelOutputType (maillist.2. refer to the Filtering Issues (see page 600) section. The filter-id node is optional. Data type: integer. The errcode node is optional.0"> <maillist> <del-list> <filter> <domain-name>Mydomain. For information. Allowed values: ok | error. It holds the filtering rule parameter. Data type: ResultFilterType (common. <packet version="1. Data type: anySimpleType. It returns the error message if the del-list operation fails.

2. <packet version="1. the response is as follows: <packet version="1.4.2. It returns the mailing list ID in Plesk database if the operation succeeds.0"> <maillist> <del-list> <filter> <name>MyMailer</name> </filter> </del-list> </maillist> </packet> A positive response from the server can look as follows: <packet version="1. Data type: integer. Response Samples Removing a single mailing list This request packet removes mailing list MyMailer.4.Supported Operations 608  The id node is optional.2.0"> <maillist> <del-list> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>13</id> </result> </del-list> </maillist> </packet> If mailing list MyMailer was not found on the server.0"> <maillist> <del-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Maillist does not exist</errtext> <filter-id>MyMailer</filter-id> </result> </del-list> </maillist> </packet> .4.

com. <packet version="1.0"> <maillist> <del-list> <result> <status>ok</status> <filter-id>Mydomain.com</domain-name> </filter> </del-list> </maillist> </packet> If three mailing lists were removed from the server.Supported Operations 609 Removing multiple mailing lists This request packet removes all mailing lists from domain Mydomain. a server response can look as follows: <packet version="1.com</filter-id> <id>13</id> </result> <result> <status>ok</status> <filter-id>Mydomain.com</filter-id> <id>18</id> </result> <result> <status>ok</status> <filter-id>Mydomain.4.0"> <maillist> <del-list> <filter> <domain-name>Mydomain.com</filter-id> <id>23</id> </result> </del-list> </maillist> </packet> .4.2.2.

Data type: MaillistSimpleFilterType (maillist. <add-member> … </add-member> … <add-member> … </add-member> .xsd). It specifies the subscriber's e-mail address.Supported Operations 610 Adding Subscriber to Mailing List Use the add-member operation to add a new subscriber to a mailing list specified by name or ID. It specifies the filtering rule. and its graphical representation is as follows:  The filter node is required. The id node is required..  Remarks You can add multiple subscribers to a mailing list using different filtering rules in a single packet. </add-member> </maillist> </packet> The add-member node is presented by the MaillistAddMemberInputType type (maillist. For information on this filter. Data type: emailType (common.. Request Packet Structure A request XML packet adding a subscriber includes the add-member operation node: <packet version="1.2.xsd).xsd).0"> <maillist> <add-member> . refer to the Filtering Issues (see page 599) section. Add as many add-member operations as the number of different filtering rules to be applied.4. You can subscribe a person specified by id to multiple mailing lists in a single packet.

Supported Operations

611

Request Samples
Adding a subscriber

This packet adds the subscriber with e-mail address mymail@mydomain.com to mailing list MyMailer.

<packet version="1.4.2.0"> <maillist> <add-member> <filter> <list-name>MyMailer</list-name> </filter> <id>mymail@mydomain.com</id> </add-member> </maillist> </packet>

Adding multiple mailing lists This packet adds the subscriber with e-mail address mymail@mydomain.com to mailing lists MyMailer and SubscribeMe.

<packet version="1.4.2.0"> <maillist> <add-member> <filter> <list-name>MyMailer</list-name> <list-name>SubscribeMe</list-name> </filter> <id>mymail@mydomain.com</id> </add-member> </maillist> </packet>

Supported Operations

612

Response Packet Structure
The add-member node of the output XML packet is presented by type MaillistAddMemberOutputType (maillist.xsd) and structured as follows:

     

The result node is required. It warps the response retrieved from the server. Data type: MaillistMemberResultType (maillist.xsd). The status node is required. It specifies the execution status of the add-member operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is returns the error code if the add-member operation fails. Data type: integer. The errtext node is optional. It returns the error message if the add-member operation fails. Data type: string. The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Filtering Issues (see page 600) section. Data type: anySimpleType. The id node is optional. It returns the subscriber's e-mail address if the operation succeeds. Data type: emailType (common.xsd).

Supported Operations

613

Response Samples
Adding a subscriber This request packet adds the subscriber with e-mail address mymail@mydomain.com to mailing list MyMailer.
<packet version="1.4.2.0"> <maillist> <add-member> <filter> <list-name>MyMailer</list-name> </filter> <id>mymail@mydomain.com</id> </add-member> </maillist> </packet>

The positive response from the server looks as follows:
<packet version="1.4.2.0"> <maillist> <add-member> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>mymail@mydomain.com</id> </result> </add-member> </maillist> </packet>

If the mailing list was not found on the server, the response looks as follows:
<packet version="1.4.2.0"> <maillist> <add-member> <result> <status>error</status> <errcode>1015</errcode> <errtext>Mailing list does not exist</errtext> <filter-id>MyMailer</filter-id> </result> </add-member> </maillist> </packet>

Supported Operations

614

Adding subscribers to multiple mailing lists This request packet adds the subscriber with e-mail address mymail@mydomain.com to mailing lists MyMailer and SubscribeMe.
<packet version="1.4.2.0"> <maillist> <add-member> <filter> <list-name>MyMailer</list-name> <list-name>SubscribeMe</list-name> </filter> <id>mymail@mydomain.com</id> </add-member> </maillist> </packet>

The positive response looks as follows:
<packet version="1.4.2.0"> <maillist> <add-member> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>mymail@mydomain.com</id> </result> <result> <status>ok</status> <filter-id>SubscribeMe</filter-id> <id>mymail@mydomain.com</id> </result> </add-member> </maillist> </packet>

Retrieving Mailing Lists
Use the get-list operation to retrieve preferences of specified mailing lists. Use filters to specify mailing lists by name, ID, domain ID, or domain name. For information on filters, refer to the Filtering Issues (see page 601) section.

Request Packet Structure
A request XML packet retrieving a mailing list preferences includes the get-list operation node:
<packet version="1.4.2.0"> <maillist> <get-list> ... </get-list> </maillist> </packet>

Supported Operations

615

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 Filtering Issues (see page 598) section. Data type: MaillistFilterType (maillist.xsd).

Remarks 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.
<get-list> … </get-list> … <get-list> … </get-list>

Request Samples
Retrieving information on a single mailing list This packet retrieves preferences of the mailing list called MyMailer.
<packet version="1.4.2.0"> <maillist> <get-list> <filter> <name>MyMailer</name> </filter> </get-list> </maillist> </packet>

Retrieving information on multiple mailing lists This packet retrieves preferences of the mailing lists called MyMailer and SubscribeMe.
<packet version="1.4.2.0"> <maillist> <get-list> <filter> <name>MyMailer</name> <name>SubscribeMe</name> </filter> </get-list> </maillist> </packet>

Supported Operations

616

This packet retrieves preferences of all mailing lists on domains Mydomain.com and My2domain.com.

<packet version="1.4.2.0"> <maillist> <get-list> <filter> <domain-name>Mydomain.com</domain-name> <domain-name>My2domain.com</domain-name> </filter> </get-list> </maillist> </packet>

This packet retrieves preferences of all mailing lists on domain Mydomain.com and the domain specified by ID 7.

<packet version="1.4.2.0"> <maillist> <get-list> <filter> <domain-name>Mydomain.com</domain-name> </filter> </get-list> <get-list> <filter> <domain-id>7</domain-id> </filter> </get-list> </maillist> </packet>

Supported Operations

617

Response Packet Structure
The get-list node of the output XML packet is presented by type MaillistGetOutputType (maillist.xsd) and structured as follows:

       

The result node is required. It warps the response retrieved from the server. Data type: ResultFilterType (common.xsd). 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 Filtering Issues (see page 600) 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.

Supported Operations

618

Response Samples
Retrieving information on a single mailing list This request packet retrieves preferences of the mailing list called MyMailer.
<packet version="1.4.2.0"> <maillist> <get-list> <filter> <name>MyMailer</name> </filter> </get-list> </maillist> </packet>

A positive response from the server can look as follows:
<packet version="1.4.2.0"> <maillist> <get-list> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>2</id> <name>MyMailer</name> <list-status>false</list-status> </result> </get-list> </maillist> </packet>

If mailing list MyMailer was not found on the server, the response is as follows:
<packet version="1.4.2.0"> <maillist> <get-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Maillist does not exist</errtext> <filter-id>MyMailer</filter-id> </result> </get-list> </maillist> </packet>

Supported Operations

619

Retrieving information on multiple mailing lists This request packet retrieves preferences of all mailing lists on the domains with ID 1 and ID 21.
<packet version="1.4.2.0"> <maillist> <get-list> <filter> <domain-id>1</domain-id> <domain-id>21</domain-id> </filter> </get-list> </maillist> </packet>

If the domain with ID 21 was not found on the server, and the domain with ID 1 has two active mailing lists, a response from the server can look as follows:
<packet version="1.4.2.0"> <maillist> <get-list> <result> <status>ok</status> <filter-id>1</filter-id> <id>12</id> <name>MailerOne</name> <list-status>true</list-status> </result> <result> <status>ok</status> <filter-id>1</filter-id> <id>17</id> <name>MailerTwo</name> <list-status>true</list-status> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain does not exist</errtext> <filter-id>21</filter-id> </result> </get-list> </maillist> </packet>

Supported Operations

620

Retrieving Subscribers' Info
Use the get-members to retrieve e-mail addresses of people who were subscribed to a specified mailing list.

Request Packet Structure
A request XML packet retrieving info on subscribers of a mailing list includes the getmembers operation node:
<packet version="1.4.2.0"> <maillist> <get-members> ... </get-members> </maillist> </packet>

The get-members node is presented by the MaillistDelListInputType 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 Filtering Issues (see page 599) section. Data type: MaillistSimpleFilterType (maillist.xsd).

Remarks You can retrieve info on subscribers of multiple mailing lists using different filtering rules in a single packet. Add as many get-members operations as the number of different filtering rules to be applied.
<get-members> … </get-members> … <get-members> … </get-members>

Supported Operations

621

Request Samples
Retrieving information on subscribers of a single mailing list This packet retrieves info on subscribers of the mailing list called MyMailer.
<packet version="1.4.2.0"> <maillist> <get-members> <filter> <list-name>MyMailer</list-name> </filter> </get-members> </maillist> </packet>

Retrieving information on subscribers of multiple mailing lists This packet retrieves info on subscribers of the mailing lists called MyMailer and SubscribeMe.
<packet version="1.4.2.0"> <maillist> <get-members> <filter> <name>MyMailer</name> <name>SubscribeMe</name> </filter> </get-members> </maillist> </packet>

This packet retrieves info on subscribers of the mailing list specified by ID 14, and mailing lists called MyList and SubscriptionList.
<packet version="1.4.2.0"> <maillist> <get-members> <filter> <list-id>14</list-id> </filter> </get-members> <get-members> <filter> <list-name>MyList</list-name> <list-name>SubscriptionList</list-name> </filter> </get-members> </maillist> </packet>

Supported Operations

622

Response Packet Structure
The get-members node of the output XML packet is presented by type MaillistGetMemberOutputType (maillist.xsd) and structured as follows:

The result node is required. It warps the response retrieved from the server. Data type: GetMemberResultFilterType (maillist.xsd). The status node is required. It specifies the execution status of the get-members operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is returns the error code if the get-members operation fails. Data type: integer. The errtext node is optional. It returns the error message if the get-members operation fails. Data type: string. The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Filtering Issues (see page 600) section. Data type: anySimpleType. The id node is optional. It returns the subscriber's e-mail address if the operation succeeds. Data type: emailType (common.xsd).

Supported Operations

623

Response Samples
Retrieving information on subscribers of a single mailing list This request packet retrieves info on subscribers of the mailing list called MyMailer.
<packet version="1.4.2.0"> <maillist> <get-members> <filter> <list-name>MyMailer</list-name> </filter> </get-members> </maillist> </packet>

If two subscribers to MyMailer were found, a response from the server can look as follows:
<packet version="1.4.2.0"> <maillist> <get-members> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>mymail@mydomain.com</id> </result> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>subscr@mydomain.com</id> </result> </get-members> </maillist> </packet>

If the mailing list was not found on the server, the response looks as follows:
<packet version="1.4.2.0"> <maillist> <get-members> <result> <status>error</status> <errcode>1015</errcode> <errtext>Mailing list does not exist</errtext> <filter-id>MyMailer</filter-id> </result> </get-members> </maillist> </packet>

Supported Operations

624

Retrieving information on subscribers of multiple mailing lists This request packet retrieves info on subscribers of the mailing list specified by ID 14 and mailing lists called MyList and SubscriptionList.
<packet version="1.4.2.0"> <maillist> <get-members> <filter> <list-id>14</list-id> </filter> </get-members> <get-members> <filter> <list-name>MyList</list-name> <list-name>SubscriptionList</list-name> </filter> </get-members> </maillist> </packet>

If each of MyList and SubscriptionList mailing lists have one subscriber, and the mailing list with ID 14 was not found on the server, a response can look as follows:
<packet version="1.4.2.0"> <maillist> <get-members> <result> <status>error</status> <errcode>1015</errcode> <errtext>Mailing list does not exist</errtext> <filter-id>MyMailer</filter-id> </result> </get-members> <get-members> <result> <status>ok</status> <filter-id>MyList</filter-id> <id>mymail@mydomain.com</id> </result> <result> <status>ok</status> <filter-id>SubscriptionList</filter-id> <id>subscr@mydomain.com</id> </result> </get-members> </maillist> </packet>

Supported Operations

625

Removing Subscriber
Use the del-member to remove a subscriber from specified mailing lists.

Request Packet Structure
A request XML packet removing a subscriber from the specified mailing lists includes the del-member operation node:
<packet version="1.4.2.0"> <maillist> <del-member> ... </del-member> </maillist> </packet>

The add-member node is presented by the MaillistAddMemberInputType type (maillist.xsd), and its graphical representation is as follows:

The filter node is required. It specifies the filtering rule. You can remove a person specified by id from multiple mailing lists in a single packet. For information on this filter, refer to the Filtering Issues (see page 599) section. Data type: MaillistSimpleFilterType (maillist.xsd). The id node is required. It specifies the subscriber's e-mail address. Data type: emailType (common.xsd).

Remarks You can delete a subscriber from multiple mailing lists using different filtering rules in a single packet. Add as many del-member operations as the number of different filtering rules to be applied.
<del-member> … </del-member> … <del-member> … </del-member>

Supported Operations

626

Request Samples
Removing a subscriber from a single mailing list

This packet removes the subscriber with e-mail address mymail@mydomain.com from mailing list MyMailer.

<packet version="1.4.2.0"> <maillist> <del-member> <filter> <list-name>MyMailer</list-name> </filter> <id>mymail@mydomain.com</id> </del-member> </maillist> </packet>

Removing a subscriber from multiple mailing lists

This packet removes the subscriber with e-mail address mymail@mydomain.com from mailing lists MyMailer and SubscribeMe.

<packet version="1.4.2.0"> <maillist> <del-member> <filter> <list-name>MyMailer</list-name> <list-name>SubscribeMe</list-name> </filter> <id>mymail@mydomain.com</id> </del-member> </maillist> </packet>

Supported Operations

627

Response Packet Structure
The del-member node of the output XML packet is presented by type MaillistGetMemberOutputType (maillist.xsd) and structured as follows:

     

The result node is required. It warps the response retrieved from the server. Data type: GetMemberResultFilterType (maillist.xsd). The status node is required. It specifies the execution status of the del-member operation. Data type: string. Allowed values: ok | error. The errcode node is optional. Is returns the error code if the del-member operation fails. Data type: integer. The errtext node is optional. It returns the error message if the del-member operation fails. Data type: string. The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Filtering Issues (see page 600) section. Data type: anySimpleType. The id node is optional. It returns the subscriber's e-mail address if the operation succeeds. Data type: emailType (common.xsd).

Supported Operations

628

Response Samples
Removing a subscriber from a single mailing list This request packet removes the subscriber with e-mail address mymail@mydomain.com from mailing list MyMailer.
<packet version="1.4.2.0"> <maillist> <del-member> <filter> <list-name>MyMailer</list-name> </filter> <id>mymail@mydomain.com</id> </del-member> </maillist> </packet>

The positive response from the server looks as follows:
<packet version="1.4.2.0"> <maillist> <del-member> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>mymail@mydomain.com</id> </result> <result> </del-member> </maillist> </packet>

If the subscriber was not subscribed to MyMailer, the response looks as follows:
<packet version="1.4.2.0"> <maillist> <get-members> <result> <status>error</status> <errcode>1023</errcode> <errtext>Member is not subscribed to mailing list</errtext> <filter-id>MyMailer</filter-id> </result> </get-members> </maillist> </packet>

Supported Operations

629

Removing a subscriber from multiple mailing lists This request packet removes the subscriber with e-mail address mymail@mydomain.com from mailing lists MyMailer and SubscribeMe.
<packet version="1.4.2.0"> <maillist> <del-member> <filter> <list-name>MyMailer</list-name> <list-name>SubscribeMe</list-name> </filter> <id>mymail@mydomain.com</id> </del-member> </maillist> </packet>

The positive response from the server looks as follows:
<packet version="1.4.2.0"> <maillist> <del-member> <result> <status>ok</status> <filter-id>MyMailer</filter-id> <id>mymail@mydomain.com</id> </result> <result> <status>ok</status> <filter-id>SubscribeMe</filter-id> <id>mymail@mydomain.com</id> </result> </del-member> </maillist> </packet>

Activating Mailing Lists Service
Use the enable operation to activate mailing lists service on a specified domain.

Request Packet Structure
A request XML packet activating a mailing lists service includes the enable operation node:
<packet version="1.4.2.0"> <maillist> <enable> ... </enable> </maillist> </packet>

Supported Operations

630

The enable node is presented by the MaillistEnableInputType 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 Filtering Issues (see page 600) section. Data type: MaillistToggleFilterType (maillist.xsd). The domain-id node is required. It specifies the ID of the domain address, on which the mailing service is to be enabled. Data type: integer. The domain-name node is required. It specifies the name of the domain address, on which the mailing service is to be enabled. Data type: integer.

 

Remarks You can activate mailing lists service on multiple domains using different filtering rules in a single packet. Add as many enable operations as the number of different filtering rules to be applied.
<enable> … </enable> … <enable> … </enable>

Request Samples
Activating mailing lists service on a single domain This packet activates the mailing lists service on the domain called Mydomain.com.
<packet version="1.4.2.0"> <maillist> <enable> <filter> <domain-name>Mydomain.com</domain-name> </filter> </enable> </maillist> </packet>

<packet version="1. <packet version="1.com and My2domain.4.2.com domains.Supported Operations 631 Activating mailing lists service on multiple domains This packet activates mailing lists service on Mydomain.4.0"> <maillist> <enable> <filter> <domain-name>Mydomain.com and My2domain.com domains.2.com</domain-name> </filter> </enable> </maillist> </packet> This packet activates mailing lists service on Mydomain.com</domain-name> </filter> </enable> <enable> <filter> <domain-id>6</domain-id> </filter> </enable> </maillist> </packet> .com</domain-name> <domain-name>My2domain.com</domain-name> <domain-name>My2domain.0"> <maillist> <enable> <filter> <domain-name>Mydomain. and on the domain specified by ID 6.

Data type: string. The errcode node is optional. Is returns the error code if the enable operation fails. It warps the response retrieved from the server.xsd). For information.xsd) and structured as follows:  The result node is required. Data type: string. Data type: anySimpleType. The errtext node is optional. Data type: integer. Data type: integer. This node does not contain any data for this operation. It returns the error message if the enable operation fails. Allowed values: ok | error. Data type: resultFilterType (common. It specifies the execution status of the enable operation.      . refer to the Filtering Issues (see page 600) section. The id node is optional. It holds the filtering rule parameter. The status node is required.Supported Operations 632 Response Packet Structure The enable node of the output XML packet is presented by type MaillistEnableOutputType (maillist. The filter-id node is optional.

com</domain-name> </filter> </enable> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.0"> <maillist> <enable> <result> <status>ok</status> <filter-id>Mydomain.4. <packet version="1.com</filter-id> </result> </enable> </maillist> </packet> .2.2.4.2.4.com.com</filter-id> </result> </enable> </maillist> </packet> If the domain was not found on the server.0"> <maillist> <enable> <filter> <domain-name>Mydomain.Supported Operations 633 Response Samples Activating mailing lists service on a single domain This request packet activates the mailing lists service on the domain called Mydomain.0"> <maillist> <enable> <result> <status>error</status> <status>1015</status> <status>Domain does not exist</status> <filter-id>Mydomain. the result looks as follows: <packet version="1.

com</filter-id> </result> <result> <status>ok</status> <filter-id>My2domain. and on the domain specified by ID 5.2.com.com</domain-name> <domain-name>My2domain.com.com</filter-id> </result> </enable> <enable> <result> <status>ok</status> <filter-id>5</filter-id> </result> </enable> </maillist> </packet> .com</domain-name> </filter> </enable> <enable> <filter> <domain-id>5</domain-id> </filter> </enable> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.4. My2domain.0"> <maillist> <enable> <result> <status>ok</status> <filter-id>Mydomain.0"> <maillist> <enable> <filter> <domain-name>Mydomain.Supported Operations 634 Enabling mailing lists service on multiple domains This request packet activates mailing lists service on the domains Mydomain.2. <packet version="1.4.

The domain-name node is required. For information on this filter. on which the mailing service is to be disabled.0"> <maillist> <disable> .Supported Operations 635 Deactivating Mailing Lists Service Use the disable operation to deactivate mailing lists service on a specified domain. It specifies the ID of the domain address. It specifies the name of the domain address.   Remarks You can deactivate mailing lists service on multiple domains using different filtering rules in a single packet.xsd).xsd).4. Request Packet Structure A request XML packet deactivating a mailing lists service includes the disable operation node: <packet version="1. Data type: MaillistToggleFilterType (maillist... refer to the Filtering Issues (see page 600) section. on which the mailing service is to be disabled. </disable> </maillist> </packet> The disable node is presented by the MaillistDisableInputType type (maillist. <disable> … </disable> … <disable> … </disable> . The domain-id node is required. Add as many disable operations as the number of different filtering rules to be applied. and its graphical representation is as follows:  The filter node is required. It specifies the filtering rule. Data type: integer. Data type: integer.2.

com</domain-name> </filter> </disable> <disable> <filter> <domain-id>6</domain-id> </filter> </disable> </maillist> </packet> .com domains.com</domain-name> </filter> </disable> </maillist> </packet> Deactivating mailing lists service on multiple domains This packet deactivates mailing lists service on Mydomain. <packet version="1.0"> <maillist> <disable> <filter> <domain-name>Mydomain.com domains.com and My2domain. <packet version="1.0"> <maillist> <disable> <filter> <domain-name>Mydomain.0"> <maillist> <disable> <filter> <domain-name>Mydomain.com</domain-name> <domain-name>My2domain. <packet version="1.com</domain-name> </filter> </disable> </maillist> </packet> This packet deactivates mailing lists service on Mydomain.Supported Operations 636 Request Samples Deactivating mailing lists service on a single domain This packet deactivates the mailing lists service on the domain called Mydomain.4.4.com</domain-name> <domain-name>My2domain.com and My2domain.4.2.2.2.com. and on the domain specified by ID 6.

For information. Data type: resultFilterType (common. Data type: string. The status node is required. Data type: integer.      . The filter-id node is optional. Is returns the error code if the disable operation fails. refer to the Filtering Issues (see page 600) section. This node does not contain any data for this operation. It warps the response retrieved from the server. The id node is optional. It specifies the execution status of the disable operation.xsd). It holds the filtering rule parameter. Allowed values: ok | error.Supported Operations 637 Response Packet Structure The disable node of the output XML packet is presented by type MaillistDisableOutputType (maillist. The errcode node is optional. Data type: string. It returns the error message if the disable operation fails. The errtext node is optional. Data type: integer.xsd) and structured as follows:  The result node is required. Data type: anySimpleType.

2.2.Supported Operations 638 Response Samples Deactivating mailing lists service on a single domain This request packet deactivates the mailing lists service on the domain called Mydomain.0"> <maillist> <disable> <result> <status>error</status> <status>1015</status> <status>Domain does not exist</status> <filter-id>Mydomain.com</filter-id> </result> </disable> </maillist> </packet> If the domain was not found on the server.com</domain-name> </filter> </disable> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.4.com.0"> <maillist> <disable> <filter> <domain-name>Mydomain.4. the result looks as follows: <packet version="1.4.com</filter-id> </result> </disable> </maillist> </packet> .2. <packet version="1.0"> <maillist> <disable> <result> <status>ok</status> <filter-id>Mydomain.

4.4.com</filter-id> </result> </disable> <disable> <result> <status>ok</status> <filter-id>5</filter-id> </result> </disable> </maillist> </packet> .2. and on the domain specified by ID 5.0"> <maillist> <disable> <filter> <domain-name>Mydomain.com</domain-name> <domain-name>My2domain.com</domain-name> </filter> </disable> <disable> <filter> <domain-id>5</domain-id> </filter> </disable> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.Supported Operations 639 Deactivating mailing lists service on multiple domains This request packet deactivates mailing list service on the domains Mydomain.com.com</filter-id> </result> <result> <status>ok</status> <filter-id>My2domain. My2domain. <packet version="1.0"> <maillist> <disable> <result> <status>ok</status> <filter-id>Mydomain.2.com.

Supported Operations 640 Enabling Mailing List Use the enable-list operation to enable mailing lists specified by name. ID. It specifies the filtering rule. Request Packet Structure A request XML packet enabling mailing lists includes the enable-list operation node: <packet version="1. Remarks You can enable multiple mailing lists using different filtering rules in a single packet. and its graphical representation is as follows:  The filter node is required.4. </enable-list> </maillist> </packet> The enable-list node is presented by the MaillistEnableListInputType type (maillist.xsd). refer to the Filtering Issues (see page 598) section.0"> <maillist> <enable-list> .xsd).. or domain ID.2. Data type: MaillistFilterType (maillist. <enable-list> … </enable-list> … <enable-list> … </enable-list> . domain name. For information on this filter. Add as many enable-list operations as the number of different filtering rules to be applied..

com domains.com and My2domain.4.2.2.com</domain-name> </filter> </enable-list> </maillist> </packet> This packet enables mailing lists on Mydomain.0"> <maillist> <enable-list> <filter> <domain-name>Mydomain.0"> <maillist> <enable-list> <filter> <domain-name>Mydomain.4. <packet version="1. and on the domain specified by ID 6.0"> <maillist> <enable-list> <filter> <name>Mylist</name> </filter> </enable-list> </maillist> </packet> Enabling multiple mailing lists This packet enables mailing lists on Mydomain.Supported Operations 641 Request Samples Enabling a single mailing list This packet enables mailing list Mylist.com domain. <packet version="1.4.com</domain-name> </filter> </enable-list> <enable-list> <filter> <domain-id>6</domain-id> </filter> </enable-list> </maillist> </packet> .2.com</domain-name> <domain-name>My2domain. <packet version="1.

Data type: string. It returns ID of the mailing list if the operation succeeds. refer to the Filtering Issues (see page 600) section. It returns the error message if the enable-list operation fails. For information. The id node is optional. Data type: anySimpleType.xsd) and structured as follows:  The result node is required. Data type: integer. The status node is required. Data type: integer.Supported Operations 642 Response Packet Structure The enable-list node of the output XML packet is presented by type MaillistEnableListOutputType (maillist. It specifies the execution status of the enable-list operation. It warps the response retrieved from the server. Data type: resultFilterType (common. The errtext node is optional. The errcode node is optional. Allowed values: ok | error.      . The filter-id node is optional.xsd). Data type: string. It holds the filtering rule parameter. Is returns the error code if the enable-list operation fails.

Supported Operations 643 Response Samples Enabling a single mailing list This request packet enables mailing list Mylist.0"> <maillist> <enable-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Mailing list does not exist</errtext> <filter-id>Mylist</filter-id> </result> </enable-list> </maillist> </packet> . the response looks as follows: <packet version="1.0"> <maillist> <enable-list> <filter> <name>Mylist</name> </filter> </enable-list> </maillist> </packet> A positive response from the server can look as follows: <packet version="1. <packet version="1.4.2.2.0"> <maillist> <enable-list> <result> <status>ok</status> <filter-id>Mylist</filter-id> <id>5</id> </result> </enable-list> </maillist> </packet> If the mailing list was not found on the server.4.4.2.

com</filter-id> </result> </enable-list> <enable-list> <result> <status>ok</status> <filter-id>6</filter-id> <id>7</id> </result> </enable-list> </maillist> </packet> .com domain contains two mailing lists (specified by ID 1 and ID 2). the response looks as follows: <packet version="1.4.com domain was not found.0"> <maillist> <enable-list> <result> <status>ok</status> <filter-id>Mydomain.com and My2domain.com</domain-name> <domain-name>My2domain.com domains.4.0"> <maillist> <enable-list> <filter> <domain-name>Mydomain.2.com</filter-id> <id>1</id> </result> <result> <status>ok</status> <filter-id>Mydomain.2.com</filter-id> <id>2</id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>My2domain. Mydomain. the domain with ID 6 contains one mailing list (specified by ID 7).com</domain-name> </filter> </enable-list> <enable-list> <filter> <domain-id>6</domain-id> </filter> </enable-list> </maillist> </packet> If My2domain.Supported Operations 644 Enabling multiple mailing lists This request packet enables mailing lists on Mydomain. <packet version="1. and on the domain specified by ID 6.

Add as many disable-list operations as the number of different filtering rules to be applied. <disable-list> … </disable-list> … <disable-list> … </disable-list> . </disable-list> </maillist> </packet> The disable-list node is presented by the MaillistDisableListInputType type (maillist. Data type: MaillistFilterType (maillist.. or domain ID.xsd).2.4. and its graphical representation is as follows:  The filter node is required..Supported Operations 645 Disabling Mailing List Use the disable-list operation to disable mailing lists specified by name. ID. domain name. Request Packet Structure A request XML packet disabling mailing lists includes the disable-list operation node: <packet version="1.0"> <maillist> <disable-list> . For information on this filter. refer to the Filtering Issues (see page 598) section.xsd). Remarks You can disable multiple mailing lists using different filtering rules in a single packet. It specifies the filtering rule.

Supported Operations 646 Request Samples Disabling a single mailing list This packet disables mailing list Mylist. <packet version="1.4.com domain.0"> <maillist> <disable-list> <filter> <name>Mylist</name> </filter> </disable-list> </maillist> </packet> Disabling multiple mailing lists This packet disables mailing lists on Mydomain.4.com domains.2.2.2.0"> <maillist> <disable-list> <filter> <domain-name>Mydomain.4. and on the domain specified by ID 6.0"> <maillist> <disable-list> <filter> <domain-name>Mydomain.com</domain-name> </filter> </enable-list> <enable-list> <filter> <domain-id>6</domain-id> </filter> </disable-list> </maillist> </packet> .com</domain-name> </filter> </disable-list> </maillist> </packet> This packet disables mailing lists on Mydomain.com and My2domain. <packet version="1. <packet version="1.com</domain-name> <domain-name>My2domain.

Allowed values: ok | error. Data type: integer. It holds the filtering rule parameter. The id node is optional. Data type: resultFilterType (common. Data type: anySimpleType. It warps the response retrieved from the server. Is returns the error code if the disable-list operation fails.Supported Operations 647 Response Packet Structure The disable-list node of the output XML packet is presented by type MaillistEnableListOutputType (maillist. For information. refer to the Filtering Issues (see page 600) section. .xsd) and structured as follows:       The result node is required. This node does not contain any data for this operation. The status node is required. It specifies the execution status of the disable-list operation. Data type: integer. The errtext node is optional. Data type: string.xsd). The errcode node is optional. Data type: string. It returns the error message if the disable-list operation fails. The filter-id node is optional.

<packet version="1.0"> <maillist> <disable-list> <filter> <name>Mylist</name> </filter> </disable-list> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.0"> <maillist> <disable-list> <result> <status>ok</status> <filter-id>Mylist</filter-id> </result> </disable-list> </maillist> </packet> If the mailing list was not found on the server.4. the response looks as follows: <packet version="1.Supported Operations 648 Response Samples Disabling a single mailing list This request packet disables mailing list Mylist.4.2.0"> <maillist> <disable-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Mailing list does not exist</errtext> <filter-id>Mylist</filter-id> </result> </disable-list> </maillist> </packet> .4.2.2.

com domains.com domain contains two mailing lists.com domain was not found.Supported Operations 649 Disabling multiple mailing lists This request packet disables mailing lists on Mydomain. the domain with ID 6 contains one mailing list. <packet version="1.0"> <maillist> <disable-list> <filter> <domain-name>Mydomain.com</filter-id> </result> </disable-list> <disable-list> <result> <status>ok</status> <filter-id>6</filter-id> </result> </disable-list> </maillist> </packet> .4.2.com and My2domain.2. and on the domain specified by ID 6.com</filter-id> </result> <result> <status>ok</status> <filter-id>Mydomain. Mydomain. the response looks as follows: <packet version="1.com</domain-name> </filter> </disable-list> <disable-list> <filter> <domain-id>6</domain-id> </filter> </disable-list> </maillist> </packet> If My2domain.0"> <maillist> <disable-list> <result> <status>ok</status> <filter-id>Mydomain.com</filter-id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>My2domain.com</domain-name> <domain-name>My2domain.4.

Data type: MaillistToggleFilterType (maillist. and its graphical representation is as follows:  The filter node is required. Add as many get-status operations as the number of different filtering rules to be applied. <get-status> … </get-status> … <get-status> … </get-status> ... Request Packet Structure A request XML packet retrieving status of a mailing lists service includes the get-status operation node: <packet version="1. refer to the Filtering Issues (see page 598) section.xsd).4. It specifies the filtering rule. Remarks You can retrieve status of mailing lists service on multiple domains using different filtering rules in a single packet. For information on this filter.Supported Operations 650 Retrieving Status Of Mailing Lists Service Use the get-status operation to retrieve status of mailing list service on a specified domain.0"> <maillist> <get-status> .2. </get-status> </maillist> </packet> The get-status node is presented by the MaillistGetStatusInputType type (maillist.xsd).

com. <packet version="1.0"> <maillist> <get-status> <filter> <domain-name>Mydomain.2.Supported Operations 651 Request Samples Retrieving status of mailing lists service on a single domain This packet retrieves status of the mailing lists service on the domain called Mydomain.com</domain-name> <domain-name>My2domain.2.com and My2domain. and on the domain specified by ID 6.com</domain-name> <domain-name>My2domain. <packet version="1.com</domain-name> </filter> </get-status> <get-status> <filter> <domain-id>6</domain-id> </filter> </get-status> </maillist> </packet> .com domains.4.com and My2domain. <packet version="1.0"> <maillist> <get-status> <filter> <domain-name>Mydomain.0"> <maillist> <get-status> <filter> <domain-name>Mydomain.com domains.4.4.2.com</domain-name> </filter> </get-status> </maillist> </packet> Retrieving status of mailing lists service on multiple domains This packet retrieves status of mailing lists service on Mydomain.com</domain-name> </filter> </get-status> </maillist></packet> This packet retrieves status of mailing lists service on Mydomain.

. For information. The service-status node is optional. Data type: integer. It holds the filtering rule parameter. It specifies the execution status of the get-status operation.xsd). The errcode node is optional. It specifies if the mailing lists service is activated or deactivated. Data type: resultFilterType (common. Data type: anySimpleType. The errtext node is optional. The status node is required. Data type: string. Data type: boolean. The filter-id node is optional. Is returns the error code if the get-status operation fails. This node does not contain any data for this operation. It returns the error message if the get-statuse operation fails.xsd) and structured as follows:        The result node is required. It warps the response retrieved from the server. refer to the Filtering Issues (see page 600) section. Data type: integer. The id node is optional. Allowed values: ok | error. Data type: string.Supported Operations 652 Response Packet Structure The get-status node of the output XML packet is presented by type MaillistGetStatusOutputType (maillist.

com</filter-id> <service-status>true</service-status> </result> </get-status> </maillist> </packet> .4.2.Supported Operations 653 Response Samples Retrieving status of mailing lists service on a single domain This request packet retrieves status of the mailing lists service on the domain called Mydomain.com</domain-name> </filter> </get-status> </maillist> </packet> If the domain contains two mailing lists. a positive response from the server can look as follows: <packet version="1. <packet version="1.com.0"> <maillist> <get-status> <filter> <domain-name>Mydomain.2.0"> <maillist> <get-status> <result> <status>ok</status> <filter-id>Mydomain.4.

4.com</domain-name> <domain-name>My2domain.0"> <maillist> <get-status> <result> <status>error</status> <status>1015</status> <status>Domain does not exist</status> <filter-id>Mydomain. and on the domain specified by ID 5.com</filter-id> <service-status>false</service-status> </result> <result> <status>ok</status> <filter-id>My2domain.0"> <maillist> <get-status> <result> <status>ok</status> <filter-id>Mydomain.4.0"> <maillist> <get-status> <filter> <domain-name>Mydomain.Supported Operations 654 If the domain was not found on the server.2.2.com</domain-name> </filter> </get-status> <get-status> <filter> <domain-id>5</domain-id> </filter> </get-status> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.com. My2domain.com.4. the result looks as follows: <packet version="1.2.com</filter-id> </result> </get-status> </maillist> </packet> Retrieving status of mailing lists service on multiple domains This request packet retrieves status of mailing list service on the domains Mydomain.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> . <packet version="1.

2 API RPC version: 1. Protocols other than FTP are not supported in current realization. Process that creates backups is called backup process.Supported Operations 655 Managing Plesk Backups Operator: <backup-manager> XML Schema: backup.5. Backups are created in asynchronous mode.0 Plesk user: Plesk Administrator. One backup may be divided into two or more files.1. Plesk client Description Backup is a copy of data that may be used to restore the original after a data loss. Supported operations .xsd Plesk version: 8. you can manage backups of client and domain accounts by the backupmanager operator. In Plesk API RPC. You can use Plesk repository (local storage) or remote FTP servers to store backup files.

storage host. port or other parameters. Plesk users should specify settings of a remote storage. Data type: string. It specifies the hostname of a storage. Data type: BackupRemoteStorage (backup.Supported Operations 656             GET-REMOTE-STORAGE-SETTINGS (on page 657) retrieves settings of a remote FTP storage SET-REMOTE-STORAGE-SETTINGS (on page 661) changes settings of a remote FTP storage BACKUP-DOMAIN (on page 664) creates a backup of a specified domain account BACKUP-CLIENT (on page 668) creates a backup of one or more domain accounts held by a specified client GET-BACKUP-STATUS (on page 672) retrieves the status of the backup process for a specified domain or client account GET-LOCAL-BACKUP-LIST (on page 676) retrieves a list of backups stored in the local repository PUT-FILE (on page 680) moves backups from a temporary directory on Plesk server to the client's or domain administrator's repository DOWNLOAD-FILE (on page 683) downloads a backup from the server GET-SUPPORTED-PROTOCOL (on page 686) retrieves protocols supported by the backup-manager operator STOP-BACKUP (on page 687) stops the backup process for a specified domain or client accounts GET-BACKUP-PROCESSES (on page 690) retrieves a list of backup processes REMOVE-FILE (on page 693) removes a specified backup from a repository Remote Storage Settings To store backups on remote servers. Data type: string.xsd). It has the following graphical representation:   The protocol node is required. The host node is optional. It specifies the protocol name. Remote storage settings are presented by the settings node. . The settings include communication protocol between Plesk and the storage.

It specifies the password to the storage. The client-id node is optional. and its graphical representation is as follows:      The domain-id node is optional. It specifies the client login.5.Supported Operations 657     The port node is optional. Data type: string. The protocol node is required.1. Data type: string. It specifies the directory that stores backups.xsd). The password node is optional. It specifies the client ID. Data type: string. . Data type: integer. Note: The nodes except for the protocol stay blank until user specifies the settings. Allowed values: ftp. It specifies the domain name. It specifies the protocol for which the settings are retrieved. Data type: string. Data type: integer.0"> <backup-manager> <get-remote-storage-settings> . It specifies the login to the storage. Request Packet Structure A request XML packet retrieving remote storage settings includes the get-remote-storagesettings operation node: <packet version="1. Data type: integer. Data type:string.. The domain-name node is optional. The login node is optional. It specifies the domain ID. Data type: string. It specifies the port of the storage. The client-login node is optional. The directory node is optional. </get-remote-storage-settings> </backup-manager> </packet> The get-remote-storage-settings node is presented by type BackupGetRemoteStorageSettingsInput (backup. Retrieving Remote Storage Settings Use the get-remote-storage-settings operation to retrieve settings of a remote FTP storage defined by a domain administrator or client..

<packet version="1.0"> <backup-manager> <get-remote-storage-settings> <protocol>ftp</protocol> </get-remote-storage-settings> </backup-manager> </packet> This request packet retrieves remote storage settings for the domain account with ID 7.1. <packet version="1.5.0"> <backup-manager> <get-remote-storage-settings> <domain-id>7</domain-id> <protocol>ftp</protocol> </get-remote-storage-settings> </backup-manager> </packet> . <packet version="1.5. Plesk client may specify only a protocol name.Supported Operations 658 Remarks You can retrieve the settings for a domain or client accounts. Plesk users should specify the domain ID or name.1.0"> <backup-manager> <get-remote-storage-settings> <client-id>17</client-id> <protocol>ftp</protocol> </get-remote-storage-settings> </backup-manager> </packet> This request packet retrieves remote storage settings for your client account if you are authenticated to Plesk API RPC as Plesk client.1.5. To retrieve remote storage settings for a domain account. Request Samples This request packet retrieves remote storage settings for the client account with ID 17.   To retrieve remote storage settings for a client account. Plesk Administrator should specify the client login or ID.

5. Data type: resultType (common.0"> <backup-manager> <get-remote-storage-settings> <client-id>17</client-id> <protocol>ftp</protocol> </get-remote-storage-settings> </backup-manager> </packet> . Data type: integer. The errcode node is optional. Data type: BackupRemoteStorage (backup.xsd) and structured as follows:      The result node is required. Is returns the error code if the operation fails.xsd). Data type: string.Supported Operations 659 Response Packet Structure The get-remote-storage-settings node of the output XML packet is presented by type BackupGetRemoteStorageSettingsOutput (backup. It returns the error message if the operation fails.1. The settings node is optional. For details on the node. The errtext node is optional. The status node is required. refer to the Remote Storage Settings (on page 656) section. <packet version="1. It specifies settings of a remote storage if the operation succeeds.xsd). It warps the response retrieved from the server. Response Samples This request packet retrieves remote storage settings for the client account with ID 17. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.

1.1. the response from the server is as follows: <packet version="1.0"> <backup-manager> <get-remote-storage-settings> <result> <status>ok</status> <settings> <protocol>ftp</protocol> <host>ftp.example.com</host> <port>113</port> <directory>/backups/</protocol> <login>myftplogin</login> <password>myftppassword</password> </settings> </result> </get-remote-storage-settings> </backup-manager> </packet> If the settings haven't been specified.Supported Operations 660 A positive response from the server can look as follows: <packet version="1.5.1.0"> <backup-manager> <get-remote-storage-settings> <result> <status>ok</status> <settings> <protocol>ftp</protocol> <host/> <directory/> <login/> <password/> </settings> </result> </get-remote-storage-settings> </backup-manager> </packet> A negative response from the server can look as follows: <packet version="1.0"> <backup-manager> <get-remote-storage-settings> <result> <status>error</status> <errcode>1013</errcode> <errtext>client does not exist</errtext> </result> </get-remote-storage-settings> </backup-manager> </packet> .5.5.

Plesk clients may specify only the settings node. The settings node is optional. Data type: integer. Data type: BackupRemoteStorage (backup. Data type: integer. </set-remote-storage-settings> </backup-manager> </packet> The set-remote-storage-settings node is presented by type BackupSetRemoteStorageInput (backup. The client-login node is optional. Data type: string.1. It specifies the client ID. and its graphical representation is as follows:      The domain-id node is optional. It contains settings of a remote storage.   To change remote storage settings for a client account. It specifies the domain ID.xsd). Plesk users should specify the domain ID or name.. To change remote storage settings for a domain account. Remarks You can change the settings for a domain or client accounts. Request Packet Structure A request XML packet changing remote storage settings includes the set-remote-storagesettings operation node: <packet version="1.0"> <backup-manager> <set-remote-storage-settings> . Data type: string. It specifies the client login. The domain-name node is optional. The client-id node is optional. It specifies the domain name. For details on the node.5.Supported Operations 661 Changing Remote Storage Settings Use the set-remote-storage-settings operation to change settings of a remote FTP storage used by a domain administrator or client. Plesk Administrator should specify the client login or ID..xsd). . refer to the Remote Storage Settings (on page 656) section.

example.5.0"> <backup-manager> <set-remote-storage-settings> <domain-id>7</domain-id> <settings> <protocol>ftp</protocol> <host>ftp.1.1.com</host> <port>112</port> </settings> </set-remote-storage-settings> </backup-manager> </packet> This request packet retrieves remote storage settings for your client account if you are authenticated to Plesk API RPC as Plesk client.com</host> <port>112</port> </settings> </set-remote-storage-settings> </backup-manager> </packet> . <packet version="1.5.5.0"> <backup-manager> <set-remote-storage-settings> <client-id>17</client-id> <settings> <protocol>ftp</protocol> <host>ftp.Supported Operations 662 Request Samples This request packet changes remote storage settings for the client account with ID 17.example. <packet version="1.example. <packet version="1.0"> <backup-manager> <set-remote-storage-settings> <settings> <protocol>ftp</protocol> <host>ftp.com</host> <port>112</port> </settings> </set-remote-storage-settings> </backup-manager> </packet> This request packet retrieves remote storage settings for domain account with ID 7.1.

Data type: resultType (common. Data type: string.1. Data type: integer. The status node is required. It returns the error message if the operation fails. <packet version="1. Is returns the error code if the operation fails. It warps the response retrieved from the server.Supported Operations 663 Response Packet Structure The set-remote-storage-settings node of the output XML packet is presented by type BackupSetRemoteStorageSettingsOutput (backup.example.5. Allowed values: ok | error. The errtext node is optional.0"> <backup-manager> <set-remote-storage-settings> <client-id>17</client-id> <settings> <protocol>ftp</protocol> <host>ftp. The errcode node is optional. Data type: string.com</host> <port>112</port> </settings> </set-remote-storage-settings> </backup-manager> </packet> .xsd) and structured as follows:     The result node is required. Response Samples This request packet changes remote storage settings for the client account with ID 17. It specifies the execution status of the operation.xsd).

</backup-domain> </backup-manager> </packet> . Request Packet Structure A request XML packet creating a backup of a domain account includes the backupdomain operation node: <packet version="1.0"> <backup-manager> <backup-domain> .. the response looks as follows: <packet version="1.Supported Operations 664 A positive response from the server can look as follows: <packet version="1.1.1.5.5.5.1.0"> <backup-manager> <set-remote-storage-settings> <result> <status>error</status> <errcode>1013</errcode> <errtext>client does not exist</errtext> </result> </set-remote-storage-settings> </backup-manager> </packet> Creating Backup of Domain Account Use the backup-domain operation to create a backup of a domain specified by ID or name.0"> <backup-manager> <set-remote-storage-settings> <result> <status>ok</status> </result> </set-remote-storage-settings> </backup-manager> </packet> If the client account was not found on the server..

The description node is required. Data type: integer. . The local node is required. the split-size value should be set to -1. Data type: string. It specifies the domain ID. Data type: string. Data type: none. and its graphical representation is as follows:        The domain-id node is required. The filename node is required. It specifies the domain name. It specifies the name of the backup.xsd). Note: If you do not want to split backup into several files. If you use both parameters in a single backup-domain operation. It specifies if the backup will be stored in a remote storage. The remote node is required.Supported Operations 665 The backup-domain node is presented by type BackupDomainInput (backup. It specifies the description of the backup. It specifies if the backup will be stored in the local repository. Remarks Domain can be specified either by domain name or ID. Data type: string. the server will not validate the packet. Data type: integer. Data type: none. The parameter specifies size of fragments (in Mb) into which a backup is partitioned. The split-size node is optional. The domain-name node is required.

<packet version="1.com.example.5.0"> <backup-manager> <backup-domain> <domain-name>example.1. The size of each part is 100 Mb.1.xsd) and structured as follows: .com.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> </backup-domain> </backup-manager> </packet> The following request packet creates backup of domain account example. The backup is splitted into parts.Supported Operations 666 Request Samples The following request packet creates backup (without splitting) of the domain account with ID 3: <packet version="1.com.com</domain-name> <remote/> <filename>12-11-2003-mydomain.5.example.0"> <backup-manager> <backup-domain> <domain-id>3</domain-id> <local/> <filename>12-11-2003-mydomain.bak</filename> <description>Standard weekly backup</description> <split-size>100</split-size> </backup-domain> </backup-manager> </packet> Response Packet Structure The backup-domain node of the output XML packet is presented by type BackupDomainOutput (backup.

It returns the error message if the operation fails. Allowed values: ok | error. Response Samples The following request packet creates backup (without splitting) of the domain account with ID 3: <packet version="1. Data type: string.1. Data type: resultType (common.0"> <backup-manager> <backup-domain> <domain-id>3</domain-id> <local/> <filename>12-11-2003-mydomain.Supported Operations 667     The result node is required.0"> <backup-manager> <backup-domain> <result> <status>ok</status> </result> </backup-domain> </backup-manager> </packet> If the domain account was not found on the server.com.5.5.1. The errtext node is optional. It warps the response retrieved from the server.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> </backup-domain> </backup-manager> </packet> A positive response from the server can look as follows: <packet version="1.</errtext> </result> </backup-domain> </backup-manager> </packet> . the response looks as follows: <packet version="1. Data type: string.5.1.example. Is returns the error code if the operation fails. Data type: integer.0"> <backup-manager> <backup-domain> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.xsd). It specifies the execution status of the operation. The status node is required. The errcode node is optional.

xsd). Request Packet Structure A request XML packet creating backup of a client account includes the backup-client operation node: <packet version="1. The client-login node is required..Supported Operations 668 Creating Backup of Client Account Use the backup-client operation to create a backup of a client account. The local node is required. </backup-client> </backup-manager> </packet> The backup-client node is presented by type BackupClientInput (backup. It specifies the client login.5. Data type: string. Data type: none.0"> <backup-manager> <backup-client> . and its graphical representation is as follows:    The client-id node is required.. Data type: integer.1. It specifies the client ID. It specifies if the backup will be stored in the local repository. .

It specifies the name of the backup. This node is specified when you create backups for all domains held by the client account. All domains should be specified either by domain-id or by domain-name. If you use both parameters in a single backup-client operation. Plesk clients may not specify their ID or name in a request packet. The all-domains node is optional. The description node is required. It specifies the domain name. use multiple domain-id or domain-name nodes in a request packet. It specifies the domain ID. It specifies if the backup will be stored in a remote storage. Data type: integer. Data type: string. the server will not validate the packet. This option can be used only by Plesk Administrator. Data type: string. use the alldomains node instead of enumerating domains. Note: If you do not specify domain-id. the server will not validate the packet. The parameter specifies size of fragments (in Mb) into which a backup is partitioned. Data type: none. Note: If you do not want to split backup into several files. the backup will contain only client settings. It specifies the description of the backup. the split-size value should be set to -1. The domain-name node is optional. Remarks Plesk Administrator can specify clients either by name or ID. If you use both parameters in a single backup-client operation. Data type: integer. Data type: none.Supported Operations 669        The remote node is required. domain-name and all-domains nodes in a request packet. To specify multiple domain accounts. To create backup for all domain accounts of a specified client account. The split-size node is optional. . Data type: string. The filename node is required. The domain-id node is optional.

1.0"> <backup-manager> <backup-client> <client-id>18</client-id> <local/> <filename>12-11-2003-myclient_all_.0"> <backup-manager> <backup-client> <client-id>18</client-id> <local/> <filename>12-11-2003-myclient_settings_.Supported Operations 670 Request Samples The following request packet creates backup (without splitting) of domain accounts with ID 3 and ID 8 that are held by the client account with ID 18.1.5.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> </backup-client> </backup-manager> </packet> The following request packet creates backup (without splitting) of all domains held by the client account with ID 18. <packet version="1.1. <packet version="1.0"> <backup-manager> <backup-client> <client-id>18</client-id> <local/> <filename>12-11-2003-myclient_3_8.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> <domain-id>3</domain-id> <domain-id>8</domain-id> </backup-client> </backup-manager> </packet> The following request packet creates backup (without splitting) of settings for the client account with ID 18.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> <all-domains/> </backup-client> </backup-manager> </packet> .5. <packet version="1.5.

Data type: integer. Is returns the error code if the operation fails. Allowed values: ok | error.xsd) and structured as follows:     The result node is required. <packet version="1.1.xsd).Supported Operations 671 Response Packet Structure The backup-client node of the output XML packet is presented by type BackupClientOutput (backup. It specifies the execution status of the operation. Data type: resultType (common. The errtext node is optional. Data type: string. It warps the response retrieved from the server. It returns the error message if the operation fails. The errcode node is optional.0"> <backup-manager> <backup-client> <client-id>18</client-id> <local/> <filename>12-11-2003-myclient_3_8. Data type: string. The status node is required.bak</filename> <description>Standard weekly backup</description> <split-size>-1</split-size> <domain-id>3</domain-id> <domain-id>8</domain-id> </backup-client> </backup-manager> </packet> .5. Response Samples The following request packet creates backup (without splitting) of domain accounts with ID 3 and ID 8 that are held by the client account with ID 18.

5.0"> <backup-manager> <backup-client> <result> <status>ok</status> </result> </backup-client> </backup-manager> </packet> If one of domain accounts was not found on the server.1. the response looks as follows: <packet version="1.0"> <backup-manager> <get-backup-status> .. the response looks as follows: <packet version="1.5.1..5. </get-backup-status> </backup-manager> </packet> .Supported Operations 672 A positive response from the server can look as follows: <packet version="1.0"> <backup-manager> <backup-client> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain does not exist.5.1.</errtext> </result> </backup-client> </backup-manager> </packet> Retrieving Backup Status Use the get-backup status operation to retrieve the status of the backup process for a specified domain or client account.</errtext> </result> </backup-client> </backup-manager> </packet> If the client account was not found on the server.1.0"> <backup-manager> <backup-client> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist. Request Packet Structure A request XML packet retrieving the status of a backup process includes the get-backupstatus operation node: <packet version="1.

It specifies the domain ID. The domain-name node is optional. and its graphical representation is as follows:     The domain-id node is optional.Supported Operations 673 The get-backup-status node is presented by type BackupGetBackupStatusInput (backup. The client-id node is optional. Remarks You can retrieve the status of a backup process for a domain or client account.   To retrieve the status for a client account.xsd). It specifies the client ID. Plesk users should specify the domain ID or name. It specifies the client name. Data type: integer. To retrieve the status for a domain account. The client-login node is optional.0"> <backup-manager> <get-backup-status> <client-login>MyAccount</client-login> </get-backup-status> </backup-manager> </packet> The following request packet retrieves the status of the backup process for the domain account with ID 7: <packet version="1.5.1. It specifies the domain name. Request Samples The following request packet retrieves the status of the backup process for client account MyAccount: <packet version="1. Data type: string. Data type: integer.5.0"> <backup-manager> <get-backup-status> <domain-id>7</domain-id> </get-backup-status> </backup-manager> </packet> . Note: You should specify at least one of the mentioned nodes in a request packet. Data type: string.1. Plesk Administrator should specify the client login or ID.

It specifies the execution status of the operation. It returns the error message if the operation fails. If it is present in a response packet. Is returns the error code if the operation fails. Data type: string. The finished node is required. Data type: resultType (common. If it is present in a response packet. The status node is required. the backup process is finished. The errtext node is optional. . Data type: none. Data type: string. Data type: none. Allowed values: ok | error. The errcode node is optional.Supported Operations 674 Response Packet Structure The get-backup-status node of the output XML packet is presented by type BackupGetBackupStatusOutput (backup. Data type: integer.xsd). the backup process is failed. Data type: none. The failed node is required.xsd) and structured as follows:         The result node is required. It warps the response retrieved from the server. It contains details of backup process failure. If it is present in a response packet. the backup process is running. The description node is optional. Data type: string. The processing node is required.

Supported Operations 675 Response Samples The following request packet retrieves the status of the backup process for the domain account with ID 7: <packet version="1.1.1.1.0"> <get-backup-status> <result> <status>ok</status> </result> </get-backup-status> </packet> If the domain account was not found on the server.</errtext> </result> </get-backup-status> </backup-manager> </packet> .5.0"> <get-backup-status> <result> <status>ok</status> <processing/> <description/> </result> </get-backup-status> </packet> If the backup process is not started.1.0"> <backup-manager> <get-backup-status> <domain-id>7</domain-id> </get-backup-status> </backup-manager> </packet> A positive response from the server can look as follows: <packet version="1. the response from the server can look as follows: <packet version="1. the response looks as follows: <packet version="1.5.0"> <backup-manager> <get-backup-status> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain does not exist.5.5.

The client-id node is optional. </get-local-backup-list> </backup-manager> </packet> The get-backup-status node is presented by type BackupGetLocalBackupListInput (backup. and its graphical representation is as follows:     The domain-id node is optional. Request Packet Structure A request XML packet retrieving a list of backups stored in the local repository includes the get-local-backup-list operation node: <packet version="1..1. To retrieve the list for a domain account. The domain-name node is optional. . The client-login node is optional.Supported Operations 676 Retrieving List of Local Backups Use the get-local-backup-list to retrieve the list of backups stored in the local repository of a specified client or domain administrator. Plesk Administrator should specify the client login or ID. Data type: integer. Note: You should specify at least one of the mentioned nodes in a request packet.xsd). Plesk users should specify the domain ID or name. It specifies the domain ID.   To retrieve the list for a client account. Data type: integer.0"> <backup-manager> <get-local-backup-list> . It specifies the domain name. Remarks You can retrieve the list of backups stored in the local repository of a domain administrator or client. Data type: string. Data type: string.5.. It specifies the client login. It specifies the client ID.

Data type: string. .0"> <backup-manager> <get-local-backup-list> <client-login>MyAccount</client-login> </get-local-backup-list> </backup-manager> </packet> The following request packet retrieves a list of local backups for the domain account with ID 7: <packet version="1.xsd).0"> <backup-manager> <get-local-backup-list> <domain-id>7</domain-id> </get-local-backup-list> </backup-manager> </packet> Response Packet Structure The get-backup-status node of the output XML packet is presented by type BackupGetLocalBackupListOutput (backup.Supported Operations 677 Request Samples The following request packet retrieves a list of local backups for client account MyAccount: <packet version="1. Allowed values: ok | error. The status node is required.xsd) and structured as follows:   The result node is required.1.1. It warps the response retrieved from the server. Data type: resultType (common. It specifies the execution status of the operation.5.5.

It holds the description of the file included in the backup. It is present in a response packet in case of backup failure. It contains backup details.xsd). The not-backup node is optional. Data type: integer. The errtext node is optional. Data type: string.Supported Operations 678    The errcode node is optional. The name node is required. It returns the error message if the operation fails. The creation-date node is required. The backup node is optional. Data type: none. Data type: size (common. Data type: string. Data type: BackupType (backup.xsd). it contains the list of backups stored in the local repository of the specified user. It holds the name of a file included in the backup. It holds the creation date of the file included in the backup.xsd). Data type: timestamp. The description node is required. The size node is required. If the operation succeeds. Data type: string. It can be graphically represented in the following way:  The file node is required. Data type: BackupFile (backup. It holds the size of the file included in the backup.      . Is returns the error code if the operation fails.

5.0"> <backup-manager> <get-local-backup-list> <client-login>MyAccount</client-login> </get-local-backup-list> </backup-manager> </packet> A positive response from the server can look as follows: <packet version="1.12</name> <creation-date>1179483198</creation-date> <description>sdf backup.5.1.18_17.5.bak</name> <creation-date>1179482633</creation-date> <description/> <size>0</size> <not-backup/> </file> </backup> <backup> <file> <name>priest_2007.1.05.0"> <backup-manager> <get-local-backup-list> <result> <status>error</status> <errcode>1013</errcode> <errtext>Client does not exist. Creation date: May 18.Supported Operations 679 Response Samples The following request packet retrieves the list of local backups for client account MyAccount: <packet version="1.1.</errtext> </result> </get-local-backup-list> </backup-manager> </packet> .0"> <backup-manager> <get-local-backup-list> <result> <status>ok</status> <backup> <file> <name>12-11-2003-myclient_3_8. 2007 05:12 PM</description> <size>128732</size> </file> </backup> </result> </get-local-backup-list> </backup-manager> </packet> If the account was not found on the server. the response looks as follows: <packet version="1.

The client-login node is optional.xsd). Note: You should specify at least one of the mentioned nodes in a request packet. To upload a backup to the local repository. It specifies the domain ID. Data type: integer. Data type: string. refer to the Uploading Files to Server (see page 960) section. Data type: integer. 2 Request Packet Structure A request XML packet moving a backup to the local repository includes the put-backup operation node: <packet version="1.5. </put-backup> </backup-manager> </packet> The put-backup node is presented by type BackupPutFileInput (backup. perform two following steps: 1 Upload the backup to the temporary directory on the server using the upload operator. The domain-name node is optional. It specifies the client login.0"> <backup-manager> <put-backup> . The client-id node is optional.  The filename node is optional. and its graphical representation is as follows:     The domain-id node is optional. Data type: string. For details on the operator. It specifies the name of the backup in the local repository. It specifies the client ID. It specifies the domain name. . Move the backup to the local repository using the put-backup operator.Supported Operations 680 Uploading Backup to Repository Use the put-backup to upload a backup from a temporary folder on the server to the local repository of a specified client or domain administrator..1. Data type: string..

Data type: string.   To move a backup to the repository of a client account.0"> <upload> <result> <status>ok</status> <name>MyBackup</name> <file>/usr/local/psa/tmp/MyBackup.5.bak was successfully uploaded to the server. Plesk Administrator should specify the client login or ID. Remarks You can move backups to the local repository of a domain administrator or client.1. Plesk users should specify the domain ID or name.Supported Operations 681  The tmp-filename node is optional.bak</file> </result> </upload> </packet> The request packet moving the backup to the local repository of the client with ID 54 looks as follows: <packet version="1.0"> <backup-manager> <put-backup> <client-id>54</client-id> <filename>11-10-2007-weekly-backup. backup MyBackup.5. <packet version="1.bak</filename> <tmp-filename>/usr/local/psa/tmp/MyBackup. To move a backup to the repository of a domain administrator. It specifies full name of the backup retrieved from the response packet of the upload operation.bak</tmp-filename> </put-backup> </backup-manager> </packet> . Request Samples Using the upload operator.1.

   Response Samples The request packet moving the backup to the local repository of the client with ID 54 looks as follows: <packet version="1. The errtext node is optional. It returns the error message if the operation fails.0"> <backup-manager> <put-backup> <client-id>54</client-id> <filename>11-10-2007-weekly-backup.Supported Operations 682 Response Packet Structure The put-backup node of the output XML packet is presented by type BackupPutFileOutput (backup. The errcode node is optional. Data type: resultType (common.bak</tmp-filename> </put-backup> </backup-manager> </packet> A positive response from the server can look as follows: <packet version="1.1. Is returns the error code if the operation fails. The status node is required.xsd) and structured as follows:  The result node is required. It warps the response retrieved from the server.0"> <backup-manager> <put-backup> <result> . Data type: integer. Data type: string.5.xsd). It specifies the execution status of the operation.bak</filename> <tmp-filename>/usr/local/psa/tmp/MyBackup.5. Allowed values: ok | error. Data type: string.1.

In case the file has been successfully downloaded. the response looks as follows: <packet version="1.</errtext> </result> </put-backup> </backup-manager> </packet> If the client account was not found on the server. because structure of a download-file response packet varies depending on the result of the operation. Request Packet Structure A request XML packet downloading a backup from the local repository includes the download-file operation node: <packet version="1.5.5.5.0"> <backup-manager> <put-backup> <result> <status>error</status> <errcode>1015</errcode> <errtext>client does not exist.1.1. the response contains XML packet with the error data.1..</errtext> </result> </put-backup> </backup-manager> </packet> Downloading Backup Use the download-file to download a backup from the local repository of a specified client or domain administrator.0"> <backup-manager> <download-file> .0"> <backup-manager> <put-backup> <result> <status>error</status> <errcode>1013</errcode> <errtext>File does not exist. If any error occurs.Supported Operations <status>ok</status> </result> </put-backup> </backup-manager> </packet> 683 If the file was not found on the server.. the response contains attached backup file. the response looks as follows: <packet version="1. Note: Do not use other operations in the same packet with this operation. </download-file> </backup-manager> </packet> .

Data type: string. Data type: string. Plesk users should specify the domain ID or name. It specifies the domain name. and its graphical representation is as follows:     The domain-id node is optional. Note: You should specify at least one of the mentioned nodes in a request packet. The client-login node is optional.  The filename node is optional.   To download a backup from the repository of a client account. Request Samples The request packet downloading backup MyBackup.0"> <backup-manager> <download-file> <client-id>54</client-id> <filename>MyBackup. The client-id node is optional. Remarks You can download backups from the local repository of a domain administrator or client. It specifies the client ID. It specifies the name of the backup in the local repository.Supported Operations 684 The download-file node is presented by type BackupDownloadFileInput (backup.bak</filename> </download-file> </backup-manager> </packet> . To download a backup from the repository of a domain administrator.xsd). The domain-name node is optional. Data type: integer.1. Data type: integer. Data type: string. It specifies the domain ID. It specifies the client login.5. Plesk Administrator should specify the client login or ID.bak from the local repository of the client with ID 54 looks as follows: <packet version="1.

Data type: resultType (common. It returns the error message if the operation fails. Is returns the error code if the operation fails. Response Samples The request packet downloading backup MyBackup.0"> <backup-manager> <download-file> <client-id>54</client-id> <filename>MyBackup.bak</filename> </download-file> </backup-manager> </packet> A positive response from the server can look as follows: Content-Type: application/octet-stream Content-Disposition: attachment.xsd).Supported Operations 685 Response Packet Structure The put-backup node of the output XML packet is presented by type BackupDownloadFileOutput (backup.bak from the local repository of the client with ID 54 looks as follows: <packet version="1. Data type: integer. It warps the response retrieved from the server. The status node is required. Data type: string. filename=MyBackup.5. Allowed values: ok | error. The errtext node is optional. The errcode node is optional.xsd) and structured as follows:     The result node is required.1. It specifies the execution status of the operation. Data type: string.bak Pragma: no-cache <backup data> .

Supported Operations 686 If the file does not exist on the server.5. Request Packet A request XML packet retrieving protocols supported by Backup manager includes the get-supported-protocols operation node: <packet version="1. Response Packet Structure The get-supported-protocols node of the output XML packet is presented by type BackupGetSupportedProtocolsOutput (backup.0"> <backup-manager> <download-file> <result> <status>error</status> <errcode>1013</errcode> <errtext>The file MyBackup.bak does not exist</errtext> </result> </download-file> </backup-manager> Retrieving Protocols Supported by Backup Manager Use the get-supported-protocols to retrieve protocols supported by Backup manager.xsd) and structured as follows: .1. Data type: none.0"> <backup-manager> <get-supported-protocols/> </backup-manager> </packet> The get-supported-protocols node is required.5.1. the response is as follows: <packet version="1.

Allowed values: ok | error.1. Data type: string. The status node is required.Supported Operations 687      The result node is required.1.5. Response Samples The request packet looks as follows: <packet version="1. The errtext node is optional.5.0"> <backup-manager> <get-supported-protocols> <result> <status>ok</status> <protocol>ftp</protocol> </result> </get-supported-protocols> </backup-manager> Stopping Backup Process Use the stop-backup to stop the backup process for a specified client or domain account. Data type: integer. </stop-backup> </backup-manager> </packet> .0"> <backup-manager> <get-supported-protocols/> </backup-manager> </packet> A positive response from the server looks as follows: <packet version="1. Data type: string. If the operation succeeds. Request Packet Structure A request XML packet stopping a backup process includes the stop-backup operation node: <packet version="1. The errcode node is optional. Data type: resultType (common. It specifies the execution status of the operation. Is returns the error code if the operation fails.xsd). it contains a list of supported protocols.1. Data type: string.0"> <backup-manager> <stop-backup> . It returns the error message if the operation fails.. It warps the response retrieved from the server.5. The protocol node is optional..

To stop the process for a domain account. Data type: integer.1.xsd).0"> <backup-manager> <stop-backup> <domain-id>5</domain-id> </stop-backup> </backup-manager> </packet> The following packet stops the backup process for the client account with ID 1.1. Remarks You can stop a backup process for a domain or client accounts. It specifies the domain name. Data type: string. Data type: integer.Supported Operations 688 The stop-backup node is presented by type BackupStopInput (backup.   To stop the process for a client account. <packet version="1. The client-id node is optional. Plesk Administrator should specify the client login or ID. <packet version="1. The domain-name node is optional. It specifies the client login.5. and its graphical representation is as follows:     The domain-id node is optional. It specifies the domain ID. It specifies the client ID.0"> <backup-manager> <stop-backup> <client-id>1</client-id> </stop-backup> </backup-manager> </packet> . Plesk users should specify the domain ID or name. Data type: string. Request Samples The following packet stops the backup process for the domain account with ID 5.5. The client-login node is optional.

Is returns the error code if the operation fails.5. Data type: integer. Allowed values: ok | error.Supported Operations 689 Response Packet Structure The stop-backup node of the output XML packet is presented by type BackupStopOutput (backup. The errcode node is optional.0"> <backup-manager> <stop-backup> <domain-id>5</domain-id> </stop-backup> </backup-manager> </packet> A positive response from the server looks as follows: <packet version="1. The status node is required.1. Data type: string. Response Packet Samples The following packet stops the backup process for the domain account with ID 5.0"> <backup-manager> <stop-backup> <result> <status>ok</status> </result> </stop-backup> </backup-manager> </packet> . Data type: string. It specifies the execution status of the operation. It returns the error message if the operation fails. <packet version="1.1. The errtext node is optional.xsd). It warps the response retrieved from the server. Data type: resultType (common.xsd) and structured as follows:     The result node is required.5.

xsd). Request Packet Structure A request XML packet retrieving a list of backup processes includes the get-backupprocesses operation node: <packet version="1..0"> <backup-manager> <get-backup-processes> . Data type: none. If the node is present in the request packet. the response looks as follows: <packet version="1.1.5. only backup processes for domain accounts will be shown. If the node is present in the request packet. . The client node is required.Supported Operations 690 If backup process in not running for the domain account. </get-backup-processes> </backup-manager> </packet> The get-backup-processes node is presented by type BackupGetBackupProcessesInput (backup. Note: This operation can be used only by Plesk Administrator. Data type: none. only backup processes for client accounts will be shown. and its graphical representation is as follows:   The domain node is required..0"> <backup-manager> <stop-backup> <result> <status>error</status> <errcode>1002</errcode> <errtext>Attempt to get working dir for not running backup</errtext> </result> </stop-backup> </backup-manager> </packet> Retrieving List of Backup Processes Use the get-backup-processes to retrieve a list of backup processes. Note: You should specify only one of these nodes in a single get-backup-process operation.5.1.

xsd). It warps the response retrieved from the server.5. It specifies the execution status of the operation.0"> <backup-manager> <get-backup-processes> <client/> </get-backup-processes> </backup-manager> </packet> Response Packet Structure The get-backup-processes node of the output XML packet is presented by type BackupGetBackupProcessesOutput (backup. The node can be graphically represented in the following way: . Data type: string.1.Supported Operations 691 Request Samples The request packet that retrieves the list of currently running backup processes for client accounts looks as follows: <packet version="1. It returns the error message if the operation fails. Is returns the error code if the operation fails. Data type: string. The status node is required. Data type: integer. The processes node is optional. The errcode node is optional.xsd) and structured as follows:      The result node is required. Data type: resultType (common. Data type: complex. The errtext node is optional. Allowed values: ok | error. It contains the list of processes and details on each process if the operation succeeds.

bak</filename> <protocol>local</protocol> </process> </result> </get-backup-processes> </backup-manager> </packet> . The started node is required. It specifies the name of the backup. The filename node is required. The client-id node is required. Data type: integer. Data type: string.  Response Samples The request packet displaying all currently running backup processes for client accounts looks as follows: <packet version="1. It specifies the domain ID. It specifies the protocol that is used by Backup manager.5.5. It specifies the client ID.0"> <backup-manager> <get-backup-processes> <client/> </get-backup-processes> </backup-manager> </packet> A possible response from the server can look as follows: <packet version="1. Data type: string.0"> <backup-manager> <get-backup-processes> <result> <status>ok</status> <process> <client-id>10</client-id> <started>2007-03-21 15:31:41</started> <filename>12-11-200-myclient_3_8. The protocol node is optional.1. Allowed values: ftp | local.Supported Operations 692      The domain-id node is required. It specifies date and time when the process was started. Data type: integer. Data type: string.1.

Plesk Administrator should specify the client login or ID.5.xsd).0"> <backup-manager> <remove-file> . Plesk users should specify the domain ID or name. . The client-login node is optional. Data type: string. It specifies the client login.1.  The filename node is required. The client-id node is optional. Data type: string. Remarks You can remove backups stored in the local repository of a domain administrator or client. Note: You should specify at least one of the mentioned nodes in a request packet. Data type: integer. It specifies the domain name. The domain-name node is optional.Supported Operations 693 Removing Backup Use the remove-file to remove a backup from the local repository... Request Packet Structure A request XML packet removing a backup from the local repository includes the removefile operation node: <packet version="1.   To remove a backup of a client account. It specifies the name of the backup in the local repository. </remove-file> </backup-manager> </packet> The remove-file node is presented by type BackupRemoveFileInput (backup. To remove a backup of a domain account. Data type: integer. Data type: string. and its graphical representation is as follows:     The domain-id node is optional. It specifies the domain ID. It specifies the client ID.

It warps the response retrieved from the server.0"> <backup-manager> <remove-file> <client-id>114</client-id> <filename>MyBackup. Data type: integer.    . Data type: resultType (common. Is returns the error code if the operation fails. The status node is required.xsd). Allowed values: ok | error. The errtext node is optional. Data type: string.1. It specifies the execution status of the operation.Supported Operations 694 Request Samples The request packet removing backup MyBackup.5. The errcode node is optional.bak from the local repository of the client account with ID 114 looks as follows: <packet version="1. Data type: string.xsd) and structured as follows:  The result node is required.bak</filename> </remove-file> </backup-manager> </packet> Response Packet Structure The stop-backup node of the output XML packet is presented by type BackupRemoveFileOutput (backup. It returns the error message if the operation fails.

5.5.0"> <backup-manager> <remove-file> <result> <status>ok</status> </result> </remove-file> </backup-manager> </packet> If the file is not found on the server. the response from the server looks as follows: <packet version="1.0"> <backup-manager> <remove-file> <client-id>114</client-id> <filename>MyBackup.1.5.bak from the local repository of the client account with ID 114 looks as follows: <packet version="1.1.1.bak</filename> </remove-file> </backup-manager> </packet> A positive response from the server looks as follows: <packet version="1.0"> <backup-manager> <remove-file> <result> <status>error</status> <errcode>1013</errcode> <errtext>The file MyBackup.bak does not exist</errtext> </result> </remove-file> </backup-manager> </packet> .Supported Operations 695 Response Samples The request packet removing backup MyBackup.

Supported Operations 696 Managing Plesk Server Operator: <server> XML Schema: plesk_server. server_input.xsd. server_output. general Plesk configuration.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator Description The server operator is designed for performing various operations on logical objects existing on the server level:      API RPC protocol Plesk license Plesk Administrator Server services Server statistics Supported operations   GET_PROTOS (see page 701) gets API RPC protocol versions supported on the server GET (see page 714) gets various information on server configuration. Plesk services and statistics . Plesk Administrator data and settings. license key.xsd.

It holds the administrator's company name. stops. The admin_pname node is required.xsd). Together with the personal info. Data type: string (0 to 60 characters long). Data type: string (0 to 60 characters long). and restarts Plesk server services LIC_INSTALL (see page 711) installs Plesk license key INITIAL_SETUP (see page 703) configures Plesk server for the first time GET_ADDITIONAL_KEY (see page 707) retrieves license keys for Plesk add-ons Administrator Personal Information Personal information of Plesk server Administrator is held by the admin node presented by complex type adminType (plesk_server.Supported Operations 697      SET (see page 744) changes Administrator‘s password and personal information and settings. the node specifies if the SWsoft. announcements should be sent to the Administrator's e-mail. . The node is structured as follows:   The admin_cname node is required. and configures server traffic statistics and user's session settings SRV_MAN (see page 747) starts. It holds the administrator's personal name.

Data type: emailType (common.org/iso/en/prodsservices/iso3166ma/02iso-3166-code-lists/list-en1. It holds the administrator's phone number. It holds the administrator's fax number. Data type: string. The uid and the global-login nodes are deprecated. The admin_address node is required.iso. The admin_fax node is required. It holds the administrator's street address. Value restrictions: two-letters upper-case country nomination in accordance with ISO 3166 (http://www.xsd). Data type: string. Data type: zipcodeType (common.   XML request packet changing Administrator's personal information and settings looks as follows: <packet version="1.</admin_cname> <admin_pname>John Doe</admin_pname> <admin_phone>+49 89333333</admin_phone> <admin_fax>+49 893333303</admin_fax> <admin_email>john@doe. The admin_email node is required. The admin_country node is required. The admin_pcode node is required. It holds the administrator's e-mail address. The admin_city node is required.xsd). It holds the administrator's zip/ postal code. Data type: boolean.2.de</admin_email> <admin_address>Theatinerstrasse 96</admin_address> <admin_city>Muenchen</admin_city> <admin_state>Bavaria</admin_state> <admin_pcode>80333</admin_pcode> <admin_country>DE</admin_country> <send_announce>true</send_announce> </admin> </set> </server> </packet> . It holds the name of the city where administrator lives.html). It holds the name of the country where administrator lives. The admin_state node is required. It specifies whether SWsoft announcement messages are sent to the administrator's e-mail specified in the admin_email node . The send_announce node is required.0"> <server> <set> <admin> <admin_cname>JohnDoe BV.4. Data type: string. It holds the name of state (for US citizens) or province where administrator lives.Supported Operations 698         The admin_phone node is required. Data type: string. Data type: string. Data type: string.

xsd) and structured as follows:  The stat_ttl node is optional. .Supported Operations 699 A response XML packet retrieving Administrator's personal information and settings looks as follows: <packet version="1.de</admin_email> <admin_address>Theatinerstrasse 96</admin_address> <admin_city>Muenchen</admin_city> <admin_state>Bavaria</admin_state> <admin_pcode>80333</admin_pcode> <admin_country>DE</admin_country> <send_announce>true</send_announce> </admin> </result> </get> </server> </packet> Server Preferences When talking about Plesk server preferences. we mean the following:    Apache restart interval (for Plesk for Unix only) — the number of seconds after which Apache should be restarted traffic statistics time-to-live — the period (in month) during which the server traffic statistics should be stored traffic accounting type — if the inbound or/and outbound traffic should be calculated Plesk server preferences are held by the prefs node.4.</admin_cname> <admin_pname>John Doe</admin_pname> <admin_phone>+49 89333333</admin_phone> <admin_fax>+49 893333303</admin_fax> <admin_email>john@doe. It specifies the time-to-live of server traffic statistics.2. The node is presented by complex type serverPrefs (plesk_server. Data type: integer.0"> <server> <get> <result> <status>ok</status> <admin> <admin_cname>JohnDoe BV.

It specifies Apache restart interval (in seconds). When operation succeeds.  XML request packets setting up or changing server preferences may look as follows: <packet version="1.2.0"> <server> <set> <prefs> <stat_ttl>5</stat_ttl> <traffic_accounting>2</traffic_accounting> </prefs> </set> </server> </packet> This packet is formed for sending to the server running Plesk for Windows.Supported Operations 700  The traffic_accounting node is optional. <packet version="1. both inbound and outbound traffic will be included to server traffic statistics.4. Allowed values: 1 (only inbound) | 2 (only outbound) | 3 (inbound & outbound). Supported in Plesk for Unix only. Data type: integer. only outbound traffic should be calculated. Apache will not be restarted automatically. Data type: integer. Also. It specifies the traffic accounting type.4. and the traffic statistics should be stored during 5 months. The restart_apache_interval node is optional. . which will be stored during 3 months.0"> <server> <set> <prefs> <stat_ttl>3</stat_ttl> <traffic_accounting>3</traffic_accounting> <restart_apache_interval>0</restart_apache_interval> </prefs> </set> </server> </packet> This packet is formed for sending to the server running Plesk for Unix.2.

Supported Operations 701 XML response packet retrieving server preferences may look as follows: <packet version="1. Apache is restarted each 24 hours. .4.4. and the traffic statistics are stored during 6 months.0"> <server> <get> <result> <status>ok</status> <prefs> <stat_ttl>4</stat_ttl> <traffic_accounting>3</traffic_accounting> <restart_apache_interval>86400</restart_apache_interval> </prefs> </result> </get> </server> </packet> This packet is received from the server running Plesk for Unix where both inbound and outbound traffic are included to server traffic statistics. which is stored during 4 months.xsd).0"> <server> <get> <result> <status>ok</status> <prefs> <stat_ttl>6</stat_ttl> <traffic_accounting>2</traffic_accounting> </prefs> </result> </get> </server> </packet> This packet is received from the server running Plesk for Windows where only outbound traffic is calculated.2.0"> <server> <get_protos/> </server> </packet> The get_protos node is presented by the GetProtosType (server_input. Also.2.2. send to the server a request packet with the get_protos operational node: <packet version="1. <packet version="1.4. Getting Supported Protocols To retrieve a list of API RPC protocol versions supported on a Plesk server.

The proto node is required if the get_protos operation has succeeded.0. Data type: string. Data type: string.  A positive response received from server can look as follows: <packet version="1.0</proto> <proto>1. Data Type: ProtosList (server_output.4.1. It hold the list of API RPC protocol versions supported on the server.2.1. The protos node is required if the get_protos operation has succeeded.3.xsd) and is structured as follows:      The result node is required.0"> <server> <get_protos> <result> <status>ok</status> <protos> <proto>1.0.xsd). Allowed values: ok | error. It is used to return the error message if the get_protos operation fails.0.Supported Operations 702 Response packet The get_protos node of the response packet received from server is presented by the complex type GetProtosType (server_output. It wraps the response retrieved from the server. Data type: unsignedInt. The status node is required. The errtext node is optional.0. The errcode node is optional.2.0. It specifies the execution status of the get_protos operation. It is used to return the error code when the get_protos operation fails.xsd). Data type: GetProtosResultType (server_output.0</proto> <proto>1. It specifies a supported version of API RPC protocol.0</proto> <proto>1. Data type: string.3.0</proto> <proto>1.0</proto> .

4. For this purposes.3.3.2.2.0</proto> <proto>1. Note: Using the initial_setup operation later on to change administrator's password or personal info is prohibited.3.0</proto> <proto>1.2</proto> </protos> </result> </get_protos> </server> </packet> 703 Performing Initial Server Setup Initial server setup is performed right after installing Plesk on a server..5.4.. </initial_setup> </server> </packet> .1.4.1.Supported Operations <proto>1.1.3.0. This operation includes:    Specifying Plesk Administrator's personal information Changing default Plesk Administrator's password Specifying full host name To initially set up Plesk server.1</proto> <proto>1.0</proto> <proto>1.3.0"> <server> <initial_setup> .4.0</proto> <proto>1. use the initial_setup operation.4.0</proto> <proto>1. Request Packet Structure A request XML packet starting server initial setup contains the initial_setup operation node: <packet version="1.2.4.0</proto> <proto>1. use the set (see page 744) operation instead.4.0</proto> <proto>1.

It holds the collection of data describing Plesk Administrator's personal info. The server_name node is optional.4.de</server_name> </initial_setup> </server> </packet> . The password node is required.2. refer to the Administrator Personal Information (see page 697) section. Data type: serverPassword (plesk_server.xsd). Data type: adminType (plesk_server.doe.de</admin_email> <admin_address>Theatinerstrasse 96</admin_address> <admin_city>Muenchen</admin_city> <admin_state>Bavaria</admin_state> <admin_pcode>80333</admin_pcode> <admin_country>DE</admin_country> <send_announce>true</send_announce> </admin> <password>setup</password> <server_name>com3.xsd).Supported Operations 704 The initial_setup node is presented by complex type initialSetupType (plesk_server. It holds the new Plesk Administrator's password that will replace the default one.  Request Samples A request packet performing initial setup of Plesk server can look as follows: <packet version="1. Data type: string.</admin_cname> <admin_pname>John Doe</admin_pname> <admin_phone>+49 89333333</admin_phone> <admin_fax>+49 893333303</admin_fax> <admin_email>john@doe. For information on this node structure. It specifies the full host name.0"> <server> <initial_setup> <admin> <admin_cname>JohnDoe BV.xsd) and structured as follows:   The admin node is required. Allowed values: 5 to 14 characters.

It returns the execution status of the initial_setup operation. The errtext node is optional.Supported Operations 705 Response Packet Structure The initial_setup node of the response packet is structured as follows:      The result node is required. Data type: string.de</server_name> </result> </initial_setup> </server> </packet> . It returns the error code when the initial_setup operation fails. The server_name node is required if the initial_setup operation succeeds.2.doe. The status node is required.xsd).0"> <server> <initial_setup> <result> <status>ok</status> <server_name>com3. Response Samples A positive response received from server looks as follows: <packet version="1. Allowed values: ok | error. Data type: string (common. Data type: string. Data type: InitialSetupResultType (server_output. Data type: unsignedInt (integer).xsd). It wraps the result of the initial_setup operation. It returns the error message if the initial_setup operation fails. The errcode node is optional. It returns the name of the server on which initial setup was successfully performed.4.

de</server_name> </result> </initial_setup> </server> </packet> Such error is received if the request packet sent to the server tried to perform initial setup on a server where it has already been done.doe. Managing Plesk License Plesk license determines   What Plesk functionality is available when using a particular Plesk instance How many Plesk logical objects (Client accounts.0"> <server> <get> <key/> </get> </server> </packet> For information on the response packet structure and response samples.4.0"> <server> <initial_setup> <result> <status>error</status> <errcode>1003</errcode> <errtext>Initial setup already completed</errtext> <server_name>com3. A request XML packet getting license key contains the key node nested within the get operational node: <packet version="1.Supported Operations 706 A negative response received from server may look as follows: <packet version="1. refer to the Getting Server Information: License Key (see page 718) section. mailboxes. .4. etc.) can be created in a particular Plesk instance Plesk Administrator has full set of privileges required for managing Plesk license. Domain accounts.2. web users.2. use the get (see page 714) operation with the key parameter specified. The following operations are available via Plesk API RPC protocol:    Retrieving information on the currently installed Plesk license key Installing new license key Retrieving additional keys (required for Plesk add-ons) installed on the server Retrieving License Key To retrieve the Plesk license key currently installed on a server.

See the Request Samples (see page 708) section for examples..Supported Operations 707 Retrieving Additional License Keys The get_additional_key operation retrieves data of additional key installed on the server.4. It specifies the additional key in format "[key_number]/[key_name]".4. such as the key name and number. Data type: GetAdditionalKeysFilter (server_input.0"> <server> <get_additional_key> <filter/> </get_additional_key> </server> </packet> or <packet version="1.. key expiration date and usage (whether the key is active or not). or omit it at all and send packet with empty get_additional_key node: <packet version="1. Data type: string.2. To retrieve data of all additional keys installed on the server.0"> <server> <get_additional_key> . The name node is optional. key content and other properties. use empty filter node.0"> <server> <get_additional_key/> </server> </packet> . Request Packet Structure A request XML packet retrieving additional key data contains the get_additional_key operation node: <packet version="1. </get_additional_key> </server> </packet> The get_additional_key node is presented by complex type GetAdditionalKeyType (server_input.2.xsd) and structured as follows:   The filter node is optional. It wraps the filtering rules defining which additional keys data to retrieve.4.xsd).2.

It returns the error code when the get_additional_key operation fails. <packet version="1.2.4.Supported Operations 708 Request Samples This packet retrieves data of the additional license key with number PLSK002694000000 and name antivir-drweb-4.xsd).4. The errcode node is optional. . Data type: GetAdditionalKeyResultType (server_output. Allowed values: ok | error. It wraps the result of the get_additional_key operation. Data type: string (common.0"> <server> <get_additional_key> <filter> <name>PLSK002694000000/antivir-drweb-4</name> </filter> </get_additional_key> </server> </packet> This packet retrieves data of all additional license keys installed on server: <packet version="1.xsd). which is the license key allowing using such additional Plesk feature as DrWeb Antivirus.0"> <server> <get_additional_key/> </server> </packet> Response Packet Structure The get_additional_key node of the response packet is structured as follows:    The result node is required. The status node is required. Data type: unsignedInt.2. It returns the execution status of the get_additional_key operation.

It returns . or if it is expired. during which the key must be updated. It returns the date (in format YYYYMMDD) when the key expires. It returns the full key name in format "[key_number]/[key_name]". The name node is required. The active node is required. It returns . Data type: integer. It holds the collection of data describing a particular key property. The content node is required. The lim_date node is optional. Data type: string.xsd). The key_info node is optional. Data type: string.xsd).     . Data type: integer. It returns the error message if the get_additional_key operation fails. The value node is required. The license_update_date node is required if key expiration date is defined. It is required if the response successfully retrieves data of the specified key. It returns the key number. Data type: string. Data type: string. Data type: string. It specifies if the key is installed and working. Data type: additionalKeyType (server_output.Supported Operations 709    The errtext node is optional. Data type: AdditionalKeyPropertyType (server_output. The name node is optional. The node structure is the following:     The number node is required. It returns the date (in format YYYYMMDD) when a grace period starts.  The name node is required. The property node is optional. Data type: string. It returns the key body. Data type: base64. It returns the value of the name node from request packet if retrieving the specified key info is impossible. Data type: boolean.

0"> <server> <get_additional_key> <result> <status>ok</status> <key_info> <number>PLSK002694000000</number> <name>PLSK002694000000/antivir-drweb-4</name> <active>true</active> <license_update_date>20060506</license_update_date> <lim_date>20060511</lim_date> <content>IyEvYmluL3NoCgpQUk9EVUNUX1JPT1RfRD1gYXdrICckMSB+IC9QUk9EVUNUX 1JPT1RfRC97IHByaW50ICQyfScgL2V0Yy9wc2EvcHNhLmNvbmZgCmlmIHRlc3QgLXogIiR QUk9EVUNUX1JPT1RfRCI7IHRoZW4KZWNobyAiUGxlc2sgbm90IGRldGVjdGVkIgpleGl0I DEKZmkKIiRQUk9EVUNUX1JPT1RfRC9hZG1pbi9zYmluL2tleW1uZyIgLS1pbnN0YWxsLWF kZGl0aW9uYWwgLS1zb3VyY2UtZmlsZT0iJDAiIC0tc2tpcD01CmV4aXQgJD8KCi0tLS0tQ kVHSU4gUExFU0sgQURESVRJT05BTCBLRVktLS0tLQprZXlfbnVtYmVyPSdQTFNLMDAyNjk 0NzMwMDAwJwprZXk9J095QkVjbGRsWWpNeUlIWTBMakUyS3lCTFpYa2dSbWxzWlEwS095Q kVieUJ1YjNRZ1pXUnBkQ0VOQ2cwS095QWVIeDRmSGg4ZUh4NGZIaDhlSHg0ZkhoOGVIeDR mSGcwS0RRcGJTMlY1WFEwS1ZsSTlNREF3TURBd01EQXdNQTBLUVZBOU1EQXdNRFV5TkRNe U1BMEtRMUk5TVRFME5EY3pPVEl6T1EwS1JWZzlNVEUwTnpNek1USXpPUTBLVTBVOU1URTB Oek16TVRJek9RMEtWbVZ5YzJsdmJqMUJiR3dOQ2tGd2NHeHBZMkYwYVc5dWN6MUVjbGRsW WxWdWFYZ3NUV0ZwYkVSaFpXMXZibFZ1YVhnTkNrTnlaV0YwWldROU1qQXdOaTB3TkMweE1 TQW9NRGM2TURjcElGVlVRdzBLUlhod2FYSmxjejB5TURBMkxUQTFMVEV4SUNnd056b3dOe WtnVlZSRERRcFRkV0p6WTNKcGNIUnBiMjVGZUhCcGNtVnpQVEl3TURZdE1EVXRN</conte nt> <property> <name>name</name> <value>antivir-drweb-4</value> </property> <property> <name>filename</name> <value>/etc/psa/key.d/keyyV1LsN</value> </property> <property> <name>key</name> <value>OyBEcldlYjMyIHY0LjE2KyBLZXkgRmlsZQ0KOyBEbyBub3QgZWRpdCENCg0KOyA eHx4fHh8eHx4fHh8eHx4fHh8eHx4fHg0KDQpbS2V5XQ0KVlI9MDAwMDAwMDAaW9ucz1Ecl dlYlVuaXgsTWFpbERhZW1vblVuaXgNCkNyZWF0ZWQ9MjAwNi0wNC0xMSAoMDc6MDcpIFVU Qw0KRXhwaXJlcz0yMDA2LTA1LTExICgwNzowNykgVVRDDQpTdWJzY3JpcHRpb25FeHBpcm VzPTIwMDYtMDUtMTEgKDA3OjA3KSBVVEMNCg0KW0RlYWxlcl0NCk51bWJlcj0wMDEwMDAw MDAwDQpOYW1lPVBsZXNrDQpHVj00MzIwMDUNClAxPTg2MUYwRUZBNTRGMjEwMzFBRUNCOD FBRUY4N0E3QTkyRUVEMzRCNTdFNzJERjk5MjNBNkYyRjZBRDY3MM3RUI0OTM4RUZFMjNGQ TM4NkMwNzU5MDYzOTRGOTg1Qg0KDQpbVXNlcl0NCk51bWJlcj0wMTAwNTExNTgwDQpOYW1 lPUFsZXhhbmRlciBLcmFzbm92IChTVy1Tb2Z0LCBJbmMpIChURVNUKQ0KQ29tcHV0ZXJzP TENCkdWPTQzMzAwMw0KDQpbU2V0dGluZ3NdDQpNYWlsU2VydmVyPVllcw0KRmlsZVNlcnZ lcj1Obw0KSW5ldEdhdGV3YXk9Tm8NCkVtYWlsQWRkcmVzc2VzPVVubGltaXRlZA0KVHJhZ mZpY0xpbWl0PVVubGltaXRlZA0KDQpbU2lnbmF0dXJlXQ0KVmFsdWU9NDdFOTg3RDQwMEU 1NzFBNjM5MkFCRDVFOUQ5Qjc5NTgzRkMzMTQ2MzEzMTlGODEzOEFBQjU4QTJCQ0Q4OEM0O UMyNzIxM0NFQTVBREMyMEUNCg==</value> </property> </key_info> </result> .4.Supported Operations 710 Response Samples A positive response received from server can look as follows (the key content is greatly reduced): <packet version="1.2.

This operation is also used for installing additional license keys that allow using Plesk additional features (add-ons) like Acronis True Image.2.4. Therefore. This license key allows to create 1 Client account. server returns positive response packet where the key_info node is missing: <packet version="1. Inc. 1 Domain account and 1 mailbox. For this.4.Supported Operations </get_additional_key> </server> </packet> 711 If no additional license keys are installed. Kaspersky Antivirus. you should obtain a license key from SWsoft. use the lic_install operation. Once you have ordered new license key and received it to your e-mail. to fully use the Plesk control panel as you need.0"> <server> <get_additional_key> <result> <status>error</status> <errcode>1013</errcode> <errtext>Key is not found</errtext> <name>antivir-drweb-4</name> </result> </get_additional_key> </server> </packet> This error was received because the request packet tried to retrieve additional key defined not by its full name (see the value of the name node). or one of its resellers and install it to the control panel. . you can install it to Plesk.2.0"> <server> <get_additional_key> <result> <status>ok</status> </result> </get_additional_key> </server> </packet> A negative response received from server may look as follows: <packet version="1. and so on. Installing License Key Plesk comes with a trial license key which is automatically installed to the control panel.

It specifies if the key that will be installed is an additional key.xsd) and structured as follows:   The license node is required.2.Supported Operations 712 Request Packet Structure A request XML packet installing license key to Plesk contains the lic_install operation node: <packet version="1..4.2.0"> <server> <lic_install> .0"> <server> <lic_install> <license>/RjdfLic1RwpNPkEnLlxNJkJCPzNDWSRDOyVeJDI/MSo1RlFEMD4+VTEzKTk3 S0pfVjFOJTZFXzMpTEVPQC5JRjdUR0RZCk0hMSJYOzYhVFxPI14jTFJPRSlaRFI0VjZWPE YiT1s5T0opJV8+NCMnUigvQ1o7K0U+QEtbISc1MlMqLV0KTSorUDVfMzxHNUkrSksxWzZV NVZJXTc5T18xQVNNNzRXWTo3WVkmW0I/J2AnYC4iJTlTP1grSCdYS0E+RApNPVteRk43RC NAVFpVO0dBO1hZMjo+K0pQNEsiLj5UUDQlLDA7XyVZIVo/QypGJiJcW1FbJF1fVVxUJy5E Ck1HXCpSUzwtUVYoJzwsVV47MT5bJD8wWlgyYCo/KTM0QUJFMmAuOjc7QypMWylfQiFVP0 5PRj05LCY5SkgKTVRTWE9cRi84OUgxJDpgLl5RPEtPPkE4RCUtXU06NixHLi1ZL0ZBVSky VkBVUCgiN0YrKyoyXTJMJ08qVwpNIk4lOyFeLFwmIiQ4NkBgMUEmTDRcWDdJKihZTEMhTE NOJEMiKV0wIzkkSU4qMTEzO1BIJjo4K0U3LzU6Ck0wPCNTUytONjAhQEFROCFbUDI5OktV LlEsMlY9ND1gSjpgJVMjLS4tVzsrRzpAME8yVTpLVmAiT1NHLFAKTVU0SSowNVo1IShEWi pAO10tRlsxQldVSkZSKDcyPjpWLik5I0YzWD0yVTs9NTlNL1dASyglXk5YN1U4UgpNTV8s XD0tRTQuLkBFMVk2I0REUCItXyVMNlRPRkEyTEA7Pl9QO10jUSI6I1tNIzVRU0VZVE1HWD InIzk4Ck1XRUNPVz5CSFUjUSo4K0IvOFlDWSNTLydXSls7KD9VTD8+WzUqQEA5Uic0S1BM JSowOk9fQ0QvQThUVCEKTT1AKiJFKztAKCFXNl9ORDhUVlleOCU5JS8rJzc+JEZUXigzMD s4PDtbNkUpPD8vUiJAREQoTkxUPlQ2JgpNVFdbVz9bT10mVy5FVEkyXD5MPSIkMkRVVipK WTolXVhRTzkoM1tLLSJRJFlXNTRTYEBNWy1UUV09K04wCk1SVWBbLyckXj5KXjsnUzgyRz E3QVUlWilXX0ZCX1BGMkRMSThHXjZBWE5FTUBEMjBgRTomVTpVLy1WRCQKTVtWUyQ+XDcs RUA+XU0hXz4pKFxBJ1JCNUQ6XCEnQjoyPFw</license> </lic_install> </server> </packet> . </lic_install> </server> </packet> The lic_install node is presented by complex type LicenseInstallType (server_input.4. Data type: none. Data type: base64. <packet version="1.. It contains the license key data. The additional_key node is optional. Request Samples This packet installs a license key (the key content is greatly reduced).

It wraps the result of the lic_install operation. The errtext node is optional.4. It returns the execution status of the lic_install operation defining whether installing key has been successfully started or not. Data type: unsignedInt.Supported Operations 713 This request packet installs additional license key (the key content is greatly reduced). Data type: string.xsd). Allowed values: ok | error. The status node is required. The errcode node is optional. Data type: string. <packet version="1.   . It returns the error code when the lic_install operation fails.0"> <server> <lic_install> <license>LS0tLS1CRUdJTiBQTEVTSyBBRERJVElPTkFMIEtFWS0tLS0tCmtleV9udW1iZ XI9J1BMU0swMDA0MTEzNjAwMDEnCmh3aWQ9J25vdC1yZXF1aXJlZCcKa2V5PSc3YzAzZTF lZDhjNjEyMTNhZDZjZmM1NjFmNjc5YTE4MicKbGltX2RhdGU9MApuYW1lPSdzYXBwLVBQV 1NFLTEnCi0tLS0tQkVHSU4gUExFU0sgQURESVRJT05BTCBLRVkgU0lHTkFUVVJFLS0tLS0 KOGM2MGZmZjYxZjUyMWVmYTdlOWZjNDZhNTAzZGJmNDVmZDEyZGZiMWUxY2JlMmYwMGEwZ TVhZmQwMDAzMGE4ZjUyOTk5ZGZmMjNjOGIyZGY2NjRkNTQ2ZWNiYmE1OTFmZGQyNjdkNWI 5OWM1NTgzZTg2N2RkNjNlMmU1ZjMxMzlmOTM3NGNiNTI4MDRhNzE3ZTAzN2Y4MDQzY2QyO DczMDgyMTg1N2QyN2Y2M2VmYjdjNzEzZGE2MDRlYzFlZGRhMWQzYzQ5ODlkZmM1MzU2ODJ lNWQxZGMzZjcxM2NlZTlmNGIzZDRlY2M4Y2MwMWVlNmMyMzU2Y2I1ODlhMDJkZTRkNjYzZ GViNjZlMGRkMDM5MDk3NTEwODk4NDQ3ODJjMGZkMDVjZWViNmYyYmFlNTk2NjczODg1MGR kNmRjYjY5YzEzMmFhYzg0ZWE3MDAwNGViYjUxMjcwNjViMjA2MDQwYmJmNGY2OTdlYTc5O WM2YTcxODhmNTY1MjkwOTA2YzMyNmYxYmM3OWUwMmVlMzk2MzY4MjgwZWEyMzRiODk5NzA wMmY3OWFlZjMyMWMwNjE3OTBmNjIyOGVhMTBjOGQyOTlhM2JhMjViMjk5NGM5ZTg1NjFlZ DVmNDBiODQyYWMzMTYxZGE2OWZlOWM2ZDIzZGUzNWJlMTExNjk2MmIKLS0tLS1FTkQgUEx FU0sgQURESVRJT05BTCBLRVktLS0tLQ==</license> <additional_key/> </lic_install> </server> </packet> Response Packet Structure The lic_install node of the response packet is structured as follows:   The result node is required.2. Data type: resultType (common. It returns the error message if the lic_install operation fails.

br /&gt. &lt.) Administrator's personal information and settings list of supported network interfaces information on server services and their current state settings of traffic usage statistics list of shells installed on server . Getting Server Information You can get various information about Plesk server and its configuration using Plesk API RPC protocol. The response packet was formed basing on the agent_output.4.b&gt.</errtext> </result> </lic_install> </server> <output>&lt. on line &lt. clients. that's why the output node appears.Warning&lt. etc.b&gt.php&lt.xsd schema.4.Supported Operations 714 Response Samples A positive response received from server looks as follows: <packet version="1.b&gt.: Key read error 2: Key test failed in &lt./b&gt.0"> <server> <lic_install> <result> <status>error</status> <errcode>1020</errcode> <errtext>The uploaded key file is not valid or does not contain a license key.&lt.2. </output> </packet> Such error is received if the request packet tried to install an invalid license key./b&gt. that is          Plesk license key data full host name detailed information on Plesk and OS versions installed on server statistics on server resources usage and Plesk logical objects (domains.br /&gt.195&lt./opt/psa/admin/plib/api-rpc/AgentServer./b&gt.2.0"> <server> <lic_install> <result> <status>ok</status> </result> </lic_install> </server> </packet> A negative response received from server can look as follows: <packet version="1.

It retrieves Plesk license key... </get> </server> </packet> The get node is presented by complex type getType (server_input.xsd). .0"> <server> <get> .2. use the get operation with appropriate parameter specified. Data type: none (common.Supported Operations 715 To retrieve any of the data listed above.4.xsd) and structured as follows:  The key node is optional. Request Packet Structure and Samples A request XML packet retrieving information on server and Plesk configuration contains the get operation node: <packet version="1.

Mail service and so on. It retrieves Plesk and OS versions. The interfaces node is optional.xsd). The prefs node is optional. For example.2. Data type: none (common.xsd). include the corresponding child nodes to your request. namely. Data type: none (common. Data type: none (common. FTP service. as follows: <packet version="1.xsd). statistics and preferences. It retrieves session idle time. send the following request packet: <packet version="1.xsd).0"> <server> <get> <key/> <components/> </get> </server> </packet> To retrieve server general information. Data type: none (common.xsd). send a request packet with empty get node. Data type: none (common. Data type: none (common. It retrieves shells installed on the server and available for choice when configuring a domain's physical hosting.2.4.xsd).    To retrieve all server information.xsd).4. The admin node is optional. It retrieves current state of the server services. Data type: none (common. send the following request packet: <packet version="1. The stat node is optional.0"> <server> <get> <gen_info/> <stat/> <prefs/> </get> </server> </packet> .4. It retrieves software components installed on the server and managed by the Plesk control panel.0"> <server> <get/> </server> </packet> To retrieve a specific information. and statistics on the server resources usage and Plesk logical objects. The services_state node is optional. It retrieves Plesk Administrator's personal information and settings.xsd).Supported Operations 716       The gen_info node is optional. It retrieves such server preferences as settings of traffic usage statistics and apache restart interval.xsd). It retrieves general server info which is now presented by the server name.2. The shells node is optional. to retrieve currently installed components and license key. such as DNS service. The session_setup node is optional. Data type: none (common. Data type: none (common. the amount of time a session with Plesk should stay valid when no actions are performed. The components node is optional. It retrieves network interfaces supported by the server.

The errtext node is optional.xsd). Allowed values: ok | error.xsd). It returns the execution status of the get operation.Supported Operations 717 Response Packet Structure and Samples The get node of the response packet is structured as follows:      The result node is required.  The key (see page 718) node returns a collection of data describing Plesk license key defining the way Plesk can be used on the server. Data type: GetResultType (server_output. It returns the error code when the get operation fails. It wraps the result of the get operation. Data type: string. The status node is required. The errcode node is optional. Data type: string. It returns the error message if the get operation fails. Data type: unsignedInt. a request packet sent to a server determines if any of them present in the response packet. Data type: keyType (plesk_server. Other nodes are optional. .

Supported Operations 718  The gen_info (see page 726) node returns a collection of data describing general server info which is now presented by the server name.5. The other way is parameter-undependable.0 and later versions you should retrieve components of a license key according to the following XML schema: .xsd). Data type: interfacesType (plesk_server. For information on the node structure and response samples. Data type: serverSessionSetup (plesk_server.xsd). Data type: statType (plesk_server.0 and Later In the API RPC v.1.xsd).xsd).0. refer to the Administrator Personal Information (see page 697) section.1. The way used in the API RPC v.  License Key Starting from API RPC 1. The stat (see page 730) node returns a collection of data describing in detail Plesk and OS versions.0. Data type: componentsType (plesk_server. The interfaces (see page 739) node returns a collection of data describing network interfaces supported by the server.5. For information on the node structure and response samples. Mail service and so on. Data type: servicesState (plesk_server.0.1.xsd). The session_setup (see page 743) node returns session idle time.xsd). refer to the Server Preferences (see page 699) section.xsd). The prefs node returns a collection of data describing such server preferences as settings of traffic usage statistics and apache restart interval. Data type: adminType (plesk_server. The components (see page 726) node returns a collection of data describing software components installed on the server and managed by the Plesk control panel. namely.0 and earlier versions is parameterdependable. Data type: serverGenInfoType (plesk_server. The admin node returns a collection of data describing Plesk Administrator's personal information.0. API RPC v.4. there are two possible ways of retrieving license key parameters.xsd). such as DNS service.5.2. the amount of time a session with Plesk should stay valid when no actions are performed. Data type: serverPrefs (plesk_server. The services_state (see page 740) node returns a collection of data describing current state of the server services. and statistics on the server resources usage and Plesk logical objects. Data type: ShellsList (server_output.        The shells node returns a collection of data describing shells installed on the server and available for choosing when configuring a domain's physical hosting.xsd). FTP service.

0000</value> </property> <property> <name>product_version</name> <value>8..5.xsd).00000000.0"> <server> <get> <result> <status>ok</status> <key> <property> <name>plesk_key_id</name> <value>plsk.  An XML response packet received from server can look as follows: <packet version="1. It specifies a license key parameter value.Supported Operations 719  The property node is required.1</value> </property> . It specifies parameters of a license key. Data type: sting. The value node is required.. Data type: anySimple. Data type: keyType (plesk_server. </key> </result> </get> </server> </packet> .0.  The name node is required. It specifies a license key parameter name.

in format YYYY-MM-DD.xsd).0 and Earlier License key properties are held by the key node represented by the complex type keyType (plesk_server. . Data type: string. The prod_type node is optional. It returns the maximum number of slave Plesk servers allowed to be registered with Plesk 'Master' feature.1. The node is structured as follows:     The plesk_key_id node is required. It returns the name of the product for which the license key is created. the value is "0".0.2. The lim_slaves node is required. Data type: unsignedInt.Supported Operations 720 API RPC v. It returns the date when the license key expires. Data type: string. Data type: string. The lim_date node is required. It returns the unique identifier of the license key installed on the server. If the key never expires. Obsolete since Plesk 7.4.

Allowed values: 0 (not allowed) | 1 (allowed). It returns the maximum number of Client accounts allowed on the server. Data type: integer.Supported Operations 721        The lim_cl node is required. Allowed values: 0 | 1. It returns the maximum number of Web User accounts allowed on the server. Returned only by Plesk for Unix. Data type: string. Allowed values: 0 | 1 (only for Virtuozzo). It specifies if the Plesk Administrator is allowed to manage accessibility of the MyPlesk. The MPCID node is required. Allowed values: 0 (not available) | 1 (available). The key_cl_tmpl node is required. The lim_dom node is required. Allowed values: 0 (= the functionality is available) | 1. It specifies if the license key is valid only for Plesk running on Virtuozzo. Allowed values: 0 (not available) | 1 (available). It specifies if the Client Template (see page 88) feature is available. Returned only by Plesk for Windows. Data type: short. The noMngMPC node is required. Data type: integer. The