Parallels Plesk Panel

®

Copyright Notice
ISBN: N/A Parallels 660 SW 39th Street Suite 205 Renton, Washington 98057 USA Phone: +1 (425) 282 6400 Fax: +1 (425) 282 6444 © Copyright 1999-2008, Parallels, Inc. 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 technology protected by U.S.Patents 7,328,225; 7,325,017; 7,293,033; 7,099,948; 7,076,633. Patents pending in the U.S. Product and service names mentioned herein are the trademarks of their respective owners.

Contents
Preface 10

About This Document .................................................................................................................. 10 Who Should Read This Document .............................................................................................. 11 Prerequisites for This Document ................................................................................................. 11 Typographical Conventions ......................................................................................................... 11 Feedback ..................................................................................................................................... 12

Resellers in Plesk 9: Backward Compatibility Before Using The Reference

13 14

XSD Representation Conventions ............................................................................................... 14 Data Types .................................................................................................................................. 15 API RPC Schemas Location ....................................................................................................... 16 How to Analyze API RPC Schema .............................................................................................. 16

API RPC Evolution API RPC Change History

20 22

Plesk 9 ......................................................................................................................................... 23

XML Schemas for API RPC Operators

29

v.1.4.0.0 ....................................................................................................................................... 29 v.1.4.1.0 ....................................................................................................................................... 31 v.1.4.1.1 ....................................................................................................................................... 32 v.1.4.1.2 ....................................................................................................................................... 34 v.1.4.2.0 ....................................................................................................................................... 35 v.1.5.0.0 ....................................................................................................................................... 37 v.1.5.1.0 ....................................................................................................................................... 39 v.1.5.2.0 ....................................................................................................................................... 41 v.1.5.2.1 ....................................................................................................................................... 43 v.1.6.0.0 ....................................................................................................................................... 45

Representation of Object Descriptor

47

Filters of Descriptors.................................................................................................................... 48 Property Descriptor...................................................................................................................... 49 Extension of Permissions Descriptor ................................................................................ 51 Extension of Hosting Settings Descriptor .......................................................................... 52 Extension of Limits Descriptor ........................................................................................... 54 Bind Parameters .......................................................................................................................... 55

Supported Operations

57

Preface Managing Client Accounts ........................................................................................................... 58 Filtering Issues .................................................................................................................. 60 Client Settings ................................................................................................................... 63 Creating Client Account .................................................................................................... 81 Getting Information About Client Accounts ....................................................................... 87 Deleting Client Accounts ................................................................................................... 95 Setting Client Account Properties ................................................................................... 100 Adding IP Addresses to Client‘s IP Pool ......................................................................... 107 Removing IP Addresses from the Client‘s IP Pool .......................................................... 109 Listing Buttons Displayed on the Client‘s Page in Control Panel .................................... 112 Retrieving Descriptor of Limits ........................................................................................ 119 Retrieving Descriptor of Permissions .............................................................................. 125 Upgrading Client Account to Reseller Account ............................................................... 129 Changing Client Account Owner ..................................................................................... 132 Managing Client Templates ....................................................................................................... 135 Client Template Settings ................................................................................................. 136 Filtering Issues ................................................................................................................ 142 Creating Client Template ................................................................................................ 144 Retrieving Information on Client Templates .................................................................... 148 Removing Client Templates ............................................................................................ 153 Updating Client Template Settings ................................................................................. 157 Managing Database Servers ..................................................................................................... 162 Adding Database Server ................................................................................................. 164 Changing Database Server Preferences ........................................................................ 170 Detaching Database Servers .......................................................................................... 175 Setting Default Database Server..................................................................................... 180 Retrieving Default Database Server Info ........................................................................ 184 Retrieving Database Server Parameters ........................................................................ 189 Retrieving Supported Types Of Databases .................................................................... 195 Retrieving Local Database Servers Info ......................................................................... 198 Managing Databases ................................................................................................................ 202 Filtering Issues ................................................................................................................ 204 Creating Databases ........................................................................................................ 205 Deleting Databases ......................................................................................................... 211 Creating Database Users ................................................................................................ 216 Assigning Database Administrator .................................................................................. 221 Retrieving Database Administrator Info .......................................................................... 224 Retrieving Information About Databases ........................................................................ 230 Changing Database User Credentials ............................................................................ 237 Retrieving Database Users Info ...................................................................................... 242 Deleting Database Users ................................................................................................ 246 Managing Desktop Presets ....................................................................................................... 251 Changing Plesk Administrator Preset ............................................................................. 252 Choosing Default Preset ................................................................................................. 255 Retrieving Preset Preferences ........................................................................................ 260 Adding Preset .................................................................................................................. 265 Removing Preset ............................................................................................................. 270 Managing DNS .......................................................................................................................... 276 Filtering Issues ................................................................................................................ 279 Managing DNS Records ................................................................................................. 282 Managing ACL................................................................................................................. 304 Managing SOA Records and Zone Parameters ............................................................. 315 Managing Name Servers ................................................................................................ 329 Managing Local or Remote DNS Servers ....................................................................... 350 Managing DNS Recursion ............................................................................................... 368 Managing Domain Accounts ..................................................................................................... 377 Filtering Issues ................................................................................................................ 379 Domain Settings .............................................................................................................. 383 Creating Domain Account ............................................................................................... 422

4

Preface Getting Information About Domain Accounts .................................................................. 429 Deleting Domain Accounts .............................................................................................. 440 Setting Domain Parameters ............................................................................................ 445 Getting the Domain Buttons List ..................................................................................... 453 Getting Traffic Usage Information ................................................................................... 459 Setting Domain Traffic Settings ....................................................................................... 468 Retrieving Descriptor of Limits ........................................................................................ 472 Retrieving Descriptor of Permissions .............................................................................. 478 Retrieving Descriptor of Hosting Settings ....................................................................... 482 Managing Domain Aliases ......................................................................................................... 487 Domain Alias Settings ..................................................................................................... 489 Filtering Issues ................................................................................................................ 491 Creating Domain Aliases ................................................................................................. 492 Retrieving Information On Domain Aliases ..................................................................... 497 Updating Domain Aliases Settings .................................................................................. 503 Deleting Domain Aliases ................................................................................................. 508 Renaming Domain Aliases .............................................................................................. 512 Retrieving Information On Manageable Services ........................................................... 515 Managing Domain Templates ................................................................................................... 516 Domain Template Settings .............................................................................................. 517 Filtering Issues ................................................................................................................ 522 Creating Domain Template ............................................................................................. 524 Getting Information On Domain Templates .................................................................... 532 Configuring Domain Template Settings .......................................................................... 539 Deleting Domain Template.............................................................................................. 549 Managing FTP Accounts ........................................................................................................... 555 FTP Account Permissions ............................................................................................... 556 Filtering Issues ................................................................................................................ 556 Creating FTP Accounts ................................................................................................... 560 Retrieving Information On FTP Accounts ....................................................................... 568 Changing FTP Account Settings ..................................................................................... 575 Deleting FTP Accounts ................................................................................................... 582 Managing IP Addresses ............................................................................................................ 587 Adding IP Address .......................................................................................................... 588 Retrieving IP addresses .................................................................................................. 593 Changing Type ................................................................................................................ 596 Removing IP .................................................................................................................... 600 Managing Locales ..................................................................................................................... 605 LP Names........................................................................................................................ 606 Filtering Issues ................................................................................................................ 606 Retrieving List of LP's...................................................................................................... 608 Installing LP ..................................................................................................................... 614 Retrieving Localized Messages ...................................................................................... 617 Removing LP ................................................................................................................... 622 Enabling LP ..................................................................................................................... 627 Disabling LP .................................................................................................................... 632 Locale Codes .................................................................................................................. 637 Managing Log Rotation on Domain ........................................................................................... 640 Log Rotation Settings ...................................................................................................... 641 Filtering Issues ................................................................................................................ 642 Changing Log Rotation Settings ..................................................................................... 644 Retrieving Log Rotation Settings..................................................................................... 650 Enabling Log Rotation Service ........................................................................................ 656 Disabling Log Rotation Service ....................................................................................... 662 Checking Status of Log Rotation Service ....................................................................... 667 Managing Mail on Domain Level ............................................................................................... 673 Mail Service Preferences ................................................................................................ 675 Mail Account Settings ...................................................................................................... 677 Filtering Issues ................................................................................................................ 690

5

Preface Creating Mail Accounts ................................................................................................... 691 Modifying Mail Account Settings ..................................................................................... 696 Getting Mail Account Settings ......................................................................................... 703 Deleting Mail Accounts .................................................................................................... 708 Enabling/Disabling Mail Service on Domain ................................................................... 712 Setting Mail Service Preferences .................................................................................... 717 Getting Mail Service Preferences.................................................................................... 721 Renaming Mail Accounts ................................................................................................ 725 Managing Mailing Lists .............................................................................................................. 728 Filtering Issues ................................................................................................................ 730 Adding Mailing List .......................................................................................................... 733 Removing Mailing List ..................................................................................................... 739 Adding Subscriber to Mailing List .................................................................................... 744 Retrieving Mailing Lists ................................................................................................... 749 Retrieving Subscribers' Info ............................................................................................ 754 Removing Subscriber ...................................................................................................... 759 Activating Mailing Lists Service ....................................................................................... 764 Deactivating Mailing Lists Service................................................................................... 769 Enabling Mailing List ....................................................................................................... 774 Disabling Mailing List ...................................................................................................... 779 Retrieving Status of Mailing Lists Service ....................................................................... 783 Managing Plesk Backups .......................................................................................................... 789 Remote Storage Settings ................................................................................................ 791 Retrieving Remote Storage Settings ............................................................................... 792 Changing Remote Storage Settings ............................................................................... 797 Creating Domain-level Backup Task ............................................................................... 800 Creating Client-level Backup Task .................................................................................. 805 Creating Reseller-level Backup Task .............................................................................. 809 Creating Server-level Backup Task................................................................................. 813 Retrieving Backup Task Status ....................................................................................... 817 Retrieving List of Local Backups ..................................................................................... 822 Adding Backup to Repository .......................................................................................... 827 Downloading Backup ...................................................................................................... 831 Retrieving Protocols Supported by Backup Manager ..................................................... 834 Cancelling Backup Tasks ................................................................................................ 836 Removing Backup ........................................................................................................... 839 Managing Plesk Server ............................................................................................................. 842 Administrator Personal Information ................................................................................. 844 Server Preferences ......................................................................................................... 847 Getting Supported Protocols ........................................................................................... 850 Performing Initial Server Setup ....................................................................................... 851 Managing Plesk License ................................................................................................. 855 Getting Server Information .............................................................................................. 865 Setting Up Server ............................................................................................................ 897 Managing Plesk Services ................................................................................................ 901 Managing Plesk Updates .......................................................................................................... 905 Checking Updater Status ................................................................................................ 906 Retrieving Plesk Updates ................................................................................................ 908 Retrieving Components List ............................................................................................ 911 Installing Components ..................................................................................................... 916 Updating Plesk ................................................................................................................ 919 Managing Protected Directories ................................................................................................ 922 Filtering Issues ................................................................................................................ 923 Creating Protected Directory ........................................................................................... 926 Changing Protected Directory Properties ....................................................................... 930 Removing Protected Directory ........................................................................................ 938 Retrieving Protected Directory Properties ....................................................................... 942 Creating Protected Directory User .................................................................................. 948 Changing Protected Directory User Settings .................................................................. 952

6

Preface Removing Protected Directory User ............................................................................... 957 Retrieving Protected Directory User Settings ................................................................. 961 Retrieving Descriptor of Protected Directory Properties ................................................. 965 Managing Reseller Accounts ..................................................................................................... 970 Reseller Settings ............................................................................................................. 972 Filtering Issues ................................................................................................................ 980 Creating Reseller Accounts ............................................................................................. 982 Setting Reseller Account Properties ............................................................................... 987 Retrieving Information on Reseller Accounts .................................................................. 992 Removing Reseller Accounts .......................................................................................... 999 Adding IP Addresses to Reseller's IP Pool ................................................................... 1003 Removing IP Addresses from Reseller's IP Pool .......................................................... 1007 Changing IP Address Type in Reseller's IP Pool .......................................................... 1010 Changing Types of Application Packages in Reseller's Application Pool ..................... 1013 Viewing Buttons Displayed on Reseller's Home Page in Control Panel ...................... 1016 Retrieving Descriptor of Limits ...................................................................................... 1021 Retrieving Descriptor of Permissions ............................................................................ 1024 Downgrading Reseller Account to Client Account ........................................................ 1027 Managing Reseller Templates ................................................................................................. 1030 Reseller Template Settings ........................................................................................... 1031 Filtering Issues .............................................................................................................. 1034 Creating Reseller Template .......................................................................................... 1035 Retrieving Information About Reseller Templates ........................................................ 1039 Removing Reseller Templates ...................................................................................... 1043 Setting Reseller Template Properties ........................................................................... 1046 Managing Secret Keys ............................................................................................................ 1050 Creating Secret Key ...................................................................................................... 1051 Retrieving Info on Secret Keys...................................................................................... 1055 Removing Secret Key ................................................................................................... 1060 Managing Sessions ................................................................................................................. 1065 Retrieving Sessions List ................................................................................................ 1065 Terminating Session ..................................................................................................... 1068 Managing Web Applications .................................................................................................... 1072 History of Changes ........................................................................................................ 1074 Web Application Properties ........................................................................................... 1075 Retrieving List of All Web Applications ......................................................................... 1076 Viewing Application Pool ............................................................................................... 1079 Adding Web Application to Application Pool ................................................................. 1083 Removing Web Applications ......................................................................................... 1087 Retrieving List of Packages Available For Domain ....................................................... 1091 Changing Properties of Web Application ...................................................................... 1096 Retrieving Web application Requirements .................................................................... 1100 Installing Web Application ............................................................................................. 1106 Managing Spam Filtering Service ........................................................................................... 1111 Filtering Issues .............................................................................................................. 1113 About Spam Filtering ..................................................................................................... 1115 Adding Pattern............................................................................................................... 1119 Removing Pattern ......................................................................................................... 1125 Retrieving Patterns ........................................................................................................ 1130 Retrieving Info on Spam Filtering service ..................................................................... 1134 Setting Spam Filtering Preferences .............................................................................. 1140 Retrieving Available Spam Filtering Preferences.......................................................... 1146 Retrieving Allowed Lists ................................................................................................ 1152 Checking Status of Spam Filtering Service ................................................................... 1158 Managing SSL Certificates ...................................................................................................... 1161 Installing Certificate ....................................................................................................... 1162 Deleting Certificate ........................................................................................................ 1168 Generating Certificate ................................................................................................... 1173 Managing SSO Service ........................................................................................................... 1178

7

Preface Filtering Issues .............................................................................................................. 1179 Enabling SSO Service ................................................................................................... 1181 Disabling SSO Service .................................................................................................. 1184 Registering Plesk in IdP ................................................................................................ 1186 Retrieving SSO Service Preferences ............................................................................ 1189 Configuring SSO Branding ............................................................................................ 1191 Adding Delegation Rule ................................................................................................ 1212 Removing Delegation Rule ........................................................................................... 1215 Managing Subdomains ............................................................................................................ 1218 Filtering Issues .............................................................................................................. 1219 Subdomain Properties ................................................................................................... 1220 Creating Subdomain ..................................................................................................... 1222 Retrieving Information on Subdomain ........................................................................... 1226 Changing Subdomain Settings ...................................................................................... 1232 Removing Subdomain ................................................................................................... 1235 Renaming Subdomain ................................................................................................... 1238 Changing Parent Domain .............................................................................................. 1241 Managing User Interface ......................................................................................................... 1245 Setting Up Controls Visibility ......................................................................................... 1246 Managing Custom Buttons ............................................................................................ 1249 Managing Virtual Directories ................................................................................................... 1267 Virtual Directory Settings ............................................................................................... 1268 Creating Virtual Directories ........................................................................................... 1275 Removing Virtual Directories......................................................................................... 1280 Managing Web Users .............................................................................................................. 1284 Web User Settings and Preferences ............................................................................. 1285 Filtering Issues .............................................................................................................. 1289 Creating Web Users ...................................................................................................... 1291 Deleting Web Users ...................................................................................................... 1296 Updating Web User Settings ......................................................................................... 1302 Retrieving Web Users Settings .................................................................................... 1308 Retrieving Web Users Preferences ............................................................................... 1314 Updating Web Users Preferences................................................................................. 1319 Migrating Domain And Client Accounts ................................................................................... 1325 IP Addresses Mapping .................................................................................................. 1327 Databases Mapping ...................................................................................................... 1329 Checking Plesk Migration Manager Installation ............................................................ 1331 Retrieving File System Information ............................................................................... 1333 Starting Migration .......................................................................................................... 1335 Retrieving Migration Status ........................................................................................... 1350 Stopping Migration ........................................................................................................ 1356 Retrieving Action Log Data ...................................................................................................... 1360 Retrieving Action Log .................................................................................................... 1361 Retrieving ID of Last Action ........................................................................................... 1366 Uploading Files to Server ........................................................................................................ 1368 Uploading Files Using cURL ......................................................................................... 1368 Uploading Files Using PHP ........................................................................................... 1370 Uploading Files Using .NET .......................................................................................... 1371 Response Packet Structure .......................................................................................... 1375 Response Samples ....................................................................................................... 1376

8

Preface

9

Error Codes

1377

Reduced List of Error Codes ................................................................................................... 1378 Complete List of Error Codes .................................................................................................. 1379 Common errors ............................................................................................................. 1383 Client Operations .......................................................................................................... 1384 Domain Operations ....................................................................................................... 1386 IP Operations ................................................................................................................ 1388 DNS Operations ............................................................................................................ 1390 Server Operations ......................................................................................................... 1392 Web Application Operations .......................................................................................... 1394 Email Operations ........................................................................................................... 1395 Certificate Operations ................................................................................................... 1395 UI Operations ................................................................................................................ 1396 Upload Operations ........................................................................................................ 1397 Secret Key Operations .................................................................................................. 1397 Spam Filter Operations ................................................................................................. 1398 Domain Alias Operations .............................................................................................. 1398 Database Server Operations......................................................................................... 1399 Migration Operations ..................................................................................................... 1399

10

Preface

Preface
In this section:
About This Document ........................................................................................ 10 Who Should Read This Document .................................................................... 11 Prerequisites for This Document ....................................................................... 11 Typographical Conventions ............................................................................... 11 Feedback .......................................................................................................... 12

About This Document
This part of Plesk API RPC documentation describes in detail the programming means provided by Plesk API.    Chapter Before Using Reference (on page 14) contains information required for proper reading of the reference sections. Chapter Representation of Object Descriptors (see page 47) 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 contains references on what XML Schemas are used for each API RPC operation depending on the API RPC version. Chapter Error Codes (see page 1377) provides information on codes of the errors that may occur when using Plesk API RPC protocol.

 

This document covers the following versions of the API RPC protocol: 1.3.5.1 - 1.6.0.0. In most code samples, the 1.4.2.0 version of the protocol is used. If a feature is supported only in later versions of API RPC, the earliest version of the protocol that supports the feature is used in code samples.

Preface

11

Who Should Read This Document
This part of Plesk API RPC documentation is addressed to the developers who want to implement a kind of a remote Plesk manager or other software capable of managing Plesk objects remotely.

Prerequisites for This Document
Users of this document should be familiar with the following:      Plesk functionality and business logic. Plesk API RPC protocol (idea, usage). Refer to the Plesk API RPC Developer's Guide. HTTP messages (types, structure). Refer to the RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt). XML basics (idea, syntax, elements, attributes). Refer to the W3Schools XML Tutorial (http://www.w3schools.com/xml/default.asp). XML Schema (idea, simple and complex elements, XSD indicators, data types). Refer to the W3Schools XML Schema Tutorial (http://www.w3schools.com/schema/default.asp).

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 Example Go to the QoS tab. Read the Basic Administration chapter.

Emphasizes the importance of The system supports the so a point, to introduce a term or called wildcard character to designate a command line search. placeholder, which is to be replaced with a real name or value. The names of commands, files, and directories. The license file is located in the httpdocs/common/license s directory.

Monospace

12

Preface On-screen computer output in # ls –al /files your command-line sessions; total 14470 source code in XML, C++, or other programming languages. What you type, contrasted with # cd /root/rpms/php 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. SHIFT, CTRL, ALT

Preformatted

Preformatted Bold CAPITALS

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 using the online form at http://www.parallels.com/en/support/usersdoc/. 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.

CHAPTER 1

Resellers in Plesk 9: Backward Compatibility
The Plesk 9 backward compatibility prevents malfunctioning of client applications which interact with Plesk 9 through old versions of API RPC(<1.6.0.0) and hence cannot sufficiently accommodate changes in Plesk business logic. For these applications, we modified the behavior of some operations to fit new Plesk business logic. Most modifications are operation specific, some modifications are common for all operations. The common modification are as follows:  Plesk Administrator accesses personal objects (domain accounts, domain templates) by specifying admin as a Plesk client login name. Hence, in some situations Plesk Administrator now acts like a Plesk client. We will refer to this client account as to the artificial client account. You cannot modify or remove this account. Plesk reseller accounts are treated as Plesk client accounts.

Each operation-specific modification is described in the corresponding sub-section of the Supported Operations chapter.

CHAPTER 2

Before Using The Reference
This section contains information required for proper reading of the reference sections.    The XSD Representation Conventions (on page 14) section explains designations used in graphical representation of XML objects described in the current document. The Data Types (on page 15) section contains classification of object types described in the current document. The API RPC Schemas Location (on page 16) section explains how to access the whole set of XSD schemas, or find a schema for a specific operator supported by the API RPC protocol. The How to Analyze API RPC Schema (on page 16) 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 ......................................................................14 Data Types ........................................................................................................15 API RPC Schemas Location ..............................................................................16 How to Analyze API RPC Schema .....................................................................16

XSD Representation Conventions
Description of each operation supported by the protocol includes the Request Packet Structure and the Response Packet Structure sections. The first section contains graphical representation of an XML schema used to create a request packet that is to be sent to the server to perform an operation. The second section contains graphical representation of an XML schema used to create a response packet from the server with the result of the operation. To represent the XML schemes graphically, the Altova XMLSpy rules and agreements are used. For details on the rules and agreements, visit the following URL: http://www.altova.com/manual2007/XMLSpy/spyenterprise/contentmodelview.htm.

Before Using The Reference

15

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 is presented in the following table.
Type string short integer unsignedInt unsignedLong long base64 boolean byte date dateTime Definition Sequence of 1..255 characters Examples mytext, a, ppp

Integer numbers from -2^15 to 2^15- -167, 2880, 310 1* 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 the n-th power.

16

Before Using The Reference

API RPC Schemas Location
All XSD files which define the format of XML documents for API RPC packets content are packed to the archive schemas.zip and available for downloading at http://download1.parallels.com/Plesk/Plesk9.0/Doc/schemas.zip. The archive contains a separate folder with a set of API RPC schemas for each protocol version supported by Plesk. To know which schemas are used for a specific operator, refer to the XML Schemas for API RPC Operators (on page 29) chapter.

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,

Before Using The Reference

17

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:

18

Before Using The Reference

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.

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.

Before Using The Reference

19

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. 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.

20

API RPC Evolution

API RPC Evolution
The table below demonstrates the main stages of Plesk API RPC evolution and enumerates new features added to the protocol along with each new version of Plesk.
API RPC version Plesk version Plesk 7.5.1 for Linux/Unix New supported objects Client DNS record Domain Event logging IP address Server Plesk 7.5.2 for Linux/Unix 1.3.5.0 Plesk 7.5.3 for Linux/Unix Web application SSL certificate Email service Custom button Upload 1.3.5.1 1.4.0.0 Plesk 7.5.4 for Linux/Unix Plesk 7.5.6 for Linux/Unix Database server Desktop Domain alias Migration Secret key Spam filter 1.4.1.0 1.4.1.1 Plesk 8.0 for Linux/Unix, Plesk 7.6 for Windows Plesk 7.6.1 for Windows Client template Domain template Virtual directory

API RPC Evolution

21

API RPC version 1.4.2.0

Plesk version Plesk 8.1 for Linux/Unix, Plesk 8.1 for Windows

New supported objects Database Mailing list Web user Additional FTP account

1.5.0.0

Plesk 8.1.1 for Linux/Unix, Plesk 8.1.1 for Windows

Descriptor Locale Log rotation Session

1.5.1.0

Plesk 8.2 for Linux/Unix, Plesk 8.2 for Windows Plesk 8.3 for Linux/Unix, Plesk 8.3 for Windows Plesk 8.4 for Linux/Unix, Plesk 8.4 for Windows, Plesk 8.6 for Linux/Unix, Plesk 8.6 for Windows Plesk 9.0 for Linux/Unix, Plesk 9.0 for Windows

Backup Protected directory Subdomain none

1.5.2.0 1.5.2.1

1.6.0.0

Reseller Reseller template

CHAPTER 3

API RPC Change History
The following is a summary of changes made to the API RPC protocol since v.1.6.0.0. The changes are listed with the most recent first. The next paragraph explains how these changes are grouped. Changes are first grouped by Plesk version and then are divided into two categories:   Changes between two last versions of the protocol (subsection last version->current version) Changes to earlier versions of the protocol caused by changes in logic of a new Plesk version (subsection Changes to Earlier Versions).

These two groups are further categorized by Plesk features that required modifying operators and/or operations. Each set of feature-dependant changes is fit into a separate table and sequenced in alphabetical order. Thus, if you use Plesk 9 through API RPC 1.5.0.0 and want to see changes to API RPC 1.5.0.0 driven by the Plesk 9 backward compatibility feature, refer to subsection Plesk 9 > Changes to Earlier Versions, table "Feature: Plesk 9 backward compatibility". Each feature-dependant table consists of the following columns:    Option - defines whether an operator/operation/parameter is added ("+"), modified ("*"), or deprecated ("-"). Operator - contains the name of the operator affected by the feature. Operation - contains the name of the operation affected by the feature. The operation name is omitted in the following cases:      New operator is added Operator is removed Feature modifies the behavior of an entire operator Feature modifies the XSD complex type that is not explicitly related to an operation (Example: filters).

Type/File - contains the name of an XSD complex type affected by the feature. This name helps to determine whether request, response or both packet structures are changed. If the complex type name is changed, the new name is given. If an operation description is changed, and new description does not use any named complex types, the XSD file which contains the operation description is given. The type/file name is omitted in the following cases:   Operation description is left unaffected. Operation is added or deprecated.

Note: The summary of changes does not explicitly track changes in complex type names

API RPC Change History

23

Parameter - contains the affected parameter. This value is present only if Operation or Type/Filename values are provided. If the operation name or both values are set, the path to the parameter is given relatively the operation node. Otherwise, the path is given relatively to the XML element described by the type. We use XPath notations to address the parameter. Comment - contains short description of a change. In case an operator, operation or parameter is deprecated, this field contains brief instructions on what functionality can be used instead.

In this chapter:
Plesk 9 ...............................................................................................................23

Plesk 9
1.6.0.0 Feature: Resellers
Option + + + + + + + + + + * + + + + Operator client client client client client client client client client client clienttemplate clienttemplate clienttemplate clienttemplate clienttemplate ClientTemplatePref erencesType ClientTemplateAddI nputType ClientTemplateAddI nputType ClientTemplateGetI nputType shared owner-id owner-login owner-id add add get convert-toreseller change-owner clientSelectionFilter owner-id Type clientSelectionFilter owner-login Type clientSelectionFilter guid Type clientAddGenInfo owner-id clientAddGenInfo clientGetGenInfo clientLimits owner-login owner-id resourcepolicy Now resellers can use this operator Operation Type/File Parameter Comment Now resellers can use this operator

add add get

24

API RPC Change History

Option + + + + + * * + + + + + + + + + + +

Operator

Operation

Type/File ClientTemplateGetI nputType ClientTemplateDelI nputType ClientTemplateDelI nputType ClientTemplateSetI nputType ClientTemplateSetI nputType SetDefaultPresetIn putCommandType

Parameter owner-login owner-id owner-login owner-id owner-login type

Comment

clientget template clientdel template clientdel template clientset template clientset template desktop set-default-preset domain domain domain domain domain domain domain domain domain domain domain domain domain domain domain domain domain domaintemplate domaintemplate add add add add add get get set set set

Add "reseller" Now resellers can use this operator

domainFilterType domainFilterType domainFilterType domainFilterType domainFilterType domainFilterType domainFilterType

guid client_id owner-id domain_name Use domainname instead domain-name client_login owner-login /gen_setup/cli ent_id /gen_setup/ow ner-id /gen_setup/ow ner-login Use owner-id instead Use owner-login instead Use owner-id instead

domainGenInfoTyp client_id e domainGenInfoTyp owner-id e setGenSetupType client_id setGenSetupType setGenSetupType domainLimits owner-id owner-login overuse

Use owner-id instead

Use owner-id instead

DomainTemplateAd client-id dInputType DomainTemplateAd owner-id dInputType

Use owner-id instead

API RPC Change History

25

Option + + + + + + + *

Operator domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate domaintemplate event_log

Operation add add get get get get set set set set del del del del get_events

Type/File

Parameter

Comment Use owner-login instead

DomainTemplateAd client-login dInputType DomainTemplateAd owner-login dInputType DomainTemplateG client-id etInputType DomainTemplateG owner-id etInputType DomainTemplateG client-login etInputType DomainTemplateG owner-login etInputType DomainTemplateSe client-id tInputType DomainTemplateSe owner-id tInputType DomainTemplateSe client-login tInputType DomainTemplateSe owner-login tInputType DomanTemplateDe client-id leteInputType DomanTemplateDe owner-id leteInputType DomanTemplateDe client-login leteInputType

Use owner-id instead

Use owner-login instead

Use owner-id instead

Use owner-login instead

Use owner-id instead

Use owner-login instead

DomanTemplateDe owner-login leteInputType EventLogResponse /result/event/cl Classes Type ass reseller_* are added New operator added New operator added

+ +

reseller resellertemplate

Feature: New backup functionality
Option + + Operator backup backup Operation get-remotestorage-settings get-remotestorage-settings Type/File Parameter Comment

BackupGetRemote reseller-id StorageSettingsInp ut BackupGetRemote reseller-login StorageSettingsInp ut

26

API RPC Change History

Option + + + + + + + + + + + + + + + + + + -

Operator backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup

Operation get-remotestorage-settings get-remotestorage-settings set-remotestorage-settings set-remotestorage-settings set-remotestorage-settings set-remotestorage-settings backup-domain backup-domain backup-domain backup-domain backup-domain backup-domain backup-client backup-client backup-client backup-client backup-client backup-client backup-client backup-client backup-client backup-reseller backup-server get-backup-status

Type/File BackupGetRemote StorageSettingsInp ut BackupGetRemote StorageSettingsOut put BackupSetRemote StorageSettingsInp ut BackupSetRemote StorageSettingsInp ut BackupSetRemote StorageSettingsInp ut BackupSetRemote StorageSettingsInp ut BackupDomainInpu t BackupDomainInpu t BackupDomainInpu t BackupDomainInpu t BackupDomainInpu t

Parameter server /result/settings /passive-mode reseller-id reseller-login server /settings/passi ve-mode filename prefix only-hosting only-mail onlyconfiguration

Comment

BackupCommandO /result/task-id utput BackupClientInput filename BackupClientInput domain-id BackupClientInput domain-name BackupClientInput all-domains BackupClientInput prefix BackupClientInput only-hosting BackupClientInput only-mail BackupClientInput onlyconfiguration BackupCommandO /result/task-id utput

Use get-tasksinfo instead

API RPC Change History

27

Option + + +

Operator backup backup backup

Operation get-tasks-info

Type/File

Parameter

Comment

get-local-backup- BackupGetLocalBa reseller-id list ckupListInput get-local-backup- BackupGetLocalBa reseller-login list ckupListInput get-local-backup- BackupGetLocalBa server list ckupListInput put-file import-file download-file download-file download-file download-file stop-backup stop-backup stop-backup stop-backup stop-backup get-backupprocesses remove-file remove-file remove-file remove-file BackupRemoveFile Input BackupRemoveFile Input BackupRemoveFile Input BackupRemoveFile Input domain-id domain-name client-id client-login BackupDownloadFil eInput BackupDownloadFil eInput BackupDownloadFil eInput BackupDownloadFil eInput BackupStopInput BackupStopInput BackupStopInput BackupStopInput BackupStopInput domain-id domain-name client-id client-login domain-id domain-name client-id client-login task-id Use get-tasksinfo instead Use import-file instead

+ + + -

backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup

Feature: APS Catalog
+ server serverPrefs aps-catalogurl

28

API RPC Change History

Other updates:
+ + * domaintemplate clienttemplate updater DomainTemplatePr shared eferencesType ClientTemplatePref shared erencesType UpdateType action

get-updates

The ―upgrade‖ action is added

Changes to Earlier Versions 1.3.5.1-1.5.2.0 Feature: Plesk 9 backward compatibility
Option * Operator client Operation add Type/File Parameter Comment Client account is automatically assigned to Plesk Administrator * client get If you request info on all client accounts, Plesk will return info on all client accounts, reseller accounts and artificial client account. Plesk user hierarchy will not be retained. If you request reseller account statistics, the operation will return total reseller account statistics (including statistics for controlled client accounts). If you remove a reseller account, all client accounts owned by the reseller will also be removed If you request info on domain accounts owned by a reseller, Plesk will return info on only reseller's personal domain accounts, excluding those owned by the reseller's clients. If you request info on all domain accounts, the info on all domain accounts (including the accounts owned by Plesk Administrator) will be returned. Now you can also request Plesk Administrator's or reseller's personal domain templates Each reseller-related action is tracked as a client-related action.

*

client

get

*

client

del

*

domain

get

*

domain

get

*

domaintemplate event_log

get

*

.........1..........................0 ...........0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATIONS Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input............................................................................................0..... client_output....5.4.0 .......... In this chapter: v...........................xsd...........0......1./rpc/1.......................xsd).......4.4..............4.............. This file references all lower-level input schemas available...... 45 v..........1 ......... and what were the new managed objects in each version.......1.......................................................0 ...4......1.........0 Version 1.....0 ......... 43 v.......................1.....0 of Plesk XML API has a two-level structure as follows:  An entry point to the input XML schemas is agent_input.....1..1......... The chapter also contains information on Plesk API RPC evolution which shows how Plesk API is developed: what Plesk version introduced each protocol version..........  Version 1...... plesk_client......................xsd (....................................................... 37 v....0...........................1.0/agent_input..................1.....xsd AVAILABLE TO Plesk Administrator Plesk Administrator ........................... 35 v............. refer to the API RPC Schemas Location (on page 16) section........................................0.... To learn how to access the schemas..4....CHAPTER 4 XML Schemas for API RPC Operators This chapter lists XML schemas that define format of messages sent to and received from Plesk API operators........... 39 v........ 41 v.............................xsd client_input.. certificate_output........................... This file references all lower-level output schemas available......... grouped by the protocol versions....... 31 v.........1.............................................0 ........1. 29 v............2.....0.............. 32 v.............2......................2..0 ..................0............... An entry point to the output XML schemas is agent_output..... 34 v.......4............................4..............5........1.1 ...1......................xsd........0 ..........xsd........................xsd......................4........5......................5.............1...........0......6...........2 ......1......

ip_output.xsd. plesk_server. plesk_siteapp.xsd. plesk_dns.30 XML Schemas for API RPC Operators Database server operations Desktop operations DNS operations db_server database_input.xsd. plesk_secretkeys. database_output.xsd. .xsd.xsd.xsd.xsd.xsd. plesk_domain. domainalias_output. plesk_mailname. plesk_domainalias.xsd server_input.xsd dns_input. migration_output. server_output.xsd spamfilter_input.xsd.xsd domain_input.xsd ip_input.xsd.xsd.xsd upload_output.xsd.xsd. Plesk Client Plesk Administrator desktop dns Domain alias operations domain_alias Domain operations domain Event Logging IP operations Mail operations event_log ip mail Migration operations migration Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator Web Application operations Spam filtering siteapp Plesk Administrator spamfilter Plesk Administrator Plesk Administrator Upload upload Simple and commonly used types are provided in schemas common. Plesk Client Plesk Administrator. siteapp_output. secret_ key_output.xsd.xsd.xsd Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. dns_output.xsd.xsd.xsd siteapp_input.xsd. plesk_spamfilter. event_log_output.xsd desktop. spamfilter_output. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd and plesk_common. domain_output. plesk_migration. mail_output. plesk_db.xsd.xsd migration_input.xsd event_log_input.xsd.xsd.xsd mail_input.xsd.xsd secret_key_input.xsd domainalias_input.

xsd.xsd.0 of Plesk XML API has a two-level structure as follows:   An entry point to the input XML schemas is agent_input.xsd. event_log_output. domainalias_output.xsd.xsd.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Client template operations Database server operations Desktop operations DNS operations client-template db_server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. certificate_output.4.xsd. plesk_mailname.xsd. ip_output.1.xsd dns_input. plesk_client.xsd migration_input. An entry point to the output XML schemas is agent_output.xsd.xsd.xsd client_template.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATIONS Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input. plesk_migration. mail_output.1. plesk_domain.xsd mail_input.xsd database_input.xsd domain_template. dns_output.xsd client_input. This file references all lower-level output schemas available.XML Schemas for API RPC Operators 31 v.xsd event_log_input. plesk_domainalias.xsd. Plesk Client desktop dns Domain operations domain Domain template operations Domain alias operations domain-template domain_alias Plesk Administrator.xsd.xsd domain_input.xsd.1.1. Version 1. Plesk Client Plesk Administrator Event Logging IP operations Mail operations event_log ip mail Migration operations migration . database_output. client_output. This file references all lower-level input schemas available. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.4.xsd ip_input.xsd. Plesk Client Plesk Administrator.xsd.xsd.xsd. domain_output.xsd.0 Version 1. migration_output.xsd.xsd.xsd desktop. plesk_db.4. plesk_dns.xsd domainalias_input.

plesk_server. plesk_client. Version 1.xsd and plesk_common.xsd server_input.1. client_output.xsd siteapp_input.xsd.xsd.xsd Plesk Administrator Server operations server Plesk Administrator Web Application operations Spam filtering siteapp Plesk Administrator spamfilter Plesk Administrator Plesk Administrator Upload upload Simple and commonly used types are provided in schemas common.xsd.xsd.xsd.1.xsd database_input.xsd.1 of Plesk XML API has a two-level structure as follows:   An entry point to the input XML schemas is agent_input.xsd. spamfilter_output.xsd upload_output.xsd desktop. plesk_spamfilter.xsd. database_output. This file references all lower-level input schemas available. plesk_db.xsd.1 Version 1. plesk_siteapp.32 XML Schemas for API RPC Operators Secret key operations secret_key secret_key_input. An entry point to the output XML schemas is agent_output.4.1 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.xsd.1.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations Desktop operations DNS operations client-template db_server desktop dns . server_output.xsd spamfilter_input.xsd.xsd client_input.xsd. plesk_secretkeys.4. dns_output.xsd client_template.xsd. plesk_dns.xsd. This file references all lower-level output schemas available.xsd dns_input.xsd.xsd.xsd.xsd. certificate_output. v. secret_key_output.1. siteapp_output.4.

plesk_secretkeys.xsd. mail_output.xsd migration_input. plesk_server.xsd. plesk_migration. Plesk Client Plesk Administrator.xsd secret_key_input.xsd server_input.xsd.xsd Plesk Administrator.xsd spamfilter_input.xsd.xsd.xsd.xsd.xsd virtdir.xsd. migration_output.xsd mail_input. plesk_domain.xsd. event_log_output. siteapp_output.xsd.xsd. plesk_siteapp. spamfilter_output. domain_output.xsd siteapp_input.xsd domainalias_input. Plesk Client Plesk Administrator event_log ip mail migration Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator SiteApp operations siteapp Plesk Administrator Spam filtering spamfilter Plesk Administrator Plesk Administrator Plesk Administrator Upload Virtual directory operations upload virtdir . Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator. secret_key_output.xsd event_log_input.xsd.xsd. plesk_domainalias.xsd.xsd. domainalias_output.xsd domain_template.xsd ip_input. Plesk Client Domain template operations Domain alias operations Event Logging IP operations Mail operations Migration operations domain-template domain_alias Plesk Administrator.XML Schemas for API RPC Operators 33 Domain operations domain domain_input.xsd. ip_output.xsd upload_output. plesk_mailname. server_output.xsd.xsd. plesk_spamfilter.

xsd.xsd.1.xsd. event_log_output.2 of Plesk XML API has a two-level structure as follows:   An entry point to the input XML schemas is agent_input. Plesk Client Client template operations Database server operations Desktop operations DNS operations Domain operations client-template db_server desktop dns domain Domain template operations Domain alias operations Event Logging IP operations Mail operations domain-template event_log ip mail .xsd event_log_input.1.xsd client_input.xsd.xsd client_template. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd. Plesk Client Plesk Administrator. plesk_mailname. database_output.xsd.1.xsd.34 XML Schemas for API RPC Operators Simple and commonly used types are provided in schemas common. plesk_dns.xsd. Version 1.xsd domain_input.xsd desktop.xsd dns_input.xsd. domain_output.2 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.xsd. An entry point to the output XML schemas is agent_output.xsd ip_input. domainalias_output. dns_output. Plesk Client domain_alias Plesk Administrator.xsd domain_template.xsd and plesk_common.xsd.4. ip_output. certificate_output. v. plesk_client. plesk_domainalias.xsd database_input.xsd.4. This file references all lower-level input schemas available.xsd.1.xsd.4.xsd domainalias_input.xsd.xsd. plesk_domain. client_output.xsd. mail_output.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. This file references all lower-level output schemas available.xsd. plesk_db.2 Version 1.xsd mail_input.

plesk_migration.0 Version 1. plesk_server. plesk_secretkeys.xsd.4.2. This file references all lower-level output schemas available. client_output.xsd. server_output.2.xsd client_input.xsd client_template. certificate_output. siteapp_output. plesk_siteapp. migration_output.xsd virtdir.xsd.xsd.xsd. v.xsd.xsd spamfilter_input. An entry point to the output XML schemas is agent_output.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.0 of Plesk XML API has a two-level structure as follows:   An entry point to the input XML schemas is agent_input.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations client-template .xsd. This file references all lower-level input schemas available. spamfilter_output.4.xsd.xsd.xsd. plesk_spamfilter.xsd.2.xsd.4.xsd upload_output.XML Schemas for API RPC Operators 35 Migration operations migration migration_input.xsd Plesk Administrator Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator SiteApp operations siteapp Plesk Administrator Spam filtering spamfilter Plesk Administrator Plesk Administrator Plesk Administrator Upload Virtual directory operations upload virtdir Simple and commonly used types are provided in schemas common.xsd.xsd.xsd siteapp_input.1.xsd server_input.xsd and plesk_common. plesk_client. Version 1.xsd.xsd secret_key_input. secret_key_output.xsd.

xsd.xsd spamfilter. domainalias_output. secret_key_output.xsd. plesk_spamfilter. plesk_db.xsd ip_input.xsd.xsd. plesk_siteapp. Plesk Client Plesk Administrator Plesk Administrator event_log ftp-user ip mail maillist migration Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator SiteApp operations siteapp Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. Plesk Client Plesk Administrator Plesk Administrator. plesk_dns.xsd domain_input.xsd. plesk_secretkeys.xsd.36 XML Schemas for API RPC Operators Database server operations Desktop operations DNS operations Domain operations db_server database_input.xsd Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd desktop. plesk_domain. mail_output.xsd.xsd dns_input.xsd.xsd. Plesk Client Plesk Administrator. plesk_migration. siteapp_output.xsd.xsd.xsd. domain_output. Plesk Client Spam filtering Upload Virtual directory operations Web user operations spamfilter upload virtdir webuser .xsd.xsd.xsd maillist.xsd webuser.xsd domain_template. Plesk Client desktop dns domain Domain template operations Domain alias operations Event Logging Additional FTP account operations IP operations Mail operations Mailing list operations Migration operations domain-template domain_alias Plesk Administrator.xsd mail_input.xsd server_input.xsd.xsd event_log_input.xsd. migration_output.xsd secret_key_input.xsd. ip_output.xsd.xsd migration_input.xsd siteapp_input. server_output. dns_output. database_output.xsd ftpuser.xsd domainalias_input. event_log_output. plesk_server. plesk_domainalias.xsd virtdir. Plesk Client Plesk Administrator Plesk Administrator. plesk_mailname.xsd.xsd.xsd upload_output.xsd.

Version 1.xsd client_template. plesk_domainalias. An entry point to the output XML schemas is agent_output.xsd domain_template. plesk_client.xsd. plesk_db.xsd dns_input.xsd.xsd.xsd.xsd. v. domainalias_output.xsd.1.xsd.xsd domainalias_input. Plesk Client Plesk Administrator. Plesk Client Plesk Administrator. event_log_output.0.0 Version 1.xsd client_input.0.xsd.XML Schemas for API RPC Operators 37 Simple and commonly used types are provided in schemas common.0 of Plesk XML API has a two-level structure as follows:   An entry point to the input XML schemas is agent_input.xsd. certificate_output.xsd.xsd database_input.5.xsd.0. This file references all lower-level input schemas available. This file references all lower-level output schemas available.xsd. domain_output.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.xsd.xsd domain_input. client_output.5.xsd.xsd and plesk_common.xsd event_log_input. dns_output. Plesk Client Plesk Administrator Descriptor structure Desktop operations DNS operations Domain operations desktop dns domain Domain template operations Domain alias operations Event Logging domain-template domain_alias event_log . plesk_dns. database_output.5.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations client-template db_server Plesk Administrator Plesk Administrator. plesk_domain.xsd descriptor. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd desktop.xsd.

xsd.xsd. secret_key_output. siteapp_output. plesk_spamfilter.38 XML Schemas for API RPC Operators Localization operations Log rotation operations Additional FTP account operations IP operations Mail operations Mailing list operations Migration operations locale log-rotation ftp-user ip mail maillist migration locale. Plesk Client Session management operations SiteApp operations session siteapp Spam filtering Updater operations Upload Virtual directory operations Web user operations spamfilter updater upload virtdir webuser Simple and commonly used types are provided in schemas common.xsd. Plesk client Plesk Administrator.xsd spamfilter.xsd and plesk_common.xsd.xsd migration_input. server_output.xsd. Plesk Client Plesk Administrator Plesk Administrator Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd. ip_output.xsd.xsd updater.xsd maillist.xsd Plesk Administrator Plesk Administrator. plesk_mailname.xsd session.xsd.xsd ip_input. plesk_migration.xsd logrotation.xsd secret_key_input.xsd.xsd virtdir.xsd siteapp_input.xsd mail_input. plesk_server.xsd upload_output.xsd.xsd ftpuser.xsd. migration_output. plesk_secretkeys.xsd webuser. plesk_siteapp.xsd. Plesk Client Plesk Administrator Plesk Administrator. mail_output.xsd server_input. .xsd.

xsd. database_output.xsd logrotation.xsd.xsd). An entry point to the output XML schemas is agent_output. plesk_domainalias. plesk_dns. event_log_output. This file references all lower-level output schemas available.xsd client_template.xsd.xsd domain_template. plesk_client.5. Plesk Client Plesk Administrator.xsd domainalias_input.xsd domain_input.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations client-template db_server Plesk Administrator Plesk Administrator. dns_output.xsd event_log_input. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd database_input. This file references all lower-level input schemas available.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.1.xsd.5.xsd locale.0 of Plesk XML API has a two-level structure as follows:  An entry point to the input XML schemas is agent_input.xsd descriptor.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd. plesk_domain.1. Plesk client Descriptor structure Desktop operations DNS operations Domain operations desktop dns domain Domain template operations Domain alias operations Event Logging Localization operations Log rotation operations domain-template domain_alias event_log locale log-rotation .5.xsd.xsd (. domain_output.0/agent_input.xsd client_input.1.1.  Version 1.xsd. client_output.xsd.XML Schemas for API RPC Operators 39 v. certificate_output.xsd dns_input.xsd./rpc/1. Plesk Client Plesk Administrator.xsd. domainalias_output.xsd desktop. plesk_db.0 Version 1.xsd.5.1.xsd.

xsd. plesk_secretkeys.xsd virtdir.40 XML Schemas for API RPC Operators Additional FTP account operations IP operations Mail operations Mailing list operations Migration operations ftp-user ip mail maillist migration ftpuser. Plesk Client Plesk Administrator Plesk Administrator.xsd updater.xsd. secret_key_output.xsd. plesk_spamfilter.xsd and plesk_common.xsd. Plesk Client Plesk Administrator Plesk Administrator Secret key operations secret_key Plesk Administrator Server operations server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. siteapp_output. ip_output.xsd. mail_output.xsd migration_input.xsd siteapp_input. plesk_server. migration_output. Plesk Client Session management operations SiteApp operations session siteapp Spam filtering Updater operations Upload Virtual directory operations Web user operations Operations with Plesk backups spamfilter updater upload virtdir webuser backup-manager Simple and commonly used types are provided in schemas common.xsd secret_key_input.xsd Plesk Administrator.xsd server_input.xsd maillist.xsd.xsd. .xsd session.xsd ip_input.xsd webuser.xsd mail_input.xsd spamfilter. server_output.xsd.xsd. plesk_siteapp.xsd. plesk_mailname.xsd.xsd.xsd backup. Plesk Client Plesk Administrator. plesk_migration.xsd.xsd upload_output.

domain_output. An entry point to the output XML schemas is agent_output.5. client_output.2. plesk_dns. certificate_output. plesk_client.xsd dns_input. Plesk client Plesk Administrator.xsd. Plesk Client Plesk Administrator.xsd domainalias_input.xsd event_log_input. dns_output. Plesk Client Plesk Administrator.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations client-template db_server Plesk Administrator Plesk Administrator.xsd. This file references all lower-level output schemas available. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd.xsd locale.xsd ftpuser.2. plesk_domain.0 Version 1.xsd desktop.xsd.XML Schemas for API RPC Operators 41 v. This file references all lower-level input schemas available.xsd.xsd.xsd.xsd client_input.xsd.xsd client_template. database_output.xsd.xsd domain_template.xsd. domainalias_output.5.xsd.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.xsd.xsd descriptor.xsd domain_input. Version 1. plesk_domainalias.xsd.0 of Plesk XML API has a two-level structure as follows: An entry point to the input XML schemas is agent_input.1.xsd database_input. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd.2. Plesk Client Descriptor structure Desktop operations DNS operations Domain operations desktop dns domain Domain template operations Domain alias operations Event Logging Localization operations Log rotation operations Additional FTP account operations domain-template domain_alias event_log locale log-rotation ftp-user .5.xsd logrotation. event_log_output. plesk_db.

xsd.xsd. plesk_secretkeys.xsd.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd virtdir.xsd. .xsd backup.xsd. Plesk Client Session management operations SiteApp operations session siteapp Spam filtering Subdomain operations User interface operations Updater operations Upload Virtual directory operations Web user operations Operations with Plesk backups spamfilter subdomain ui updater upload virtdir webuser backup-manager Simple and commonly used types are provided in schemas common.xsd.xsd.xsd spamfilter.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd subdomain. mail_output. plesk_spamfilter. ip_output. plesk_siteapp.xsd.xsd ui_input.xsd updater.xsd. siteapp_output.xsd siteapp_input.xsd Plesk Administrator Plesk Administrator. server_output.xsd.xsd upload_output.xsd secret_key_input. plesk_custom_button.xsd server_input.xsd session.xsd.42 XML Schemas for API RPC Operators IP operations Mail operations Mailing list operations Migration operations ip mail maillist migration ip_input.xsd migration_input. migration_output.xsd webuser. plesk_server. secret_key_output.xsd maillist.xsd mail_input. ui_output.xsd protected_dir. Plesk Client Plesk Administrator Protected directory operations Secret key operations protected_dir secret_key Server operations server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd. plesk_migration.xsd and plesk_common. plesk_mailname. Plesk Client Plesk Administrator.xsd.

plesk_dns.xsd. Plesk Client Plesk Administrator.xsd descriptor.5.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations client-template db_server Plesk Administrator Plesk Administrator.xsd. plesk_db.xsd domainalias_input.1 Version 1. This file references all lower-level input schemas available.xsd locale.xsd logrotation.xsd desktop. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd.2.xsd. event_log_output. client_output.xsd.xsd client_template. domain_output. Plesk Client Plesk Administrator. dns_output.xsd event_log_input.xsd.xsd domain_template. plesk_domain.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.1. database_output.xsd.2.5. Plesk Client Descriptor structure Desktop operations DNS operations Domain operations desktop dns domain Domain template operations Domain alias operations Event Logging Localization operations Log rotation operations Additional FTP account operations domain-template domain_alias event_log locale log-rotation ftp-user . Plesk client Plesk Administrator.xsd.2.1 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.xsd database_input. An entry point to the output XML schemas is agent_output.xsd domain_input. Version 1.xsd. certificate_output.xsd.xsd.xsd.5.1 of Plesk XML API has a two-level structure as follows: An entry point to the input XML schemas is agent_input.XML Schemas for API RPC Operators 43 v. This file references all lower-level output schemas available.xsd ftpuser.xsd dns_input.xsd client_input. plesk_client. plesk_domainalias. domainalias_output.xsd.

plesk_mailname.xsd upload_output. plesk_migration.xsd. plesk_siteapp.xsd backup. plesk_custom_button.xsd siteapp_input. Plesk Client Plesk Administrator Protected directory operations Secret key operations protected_dir secret_key Server operations server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd maillist.xsd spamfilter.xsd migration_input.xsd. ui_output.xsd.xsd.xsd secret_key_input.44 XML Schemas for API RPC Operators IP operations Mail operations Mailing list operations Migration operations ip mail maillist migration ip_input.xsd.xsd.xsd updater. plesk_server.xsd subdomain.xsd.xsd session.xsd.xsd Simple and commonly used types are provided in schemas common. secret_key_output.xsd Plesk Administrator Plesk Administrator.xsd mail_input.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd.xsd virtdir. server_output. Plesk Client Session management operations SiteApp operations session siteapp Spam filtering Subdomain operations User interface operations Updater operations Upload Virtual directory operations Web user operations Operations with Plesk backups spamfilter subdomain ui updater upload virtdir webuser backup-manager webuser.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. migration_output. plesk_secretkeys.xsd protected_dir.xsd and plesk_common.xsd.xsd ui_input.xsd. . plesk_spamfilter. mail_output.xsd. siteapp_output. ip_output.xsd.xsd server_input. Plesk Client Plesk Administrator.

6. This file references all lower-level input schemas available.xsd.6.xsd. dns_output.xsd.xsd.xsd. plesk_client.xsd domain_input.0. Plesk Client Plesk Administrator. event_log_output. Plesk Client Plesk Administrator.xsd descriptor. plesk_db.xsd. plesk_domainalias.xsd.xsd.xsd dns_input. An entry point to the output XML schemas is agent_output. Version 1. database_output.xsd desktop.6.xsd.0.xsd ftpuser. Plesk client Plesk Administrator. certificate_output. This file references all lower-level output schemas available. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd.xsd database_input.1. plesk_dns.xsd.xsd client_template.xsd.xsd logrotation.xsd domainalias_input. domainalias_output. plesk_domain.0.0 Version 1.0 of Plesk XML API has a two-level structure as follows: An entry point to the input XML schemas is agent_input. Plesk Client Descriptor structure Desktop operations DNS operations Domain operations desktop dns domain Domain template operations Domain alias operations Event Logging Localization operations Log rotation operations Additional FTP account operations domain-template domain_alias event_log locale log-rotation ftp-user . client_output.xsd domain_template.xsd event_log_input.xsd.xsd client_input.xsd. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator.xsd locale.XML Schemas for API RPC Operators 45 v. domain_output.xsd AVAILABLE TO Plesk Administrator Plesk Administrator Plesk Administrator Client template operations Database server operations client-template db_server Plesk Administrator Plesk Administrator.0 of Plesk XML API supports operations on the following Plesk objects: SUPPORTED OPERATION Certificate operations Client operations OPERATOR certificate client SCHEMAS certificate_input.

Plesk Client Session management operations SiteApp operations session siteapp Spam filtering Subdomain operations User interface operations Updater operations Upload Virtual directory operations Web user operations Operations with Plesk backups Operations with Plesk resellers Operations with Plesk reseller templates spamfilter subdomain ui updater upload virtdir webuser backup-manager reseller reseller-template webuser.xsd subdomain.xsd reseller_template.xsd. ip_output. plesk_secretkeys.xsd.xsd and plesk_common.xsd mail_input.xsd.xsd.xsd ui_input.xsd.xsd backup.xsd virtdir. plesk_mailname.xsd Simple and commonly used types are provided in schemas common. plesk_spamfilter.xsd.xsd.xsd Plesk Administrator Plesk Administrator.xsd session. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator.xsd siteapp_input.xsd. plesk_migration. Plesk Client Plesk Administrator Protected directory operations Secret key operations protected_dir secret_key Server operations server Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator Plesk Administrator. siteapp_output.46 XML Schemas for API RPC Operators IP operations Mail operations Mailing list operations Migration operations ip mail maillist migration ip_input. Plesk Client Plesk Administrator. ui_output. Plesk Client Plesk Administrator.xsd updater. mail_output. server_output.xsd.xsd maillist.xsd server_input. .xsd.xsd migration_input.xsd spamfilter. migration_output.xsd.xsd reseller.xsd.xsd. plesk_siteapp.xsd upload_output. plesk_custom_button. plesk_server. secret_key_output.xsd protected_dir. Plesk Client Plesk Administrator Plesk Administrator Plesk Administrator. Plesk Client Plesk Administrator.xsd.xsd secret_key_input.xsd.

............xsd)....  Before you start using descriptors... Data type: ObjectDescriptor (descriptor....................... refer to the Descriptor of Property (on page 48) section.........CHAPTER 5 Representation of Object Descriptor Every object descriptor is composed of a set of property descriptors and correlation between properties of the object...... In this chapter: Filters of Descriptors ....... 55 ................. Its graphical representation is as follows: The descriptor node is required.......... It specifies one or more property descriptors.. 48 Property Descriptor ...........xsd)... 48 Bind Parameters ....... Data type: PropertyDescriptor (descriptor...........xsd).....  The property node is required............... refer to the Bind Parameters (on page 55) section........... It specifies object descriptor................. The bind node is optional............. read more about descriptor filtering issues in the Filters of Descriptors (on page 48) section...... For details......... refer to the Descriptors Overview section of the Programming Guide.................. Data type: PropertyDescriptor (descriptor........................................................ For details.... It defines correlation between properties of the object......... For more info on descriptors.........

refer to the Descriptors section of the Programming Guide. ID. 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. but can contain multiple filtering parameters presented by the same node in XML schema. A single filter node cannot contain filtering parameters presented by different nodes in XML schema. There are client-level and domain-level filters for object descriptors. For details on descriptors. In this case there will be filter-id and id nodes in the response packet. Client-level filters can specify a client by ID or login name. Domain-level filters can specify a domain by name. . If the filter node is not blank (<filter/>) the server will return descriptor for an object.48 Representation of Object Descriptor Filters of Descriptors Filters used by descriptors differs from filters used by operators. specified by filtering rule parameters. or they can specify multiple domains belonging to a specified client by client ID or login name.

Data type: PropertyDescriptor (descriptor. Date is stored in timestamp format. Data type: EnumElementType (descriptor. In 'bytes' type -1 (value) = UNLIMITED  The enum node is optional. Data type: string. The type node is required.  The value node is required if the enum node is specified. Data type: string. It specifies a property descriptor. Its graphical representation is as follows:    The property node is required.Representation of Object Descriptor 49 Property Descriptor Property descriptor is comprised of parameters that specify an object property. It defines a value of the property. It specifies values of the property in case the property has limited set of values. It specifies a type of property value. The name node is required. Allowed values: string | password | int | uint | float | boolean | bytes | date Where uint is an unsigned integer.xsd).xsd). It specifies identifier of the property. . Data type: string.

..... For details..... Extension of Hosting Settings Descriptor (on page 51) and Extension of Limits Descriptor (see page 53) sections.... It specifies brief explanation of the property in Plesk GUI.................. This value should be equal to locale key name of the property.. 51 Extension of Limits Descriptor ....... Data type: any. The writable-by node is optional.. 51 Extension of Hosting Settings Descriptor.. To retrieve locale key value.........50 Representation of Object Descriptor  The label node is optional.... It specifies hint that can be seen if you point cursor on the property label in Plesk GUI......... To retrieve locale key value... Data type: none..... Data type: string.. It defines data specific for the object......... It specifies default value of the property...............   Samples The following property descriptor specifies FTP quota... <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> In this section: Extension of Permissions Descriptor ................... Allowed values: none | admin | client | domain-admin. Data type: string. use the locale operator............... The extension node is optional... It specifies brief explanation of the property value in Plesk GUI......... Data type: string. It specifies the hint that can be seen if you point cursor on the property label in Plesk GUI.. The hint node is optional.......... Data type: sting....... It specifies users who can edit the property........ The label node is optional.. 53 .......     The default-value node is optional... The hint value is optional.... This value should be equal to locale key name of the property......... Data type: string... refer to the Extension of Permissions Descriptor (on page 51)..... use the locale operator....... <property> <name>ftp_quota</name> <type>int</type> <default>-1</default> <writable-by>admin</writable-by> </property> The following property descriptor specifies PHP support............

If you send request packet containing the get-permission-descriptor operation.Representation of Object Descriptor 51 Extension of Permissions Descriptor This extension is used to define correlations between types of users and permissions. 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 mail account users. The parameter is visible to clients. the respond from the server will contain permission level in the level node nested into the extension node. mail. Permissions and Hosting Settings (on page 397) (domain and domain administrator's settings) sections. or Limits. refer to the Limits and Permissions (on page 70) (client's settings). . 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. Note: You can specify multiple service parameters in one extension node. The parameter is visible to domain administrators. domain.

the subdomain-on-subfolder specifies if the property is visible when managing subdomains on subfolder. the service node. the webuser node specifies if the property is visible when managing web users. The property is visible when managing subdomains on subfolder. The level node can have one of the following values:    domain. The node can contain several or all of the following child nodes in the preassigned order:     the domain node specifies if the property is visible when managing domains. subdomain-on-subfolder.1. The property is visible when managing domains. It specifies if the property is visible when managing an object. subdomain. the subdomain node specifies if the property is visible when managing typical subdomains. The property is visible when managing typical subdomains.5.2. If you send a request packet containing the get-physical-hosting-descriptor operation.0. It specifies if the service is a hosting property of a managed object defined by a child node.  The level node is required if the property is not a service.52 Representation of Object Descriptor Extension of Hosting Settings Descriptor This extension is used to define visible properties on managing Plesk hosted objects. . Supported since the protocol v. The extension node of physical hosting property can be represented graphically as follows:  The service node is required if the property is a service. or one or several level nodes in preassigned order nested into the extension node will set if a property is visible when you manage a specified object.

and the non-service property ftp_quota visible when managing domains and subdomains in Plesk for Unix. refer to the Limits. <property> <name>fp</name> <type>boolean</type> <writable-by>none</writable-by> <label>__fp_unix_support</label> <extension> <level>domain</level> </extension> </property> <property> <name>ftp_quota</name> <type>bytes</type> <writable-by>none</writable-by> <label>__hard_disk_quota</label> <extension> <level>domain</level> <level>subdomain</level> </extension> </property> For details on hosting settings. subdomains and web users in Plesk for Unix. . Permissions and Hosting Settings (on page 397) section.Representation of Object Descriptor 53 This part of a physical hosting descriptor represents the service property asp visible when managing domains. <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> This part of a physical hosting descriptor represents the non-service property fp visible when managing domains.

Permissions and Hosting Settings (on page 397) (domain and domain administrator's settings) sections. For instance. Data type: boolean. Graphically. because it's value is equal both for a client and for domain administrator. the extension node can be represented in the following way: The shared node is required. mailbox quota is a shared parameter. or Limits. 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. refer to the Limits and Permissions (on page 70) (client's settings).54 Representation of Object Descriptor Extension of Limits Descriptor Number of limits have values equal to users of different access levels. .

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

56 Representation of Object Descriptor Remarks Multiple bind nodes for a single property descriptor are treated as logical disjunction of correlations. <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> . This rule tells to make PHP ISAPI support editable only if PHP support is editable and checked. Multiple relevant nodes are treated as logical conjunction of the rules.

.... at first......................... 1368 ................ 161 Managing Databases ..................................................................................................... 673 Managing Mailing Lists .... 905 Managing Protected Directories .. 487 Managing Domain Templates ........................................................................ 970 Managing Reseller Templates ............................................................................................................................................................................................................... 1267 Managing Web Users ................................................................. lists all operations on the objects in focus that are supported by API RPC.... 1178 Managing Subdomains................................................................................... 58 Managing Client Templates ...........................................................................................................................................................................CHAPTER 6 Supported Operations This chapter can serve as a guide on how each Plesk object can be managed programmatically via Plesk API RPC protocol........................................................................ 1160 Managing SSO Service ............... Each section is devoted to a particular object or range of objects................................................... 1325 Retrieving Action Log Data ..................................................................................................................................................................................................... 1072 Managing Spam Filtering Service ........................... 251 Managing DNS .............. 728 Managing Plesk Backups ....................................................................................................................................................................................... 555 Managing IP Addresses ............................................................................. 922 Managing Reseller Accounts ............................................................................. 789 Managing Plesk Server ........................................................................... 640 Managing Mail on Domain Level .......................................................................................................................................... 1284 Migrating Domain And Client Accounts .............................. For your convenience the sections are arranged in alphabetical order..................................................................................................................................... 276 Managing Domain Accounts.................................... 1111 Managing SSL Certificates ....................................... In this chapter: Managing Client Accounts ................. 516 Managing FTP Accounts ............ 135 Managing Database Servers ............................................................................................................................. 202 Managing Desktop Presets ........ 1065 Managing Web Applications ........................................................................................................................................................................................... The detailed description touches upon the structure of the request and response packets............ 1360 Uploading Files to Server ................................................ 842 Managing Plesk Updates...................... 1218 Managing User Interface ..................... then each operation is considered in detail with XML code samples....................................................................................................................................... 1050 Managing Sessions ............. 1030 Managing Secret Keys .............. 605 Managing Log Rotation on Domain .............. 377 Managing Domain Aliases .................. Each section................................................... 1245 Managing Virtual Directories ..................................................................................................................... 587 Managing Locales ...................

These settings are as follows:      Limits on use of Plesk resources Access permissions IP pool settings Template settings Ownership settings.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator.0. Plesk Administrator can upgrade his client accounts to reseller accounts. domain administrators. Client account presents a set of Plesk client personal data and a collection of various settings. Owner of an existing client account can be changed. This operation is allowed to Plesk resellers (since protocol version 1.0) and Plesk Administrator.6.0.58 Supported Operations Managing Client Accounts Operator: <client> XML Schema: client_input. Creating a Plesk Client is equivalent to creating a special client account. clients.6. plesk_client. A client account can be created with a unique collection of settings. or this can be done using a client template (a special object that holds a collection of predefined settings). and email users (enumerated in the descending level order). Plesk client can create and manage domains and user accounts that share the disk space of the 'parent' client account. each client account has an owner (Plesk Administrator or a Plesk Reseller). refer to section Managing Client Templates (see page 135).0. To learn more about client templates.0) Description The hierarchy of Plesk users includes resellers. Since protocol version 1.6. a client account is allotted a portion of Plesk server disk space and other Plesk resources. .0. Once created. Plesk reseller (since protocol version 1.xsd. client_output.xsd. In turn.

CFORM_BUTTONS_LIST (see page 112) retrieves the list of buttons displayed on the client's home page.0. GET (see page 87) retrieves the information about the specified client account(s) from Plesk database. The feature is supported since protocol version 1. CONVERT-TO-RESELLER (on page 128) upgrades client accounts to reseller accounts. DEL (see page 95) deletes the specified client account(s) from Plesk database.0. GET-PERMISSION-DESCRIPTOR (on page 125) retrieves client permissions descriptors. IPPOOL_ADD_IP (see page 107) adds IP addresses to the client‘s IP pool.Supported Operations 59 Supported operations           ADD (see page 81) creates new client account to Plesk database. . SET (see page 100) updates/ modifies certain information about the specified client account(s) in Plesk database. IPPOOL_DEL_IP (see page 109) removes IP addresses from the client‘s IP pool.6. GET-LIMIT-DESCRIPTOR (on page 119) retrieves client limits descriptors.

...................60 Supported Operations  CHANGE-OWNER (on page 132) assigns a new owner to a client account.......................................................................................................... 100 Adding IP Addresses to Client‘s IP Pool ...................... The filter node is presented by the ClientSelectionFilterType complex type (client_input..... 112 Retrieving Descriptor of Limits ......................... 132 Filtering Issues Filtering is the way the request XML packet indicates the object (one or several client accounts) to which the operation will be applied. 107 Removing IP Addresses from the Client‘s IP Pool ............ Parameters nested in the filter node are called filtering rule............................................................................................................................................ 81 Getting Information About Client Accounts ............. 109 Listing Buttons Displayed on the Client‘s Page in Control Panel...................................................... 95 Setting Client Account Properties .................................... Its graphical representation is as follows: ..................................................................................... In this section: Filtering Issues ......................................... 119 Retrieving Descriptor of Permissions ............................xsd)................................................................................................. 125 Upgrading Client Account to Reseller Account .. 60 Client Settings ........................................................ The feature is supported since protocol version 1............................0...6. 87 Deleting Client Accounts .... 63 Creating Client Account ....................................0................................................. 128 Changing Client Account Owner.............................

Data type: string.0.0”> <client> <del> <filter> <login>JaneDoe</login> <login>RRoe</login> <login>JohnDoe</login> </filter> </del> </client> </packet> .4. For details on GUIDs.0. It specifies login name of a client account owner.0. It specifies the GUID of a client account. This node is supported since protocol version 1. Data type: string. The owner-id node is optional.6. The guid node is optional. Data type: string.2.0”> <client> <del> <filter> <owner-login>admin</owner-login> </filter> </del> </client> </packet> The following packet deletes three client accounts specified by id: <packet version=”1. Data type: integer. It specifies login name of a client account. refer to the API RPC Protocol > GUIDs Overview section of Plesk API RPC Developer's Guide. It specifies ID of a client account.0.2.6.0. It specifies ID of a client account owner. This node is supported since protocol version 1.0”> <client> <del> <filter> <id>124</id> <id>125</id> <id>127</id> </filter> </del> </client> </packet> The following packet is identical to the previous one except that it specifies client accounts by name: <packet version=”1. Data type: integer.6. The owner-login node is optional.6.4.Supported Operations 61      The id node is optional.0. This node is supported since protocol version 1.0. The login node is optional. The following packet removes client accounts which belong to Plesk Administrator: <packet version=”1.

4.0”> <client> <del> <filter> <login>JaneDoe</login> <id>125</id> <login>JohnDoe</login> </filter> </del> </client> </packet> To fix this problem.2.4.0”> <client> <del> <filter> <login>JaneDoe</login> <login>JohnDoe</login> </filter> </del> <del> <filter> <id>125</id> </filter> </del> </client> </packet> .62 Supported Operations The following packet is invalid as both the id and the login nodes are used in the same filter: <packet version=”1.2. use two different <del> sections: <packet version=”1.

..67 Type clientSetGenInfo ............. In this section: General Client Account Settings .................................... 70 IP Pool Settings.............used when creating the client account with the add operation type clientGetGenInfo (see page 67) .................Supported Operations 63 Client Settings This section describes a collection of client account settings..used when retrieving the general information from Plesk database using the get operation type clientSetGenInfo (see page 69) ...................................................................... and retrieved from Plesk database as well............................................................................................................... These settings are as follows:    General Client Account settings (see page 63) Limits (on page 70) on use of Plesk resources set for the client account Plesk client permissions (on page 70) The above settings can also be read from Plesk database along with IP pool settings (see page 79) and statistics (see page 80) on use of various Plesk resources by the given Plesk client........................................................................ 80 General Client Account Settings General client account settings are specified by three data types as follows:    type clientAddGenInfo (see page 64) ............ These settings can be defined when creating a client account or later......................................64 Type clientGetGenInfo .................................................................................................69 ...used when updating the client account using the set operation In this section: Type clientAddGenInfo ................................... 63 Limits and Permissions ................................. 79 Statistics............................................................................

It is structured as follows:  The cname node is optional. the general client account information is specified by complex type clientAddGenInfo (plesk_client.64 Supported Operations Type clientAddGenInfo When creating the client account. Specifies the company name. Data type: string (0 to 60 characters long). .xsd).

Supported Operations 65     The pname node is required. The passwd node is required. The status node is optional. you can also use two-letter locale names. use four-letter locale names (RFC 1766). you will receive the error (error code 1019). the operations will be successfully processed. If you specify two-letter locale name in a request packet. The city node is optional. Data type: string (1 to 60 characters long). Specifies the postal address of the client account owner. The node is supported since protocol version 1.6.1.5.1.1.xsd). and request packet protocol is API RPC v. Specifies the current status of the client account.0.0 or later. Specifies the city of the client account owner. Data type: string (0 to 50 characters long). Data type: objectStatus (plesk_common. Specifies the 2-character country code of the client account owner (US for United States. Default value: en-US.0 and later. Data type: string. In API RPC v.5. Specifies the zip code of the client account owner (specified for US citizens only).).4. If the client account owner is Plesk Administrator. Data type: string (2 characters long). The login node is required. The phone node is optional. Data type: string (1 to 60 characters long). Data type: string (0 to 30 characters long). The fax node is optional.2.0. The node is supported since protocol version 1. . Data type: string (0 to 30 characters long). Data type: string (0 to 50 characters long). CA for Canada. If you use API RPC v. Data type: string (0 to 255 characters long). The address node is optional. Specifies the phone number of the client account owner. Note: In API RPC v. Data type: string (0 to 255 characters long).4. Only status values 0 and 16 can be set up. the client account belongs to the user who issued the request. Specifies the email address of the client account owner. Data type: string. The email node is optional.0. Note: If the information about owner is omitted. Specifies the locale used on the client account.6.0 and earlier versions.0. It specifies the login name of a client account owner.1.0. Specifies the US state of the client account owner (should be specified for US citizens only). specify the admin login name.2. Data type: integer. Data type: string (5 to 14 characters long) . Specifies the login name of the client account. The country node is optional. Specifies the personal name of the customer who owns the client account. Specifies the fax number of the client account owner.            The owner-id node is optional. Specifies the password of the client account. The pcode node is optional. Data type: string (0 to 10 characters long).0. etc. It specifies the ID of a client account owner. The owner-login node is optional.0 or earlier versions. The locale node is optional. Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). The state node is optional.

0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> <owner-id>3</owner-id> </gen_info> </add> </client> </packet> .66 Supported Operations The following packet creates a client account and defines the general settings for it: <packet version="1.com</email> <address>105 Brisbane Road.0.6.</cname> <pname>John Doe</pname> <login>JDoe</login> <status>0</status> <phone>416 907 9944</phone> <fax>928 752 3905</fax> <email>JDoe@example.

The pname node is required. Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). Data type: string (1 to 60 characters long). Specifies the company name. The status node is required. Specifies the personal name of the customer who owns the client account. Data type: date. complex type clientGetGenInfo (plesk_client.xsd) is used in the response get packet. Specifies the login name of the client account. It specifies the date when the specified client account was created.Supported Operations 67 Type clientGetGenInfo When getting the general client account information. Specifies the current status of the client account. The cname node is required. It is structured as follows (reduced version):      The cr_date node is required. Data type: string (1 to 60 characters long). Data type: string (1 to 20 characters long). Data type: objectStatus (plesk_common. Default value: 0. The login node is required.xsd). .

The state node is required.1. The email node is required.0 and later.0 and later. Specifies the type of the client account password. Data type: string (0 to 30 characters long). Specifies the US state of the client account owner (specified for US citizens only). Data type: string. Data type: string (0 to 50 characters long).1.0. Data type: string. The locale node is required. Data type: string (0 to 50 characters long). Deprecated in API RPC v. Data type: string (0 to 255 characters long). The password_type node is optional. etc.4.     The password node is optional. The address node is required. The city node is required.68 Supported Operations         The phone node is required.0 and later versions.1. It contains the client GUID. refer to the GUIDs Overview section of the API RPC Developer Guide. For details on GUIDs. used by API RPC 1.0. Allowed values: crypt | plain. The country node is required. Specifies the locale used on the client account. Data type: string. Specifies the fax number of the client account owner. Specifies the phone number of the client account owner.6.). Specifies the zip code of the client account owner (specified for US citizens only). CA for Canada. Data type: integer.  Note: In API RPC v. The pcode node is required. Data type: string (0 to 255 characters long). Specifies the client account password.0. The guid node is optional. the four-letter locale name is always returned.2.2. Specifies the email address of the client account owner.  . Specifies the city of the client account owner. The fax node is required.2 and earlier. The passwd node is optional.5. Specifies the postal address of the client account owner. This node is supported in API RPC v. Data type: string (0 to 30 characters long). Specifies the 2-character country code of the client account owner (US for United States. It holds the identifier of the client owner (reseller or Plesk administrator). Obsolete. Data type: string (2 characters long). Data type: string (0 to 10 characters long).5.3. Data type: string. The owner-id node is optional. Specifies the client account password. Data type: string. This node is supported in API RPC 1. Default value: en.

Supported Operations 69 Type clientSetGenInfo When setting the general client account information. Data type: string (1 to 60 characters long).xsd). Data type: string (1 to 60 characters long). The status node is optional.  . It is structured as follows:      The cname node is optional. Data type: string. It specifies the personal name of the customer who owns the client account. It specifies the phone number of the client account owner. It specifies the current status of the client account. complex type clientSetGenInfo (plesk_client. The phone node is optional. The pname node is optional. It specifies the login name of the client account. It specifies the company name. The login node is optional. It specifies the client account password. Data type: objectStatus (plesk_common. The passwd node is optional. Default value: 0. Data type: string (0 to 30 characters long).xsd) is used in the response set packet. Allowed values: 0 (active) | 16 (disabled_by admin) | 4 (under backup/restore) | 256 (expired). Only status values 0 and 16 can be set up. Data type: string (1 to 20 characters long).

... It specifies the zip code of the client account owner (specified for US citizens only)..... It specifies the fax number of the client account owner.. you will receive the error (error code 1019)... The address node is optional.. Limits and Permissions This section contains limits and permissions settings for client accounts.0 and later.....0 or later.4. In this section: API RPC 1. 71 API RPC 1.5. Data type: string (2 characters long)..5..2. Data type: string (0 to 50 characters long).....1.  Note: In API RPC v. If you use API RPC v........ Data type: string (0 to 30 characters long). Starting from API RPC 1.5.... In API RPC v.5.. Data type: string (0 to 255 characters long).70 Supported Operations        The fax node is optional.0 and Earlier Versions .... CA for Canada. and request packet protocol is API RPC v...0 you can manage the settings using descriptors....... This node is supported in API RPC 1...... The pcode node is optional. It specifies the 2-character country code of the client account owner (US for United States............2.... For details on descriptors.. It specifies the city of the client account owner....2..1..... The state node is optional.. you can also use two-letter locale names.. If specified.0.. It specifies the US state of the client account owner (specified for US citizens only)...0. Data type: string (0 to 10 characters long)..1.2.  The guid node is optional. refer to the Presentation of Object Descriptor (on page 47) section in API Reference and the Descriptors section in the Programming Guide.. The country node is optional.1.. The city node is optional.. the operations will be successfully processed.. It specifies the locale used on the client account.... The locale node is optional..5.0 and later versions..... It specifies the email address of the client account owner.... Data type: string (0 to 255 characters long).0.. Data type: boolean.....0..............).. If you specify two-letter locale name in a request packet...0 or earlier versions.... Data type: string (0 to 50 characters long). It specifies the postal address of the client account owner...4.0 and Later Versions .. Default value: en-US. Data type: string.4.. The email node is optional. use four-letter locale names (RFC 1766).For details on GUIDs... the new GUID is assigned to the client...0 and earlier versions... 77 . refer to the GUIDs Overview section of the API RPC Developer's Guide. etc.

4........ 74 Limits The limits on use of Plesk resources are defined by complex type clientLimits (plesk_client..................0 and Earlier Versions This section contains limits and permissions settings of a client account............................................ In this section: Limits.........................................0 and earlier....1........................... that are available in API RPC v........4.... 71 Permissions..........................xsd)......Supported Operations 71 API RPC 1.... It is structured as follows: .....2.....................2............

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

4. The max_dom_aliases node is optional. The max_fpse_users node is optional.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. Supported in version 1. Data type: integer.2. Data type: integer. Makes sense for Plesk for Windows only. Specifies the maximum number of domain aliases allowed for the Plesk client just created. Specifies the maximum number of ODBC connections allowed for the Plesk client just created.0 and later. Specifies the maximum number of additional FTP accounts.4.0 and higher. Supported in version 1.net</email> <address>105 Brisbane Road.2.4.    The following packet creates a client account and sets the limits for it: <packet version="1.4.1. Makes sense for Plesk for Windows only. The max_odbc node is optional.</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. Data type: integer. Makes sense for Plesk for Windows only.1. The feature is supported by API RPC 1. 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 higher.Supported Operations 73  The max_subftp_users node is optional. Data type: integer. Specifies the maximum number of additional Microsoft FrontPage accounts.

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

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

4.0 and later. Makes sense for Plesk for UNIX only. Makes sense for Plesk for UNIX only.</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.net</email> <address>105 Brisbane Road. 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> . The allow_local_backups node is optional. The manage_spamfilter node is optional. The allow_ftp_backups node is optional.2.0 and later. Data type: Boolean.4. It allows/disallows Plesk client to use the local repository for backup/restore functions.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. The feature is supported by API RPC 1. Supported beginning with version 1. Makes sense for Plesk for UNIX only. Data type: Boolean.1. The feature is supported by API RPC 1. Data type: Boolean.0 and later.4.76 Supported Operations  The manage_subftp node is optional.    The following sample packet creates a client account and sets permissions for it: <packet version="1.4.4.2. The feature is supported by API RPC 1.2. Data type: Boolean.2.0 of API RPC. It allows/disallows Plesk client to manage spam filter settings. It allows/disallows the client to manage additional FTP accounts (with access to the specified domain folders only) created on domains. It allows/disallows Plesk client to use the FTP repository for backup/restore functions.

..... It specifies a limit name. Note: To manage limits. In this section: Limits........ Note: You can specify multiple limit parameters in one limits node.....0.0 and Later Versions This section contains clients limits and permissions settings of a client account. Data type: string...........0 and later...................... containing names of limits....1.... It specifies a limit value. Data type: any...........  The limit node is optional.5...... For details.. 79 Limits The limits node is presented by clientLimits type (plesk_client.. API RPC 1.....   The name node is required........xsd).....  The overuse node is required.............. .Supported Operations 77 API RPC 1......................0 and Later Versions For protocol version 1...0. 77 Permissions........0.. Data type: PleskLimitType (plesk_client... Allowed values: block | notify | normal........ Data type: sting.....6..... that are available in API RPC v........6..xsd)..........0 and later.. you should first retrieve limits descriptor (for a specified client)............... the limits node graphical representation is as follows:  The resource-policy node is optional............0. It specifies parameters of a limit.............5... The value node is required... It specifies the limits overuse policy for a client account. It specifies limits policy for a client account.......... refer to the Retrieving Descriptor of Limits (on page 119) section.

Data type: sting. It specifies parameters of a limit. graphical representation of the limits node is as follows:  The limit node is required. The following code example sets the maximum databases limit: <limits> <limit> <name>max_db</name> <value>100</value> </limit> </limits> .1 and Earlier Versions For protocol version 1. It specifies a limit name.2.1 and earlier. The value node is required. Data type: any.5.5.2. Note: You can specify multiple limit parameters in one limits node. Data type: PleskLimitType (plesk_client.xsd).   The name node is required.78 Supported Operations The following code example sets the limits overuse policy and the maximum databases limit: <limits> <resource-policy> <overuse>notify</overuse> </resource-policy> <limit> <name>max_db</name> <value>100</value> </limit> </limits> API RPC 1. It specifies a limit value.

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

It specifies the number of email boxes created by Plesk Client. It specifies the amount of disk space occupied by the given Plesk Client. It specifies the number of automatic response messages created by Plesk Client. The mail_groups node is required. Default value: 0. Data type: unsignedInt. Data type: integer. It specifies the number of email groups created by Plesk Client. Data type: unsignedInt.80 Supported Operations 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 number of sub-domains created by Plesk Client. Default value: 0. Default value: 0. Default value: 0. Data type: unsignedInt. Default value: 0. Default value: 0. The mail_resps node is required. The subdomains node is required. Data type: unsignedInt. It specifies the number of active domains created by Plesk Client.xsd). The mail_lists node is required. This node is structured as follows:         The active_domains node is required. The disk_space node is required. Data type: unsignedInt. The redirects node is required. Data type: unsignedInt. Default value: 0. The postboxes node is required. It specifies the number of mailing lists created by Plesk Client. . It specifies the number of redirects created by Plesk Client. Data type: unsignedInt. Default value: 0.

Note: If you interact with Plesk 9 through API RPC 1.... Default value: 0.............. Default value: 0........ It specifies the amount of traffic (in bytes) spent by Plesk client during the previous day.............. The webapps node is required.......... In this section: Request Packet Structure.......................................... refer to section Managing Client Templates (see page 135)...... Data type: integer........... Data type: unsignedInt....... The traffic node is required.. It specifies the number of databases used by Plesk client... 86 ........... It specifies the number of web users created by Plesk Client.......... a created client account is assigned to Plesk Administrator.. Client account presents some general information about Plesk client and a collection of various settings.... Default value: 0... Default value: 0.. Data type: unsignedInt.............................. These settings are as follows:      Ownership settings 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.................. It can be applied only when creating the client account........1 and earlier versions. while settings can be specified later.............. Data type: unsignedInt..5. It specifies the amount of traffic (in bytes) spent by Plesk client monthly......2... The traffic_prevday node is required................. To learn more about client templates......... 82 Request Samples .................Supported Operations 81      The web_users node is required............ Creating Client Account Client accounts can be created by Plesk Administrator only........ The data_bases node is required....................... 85 Response Samples .. Default value: 0...... It specifies the number of Tomcat web applications used by Plesk Client....... The only exception is a client template................ Data type: integer......................... 83 Response Packet Structure ..

Specifies the set of limits imposed on Plesk resources accessible to the new client. Data type: string. The limits node is optional. Specifies the general information about the new client account.4. The template-name node is optional. Data type: integer.2. See the structure of this node in topic General Client Account Settings (see page 64). it is nested within the ClientTypeRequest complex type (client_input. The permissions node is optional.      . The add_packages_to_client_pool is optional. The template-id node is optional.xsd). The add node has the following graphics representation:  The gen_info node is required.4.0 and later.82 Supported Operations Request Packet Structure A request XML packet adding a new client account to Plesk database includes the add operation node: <packet version=”1.0 and later.0”> <client> <add> … </add> </client> </packet> The add node does not have a separate type.xsd). Data type: none.xsd). Is used to specify the client template name if the new client account must be based on any. Data type: clientAddGenInfo (plesk_client. The feature is supported in API RPC 1.xsd). Data type: clientPerms (plesk_client. See the structure of this node in the Limits and Permissions (on page 70) topic. Is used to specify the client template if the new client account must be based on any. See the structure of this node in the Limits and Permissions (on page 70) topic. Data type: clientLimits (plesk_client. Specifies the list of web application distributions that should be added to the client pool (to be deployed to the client's domains later). See the structure of this node below.2.2.4. Specifies the client‘s list of permissions for using Plesk resources and managing own services. The feature is supported in API RPC 1.

1. Data type: Boolean.</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 and by Plesk for Unix since API RPC protocol v. It specifies the identifier of the distribution package to be added to the client pool.2. Is true if a Sitebuilder user should be created when creating the client template.net</email> <address>105 Brisbane Road.2.0.Supported Operations 83 Note: You can use only templates to which the client account owner has access.  The sbnet-user node is optional. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> </add> </client> </packet> .5. For instance. Plesk Administrator can use only shared templates to create client accounts for resellers. it is defined within the add node as follows:  The package_id node is required.4.1.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. Request Samples The following packet creates a client account and sets the collection of settings for it: <packet version="1.4.2. Data type: integer. The feature is supported by Plesk for Windows since API RPC protocol v. The add_packages_to_client_pool node doesn't have a special data type.

0"> <client> <add> <gen_info> <cname>LogicSoft Ltd.</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. See the Managing Client Templates (see page 135) section for details. so this packet creates a client account with these settings set already.0"> <client> <add> <gen_info> <cname>LogicSoft Ltd. To create multiple client accounts (e. etc).</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. use a different add operations for each: <packet version="1.84 Supported Operations A client account can be created using a client template.2.net</email> <address>105 Brisbane Road.g. 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. using a client template).2. The following packet performs this task: <packet version="1.. permissions.4.4.net</email> <address>105 Brisbane Road. Unit 2</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> </add> <add> .

Data type: string. The status node is required.net</email> <address>122 Greenroad Valley.xsd). Allowed values: ok | error. Data type: integer. Is used to return the error code when the add operation fails. Data type: resultType (common. The errtext node is optional. Can be used to return an error message if the add operation fails. Unit 1</address> <city>Toronto</city> <state/> <pcode/> <country>CA</country> </gen_info> <template-name>base_template</template-name> </add> </client> </packet> 85 Response Packet Structure The add node of the response packet is structured as follows:      The result node is required.Supported Operations <gen_info> <cname>TechnoSoft Ltd.</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. The errcode node is optional. . It returns the execution status of the add operation. It is required if the add operation succeeds. It wraps the result of the requested add operation. Data type: string. The id node is optional. Data type: unsignedInt. Returns the unique identifier of the client account just added to Plesk.

0”> <client> <add> <result> <status>ok</status> <id>2435</id> </result> </add> </client> </packet> If the packet created more than one client account.0”> <client> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. .1.4.0”> <client> <add> <result> <status>ok</status> <id>2435</id> </result> </add> <add> <result> <status>ok</status> <id>2436</id> </result> </add> </client> </packet> If the operation fails. each create operation will be reported in a separate add node: <packet version=”1.4.2.5.2.0 and later versions.2. The add sections will follow one another in the order they have been listed in the request packet.</errtext> </result> </add> </client> </packet> In API RPC 1. the error with error code 1007 occurs. the negative response can look as follows: <packet version=”1. when adding the client with already existing login.4.86 Supported Operations Response Samples A response packet received after the client account is created successfully looks as follows: <packet version=”1.

91 Response Samples ..............1 and earlier versions.............. reseller accounts and artificial client account.....2.......... spent traffic.)............................ Note: If you interact with Plesk 9 through API RPC 1............... 89 Response Packet Structure .................................... Plesk will return info on all client accounts.................... contact data..Supported Operations 87 Getting Information About Client Accounts The get operation is used to retrieve client account settings from Plesk database...... name............5....................... company.... 93 Request Packet Structure A request XML packet retrieving information about the client accounts from Plesk database includes the get operation node: <packet version=”1................... 87 Request Samples ................... Plesk user hierarchy will not be retained.................................... send a request packet with the get operation to Plesk server.. Note: If you interact with Plesk 9 through API RPC 1.2.. It means that if you request statistics for a reseller who owns client accounts....... the get operation returns total reseller account statistics...2...... and you request info on all client accounts using get. 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......... These settings are as follows:      General information about a Plesk client (owner.....................................0”> <client> <get> … </get> </client> </packet> .. etc..........5................ the total statistics for these client accounts and for the reseller account will be provided (number of subdomains......1 and earlier versions... In this section: Request Packet Structure....4..

The permissions node is optional.xsd). refer to the Limits and Permissions (on page 70) section. It is used to request permissions set for the specified Plesk clients. Data type: none. Data type: none.xsd). The gen_info node is optional. Data type: none. It is used to request for the general client account settings. The limits node is optional. It indicates the types of information requested from Plesk database. It is used to request statistics on the specified clients. Data type: clientDatasetType (plesk_client. The stat node is optional. For details.   . The ippool node is optional. Data type: none. It is used to request the IP pool configuration settings for the specified clients.88 Supported Operations The get node does not have a separate type. For details. refer to the Limits and Permissions (on page 70) section. Data type: none. The get node has the following graphics representation:     The dataset node is required. It is used to request the limits set for the specified clients. it is nested within the ClientTypeRequest complex type (client_input.

4. specify the packet as follows: <packet version=”1.2. use the packet as follows: <packet version=”1.Supported Operations 89 Request Samples To get the information about the client account.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.0”> <client> <get> <filter> <id>1324</id> <id>1325</id> </filter> <dataset> <gen_info/> <stat/> <permissions/> <limits/> <ippool/> </dataset> </get> </client> </packet> .2.4.

4.0”> <client> <get> <filter/> </get> </client> </packet> . The following packet will be invalid: <packet version=”1.2.2.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.4. use multiple get sections: <packet version=”1.2. the following packet will request info on all Plesk reseller and client accounts: <packet version=”1.90 Supported Operations You cannot identify multiple client accounts by different parameters (id and login) in the same filter section.5.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> If you work in the Plesk 9 backward compatibility mode.

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

2. See the structure of this node in topic General Client Account Settings (see page 67).      .5. The limits node is optional. It returns the IP pool configuration settings for the specified client account. See the structure of this node in the Statistics (see page 80) topic.1.xsd).0 and by Plesk for Unix since API RPC protocol v. Data type: clientStatType (plesk_client. For details.92 Supported Operations  The gen_info node is optional.4. Data type: clientPerms (plesk_client. The feature is supported by Plesk for Windows since API RPC protocol v. It returns a the statistics collected on the specified client account.2.xsd). Data type: Boolean. Data type: clientGetGenInfo (plesk_client. See the structure of this node in the IP Pool Settings (see page 79) topic. It returns a collection of general client account settings. The stat node is optional.0.xsd). The ippool node is optional. refer to the Limits and Permissions (on page 70) section. The permissions node is optional.1. For details. refer to the Limits and Permissions (on page 70) section. Data type: clientLimits (plesk_client. It returns a collection of permissions set for the specified client account.xsd). It indicates whether a SiteBuilder user account was created for the given client account. It returns a collection of limits set for the specified client account.xsd). The sbnet-user node is optional. Data type: ipPoolType (plesk_client.

5.Supported Operations 93 Response Samples If you use API RPC 1.0 or later versions.0.0.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> . a positive response from the server can look as follows: <packet version=”1.

94 Supported Operations If you use API RPC 1. a positive response from the server can look as follows: <packet version=”1.2.0 or earlier versions.4.0”> <client> <get> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.4.</errtext> <id>1324</id> </result> </get> </client> </packet> .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.2.2.4.

............... it is nested within the ClientTypeRequest complex type (client_input..................2.........1 and earlier versions................5...... ..............xsd)......... The del node has the following graphics representation:  The filter node is required......4................... refer to the Filtering Issues (on page 60) section.......... Note: If you interact with Plesk 9 through API RPC 1.......... 95 Request Samples . and remove a reseller account using del..... 96 Response Packet Structure ........... 99 Request packet Structure A request XML packet deleting a client account from Plesk database includes the del operation node: <packet version=”1............................2..............Supported Operations 95 Deleting Client Accounts The del operation is used to remove the specified client account and all its settings from Plesk database..................... all client accounts owned by this reseller will also be removed................ 98 Response Samples ..................... For more information on filters.........xsd)............... It specifies the filtering rule.................. In this section: Request packet Structure ................................0”> <client> <del> … </del> </client> </packet> The del node does not have a separate type.. Data type: clientSelectionFilterType (client_input.........................................

2.0”> <client> <del> <filter> <id>1324</id> <id>1325</id> </filter> </del> </client> </packet> Or: <packet version=”1.4. they can be filtered either by id or by login: <packet version=”1.2.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> .4.96 Supported Operations Request Samples A single request packet can delete a client account or multiple client accounts.2.4. If multiple client accounts are deleted.

use multiple del sections: <packet version=”1.2.4.0”> <client> <del> <filter> <id>1324</id> </filter> </del> <del> <filter> <login>advent</login> </filter> </del> </client> </packet> .Supported Operations 97 To fix this packet.

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

the response packet is as follows: <packet version=”1.Supported Operations 99 Response Samples After the specified client account has been deleted successfully. the response received from Plesk server can look as follows: <packet version=”1.4.2.2.4.</errtext> <id>1325</id> </result> </del> </client> </packet> .0”> <client> <del> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found. the response can look as follows: <packet version=”1.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.0”> <client> <del> <result> <status>ok</status> <id>1324</id> </result> </del> </client> </packet> If multiple client accounts has been deleted successfully.2.4.</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

.  .............................. Data type: none. The set node has the following graphics representation:  The filter node is required....................................... it is nested within the ClientTypeRequest complex type (client_input.......................4.........xsd)......... For more information on filters..... The values node is required......... 100 Request Samples ............ refer to the Filtering Issues (on page 60) section............................................................................................100 Supported Operations Setting Client Account Properties The set operation is used to update Plesk client account settings...........................0”> <client> <set> … </set> </client> </packet> The set node does not have a separate type.2. 106 Request Packet Structure A request XML packet setting various settings for the specified client account includes the set operation node: <packet version=”1............. Data type: clientSelectionFilterType (client_input................... It specifies the filtering rule....... 101 Response Packet Structure .................................... In this section: Request Packet Structure.. It is used to specify the categories of settings that will be set to Plesk database..... 105 Response Samples ....xsd)..................

5.2. For details. refer to the Limits and Permissions (on page 70) section. use the following packet: <packet version=”1. refer to the Limits and Permissions (on page 70) section. See the structure of this node in topic General Client Account Settings (see page 64).2.0 and by Plesk for Unix since API RPC protocol v.    Request Samples In API RPC 1.0.2. Data type: clientPerms (plesk_client. The limits node is optional. It specifies a collection of limits set for the specified client account. Data type: clientSetGenInfo (plesk_client.4. For details. The sbnet-user node is optional.0”> <client> <set> <filter> <login>MyClient</login> </filter> <values> <gen_info> <guid/> </gen_info> <values> </set> </client> </packet> To change GUIDs of all clients.0”> <client> <set> <filter/> <values> <gen_info> <guid/> </gen_info> <values> </set> </client> </packet> .2.2. Data type: clientLimits (plesk_client.1. It specifies a collection of Plesk client permissions.1.5.xsd).Supported Operations 101  The gen_info node is optional.5. you can change a client GUID using the following packet: <packet version=”1.5. Data type: Boolean. It is used to enable/disable the creation of a SiteBuilder user account for this Plesk client.0 and later versions. The permissions node is optional.xsd).xsd). The feature is supported by Plesk for Windows since API RPC protocol v. It specifies a collection of general settings.

a typical request packet changing client settings can look as follows: <packet version=”1.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> <limit> <name>expiration</name> <value>1134616208</value> </limit> </limits> </values> </set> </client> </packet> .0 or later versions.5.102 Supported Operations If you use API RPC 1.5.0.0.

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> </set> </client> </packet> .Supported Operations 103 If you use API RPC 1.2.2.2. the request packet looks as follows: <packet version=”1.4.4.4.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.0 or earlier versions.

104 Supported Operations The following packet is invalid as it uses both filtering parameters within the same filter: <packet version=”1.4.2.4.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> <max_webapps>30</max_webapps> <max_traffic>209715200</max_traffic> <max_db>30</max_db> <expiration>1134616208</expiration> </limits> </values> </set> </client></packet> .2.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. use multiple set operations: <packet version=”1.

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

4.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 packet as follows is received from the server: <packet version=”1.</errtext> </result> </set> </client> </packet> .2.4.106 Supported Operations Response Samples Once the specified client accounts are updated.</errtext> <id>1324</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found. the response can look as follows: <packet version=”1.0”> <client> <set> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2.

.......2.................... Data type: ip_address (common............................... It specifies the unique identifier of the client account whose IP pool is added with new IP addresses........xsd)........xsd)....... ....................... The ip_address node is required..... Data type: integer...................0”> <client> <ippool_add_ip> … </ippool_add_ip> </client> </packet> The ippool_add_ip node is specified by type ipPoolOperateType (plesk_client..................... It specifies the IP address to be added to the IP pool of the specified Plesk clients............................ 108 Response Packet Structure ........... 108 Response Samples .............Supported Operations 107 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....................... In this section: Request Packet Structure.................................. The ippool_add_ip node has the following graphics representation:   The client_id node is required......................................... 107 Request Samples ...................... 109 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..................................

It is required if the ippool_add_ip operation succeeds.122</ip_address> <ip_address>192. Data type: string.4.2. It wraps the result of the requested ippool_add_ip operation. specify the packet as follows: <packet version=”1. 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: string. The status node is required. Is used to return the error code when the ippool_add_ip operation fails. The errcode node is optional.0. Returns the IP address added to the IP pool of the specified client account(s). Data type: resultType (common. The ip_address node is optional.2. Data type: integer.123</ip_address> </ippool_add_ip> </client> </packet> Response Packet Structure The ippool_add_ip node of the response packet is structured as follows:      The result node is required.  . Can be used to return an error message if the ippool_add_ip operation fails. Data type: unsignedInt.xsd). The client_id node is optional. The errtext node is optional.xsd). Allowed values: ok | error.2.108 Supported Operations Request Samples To add an IP address to the client‘s IP pool.0”> <client> <ippool_add_ip> <client_id>1234</client_id> <ip_address>192. It returns the execution status of the ippool_add_ip operation. Data type: ip_address (common.0.

..........................Supported Operations 109 Response Samples A positive response packet received from the server can look as follows: <packet version=”1.....2... 112 ................................... the negative response can look as follows: <packet version=”1....2............2...........................122</ip_address> <ip_address>192..................................2....0................................... Note: You cannot remove an IP address from IP pool of a Plesk user who shares this IP with other Plesk users.............0”> <client> <ippool_add_ip> <result> <status>ok</status> <client_id>1234</client_id> <ip_address>192.......................................................4...........</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......... 110 Response Packet Structure ................................... 110 Request Samples .........123</ip_address> </result> </ippool_add_ip> </client> </packet> If the ippool_add_ip operations fails...............0”> <client> <ippool_add_ip> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed........4...... In this section: Request Packet Structure..0......... 111 Response Samples ......

110 Supported Operations 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. Data type: integer.2. Request Samples To remove the specified IP addresses from the client‘s IP pool.0”> <client> <ippool_del_ip> … </ippool_del_ip> </client> </packet> The ippool_del_ip node is specified by type ipPoolOperateType (plesk_client.0.2.2.xsd). specify the packet as follows: <packet version=”1.0”> <client> <ippool_del_ip> <client_id>1234</client_id> <ip_address>192. It specifies the IP address that will be removed from the IP pool of the specified Plesk clients. Data type: string.2.4.123</ip_address> </ippool_del_ip> </client> </packet> .0. The ip_address node is required.4. It specifies Plesk client from whose IP pool the specified IP addresses are taken away. The ippool_add_ip node has the following graphics representation:   The client_id node is required.122</ip_address> <ip_address>192.

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

....... 115 Response Samples ...............2..............0”> <client> <ippool_del_ip> <result> <status>ok</status> <client_id>1234</client_id> <ip_address>192.....0...122</ip_address> <ip_address>192.................................. 113 Response Packet Structure ..4...................................................................4.......123</ip_address> </result> </ippool_del_ip> </client> </packet> If the ippool_del_ip operations failed..... 113 Request Samples ..2.......0”> <client> <ippool_del_ip> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed..... the response can look as follows: <packet version=”1..................2......2..... In this section: Request Packet Structure.............................................</errtext> </result> </ippool_del_ip> </client> </packet> 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 client's home page........................................112 Supported Operations Response Samples A positive response packet received from the server can look as follows: <packet version=”1............................................0............... 118 ................

If multiple Plesk clients are requested.2. they can be filtered either by id or by login: <packet version=”1. The cform_buttons_list node has the following graphics representation:  The filter node is required.4.Supported Operations 113 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. For more information on filters.xsd).2.xsd). Request Samples A single request packet can retrieve the list the buttons for a single Plesk client or multiple Plesk clients.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. It specifies the filtering rule.4.0”> <client> <cform_buttons_list> <filter> <id>1324</id> <id>1325</id> </filter> </cform_buttons_list> </client> </packet> . Data type: clientSelectionFilterType (client_input. refer to the Filtering Issues (on page 60) section.

114

Supported Operations

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

115

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 home page. Data type: buttonDataType (plesk_common.xsd). See the structure of this node below.

116

Supported Operations

The button node is structured as follows:

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

Supported Operations

117

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

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 Plesk GUI. 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 Plesk GUI. 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.

118

Supported Operations

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> </packet>

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>

Supported Operations

119

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 47) section. For details on client's limits, refer to the Limits (on page 77) section.

In this section:
Request Packet Structure.................................................................................. 119 Request Samples .............................................................................................. 120 Response Packet Structure ............................................................................... 121 Response Samples ........................................................................................... 121

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:

The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType (client_input.xsd). For information on filters, refer to the Filtering Issues (on page 60) section.

120

Supported Operations

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

121

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 48) 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 47). Data type: string.

 

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

122

Supported Operations

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>

123

124

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>

Supported Operations

125

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 47) section. For details on client's permissions, refer to the Permissions (on page 79) section.

In this section:
Request Packet Structure.................................................................................. 125 Request Samples .............................................................................................. 126 Response Packet Structure ............................................................................... 127 Response Samples ........................................................................................... 127

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. Data type: clientSelectionFilterType (client_input.xsd). For information on filters, refer to the Filtering Issues (on page 60) section.

126

Supported Operations

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>

Supported Operations

127

Response Packet Structure
The get-permission-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-permissiondescriptor operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It is used to return the error code when the getpermission-descriptor operation fails. Data type: unsignedInt. The errtext node is optional. Can be used to return the error message if the getpermission-descriptor operation fails. Data type: string. The filter-id node is optional. It is required if the get-permission-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 48) section. Data type: anySimple. The id node is optional. It is required if the get-permission-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 47). Data type: string.

 

Note: This descriptor contains permissions extensions. For details, refer to the Extension of Permissions Descriptor (on page 51) section.

128

Supported Operations

Response Samples
A positive response from the server can look as follows:
<packet version="1.5.0.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> ... </descriptor> </result> </get-permission-descriptor> </client> </packet>

Supported Operations

129

Upgrading Client Account to Reseller Account
The convert-to-reseller operation is used to upgrade client accounts to reseller accounts. Note: The operation is supported since protocol version 1.6.0.0.

In this section:
Request Packet Structure.................................................................................. 129 Request Samples .............................................................................................. 130 Response Packet Structure ............................................................................... 130 Response Samples ........................................................................................... 131

Request Packet Structure
A request XML packet upgrading client accounts to reseller accounts includes the convert-to-reseller node:
<packet version=”1.6.0.0”> <client> <convert-to-reseller> … </convert-to-reseller> </client> </packet>

The convert-to-reseller node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd). Its graphical representation is as follows:

The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType. For more information on filters, refer to the Filtering Issues section (on page 60).

130

Supported Operations

Request Samples
The request packet updating a client account to a reseller account looks as follows:
<packet version ="1.6.0.0"> <client> <convert-to-reseller> <filter> <owner-login>JDoe</owner-login> </filter> </convert-to-reseller> </client> </packet>

Response Packet Structure
The convert-to-reseller 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 operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It is used to return the error code when the operation fails. Data type: unsignedInt.

Supported Operations

131

  

The errtext node is optional. Can be used to return the error message if the operation fails. Data type: string. The filter-id node is optional. Returns the filtering parameter. Data type: anySimple. The id node is optional. It is required if the operation succeeds. Returns the unique identifier of the reseller account. Data type: integer.

Response Samples
A positive response packet received from the server can look as follows:
<packet version=”1.6.0.0”> <client> <convert-to-reseller> <result> <status>ok</status> <filter-id>JDoe</filter-id> <id>192</id> </result> </convert-to-reseller> </client> </packet>

If the operations failed, the response can look as follows:
<packet version=”1.6.0.0”> <client> <convert-to-reseller> <result> <status>error</status> <errcode>1013</errcode> <errtext>Client does not exist</errtext> <filter-id>JDoe</filter-id> </result> </convert-to-reseller> </client> </packet>

132

Supported Operations

Changing Client Account Owner
The change-owner operation is used to change the owner of a client account. Note: The operation is supported for protocol version 1.6.0.0 and later.

In this section:
Request Packet Structure.................................................................................. 132 Request Samples .............................................................................................. 133 Response Packet Structure ............................................................................... 133 Response Samples ........................................................................................... 134

Request Packet Structure
A request XML packet assigning a new owner to a client account includes the changeowner node:
<packet version=”1.6.0.0”> <client> <change-owner> … </change-owner> </client> </packet>

The change-owner node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd). The change-owner node graphical representation is as follows:

The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType. For more information on filters, refer to the Filtering Issues (on page 60) section. The new-owner-id node is required. It specifies the ID of a new client account owner. Data type: integer. The new-owner-login node is required. It specifies the login name of a new client account owner. Data type: string.

 

Supported Operations

133

Request Samples
The request packet assigning a new owner to a client account looks as follows:
<packet version ="1.6.0.0"> <client> <change-owner> <filter> <owner-login>JDoe</owner-login> </filter> <new-owner-login>RRoe</new-owner-login> </change-owner> </client> </packet>

Response Packet Structure
The change-owner 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 (common.xsd).     The status node is required. It specifies the execution status of the change-owner operation. Data type: result_status (common.xsd). Allowed values: ok|error. The errcode node is required if the change-owner operation fails. It returns the error code. Data type: unsignedInt. The errtext node is required if the change-owner operation fails. It returns the error message. Data type: string. The filter-id node is required if the change-owner operation succeeds. It returns the filtering parameter. Data type: anySimple.

134

Supported Operations

The id node is required if the change-owner operation succeeds. It returns ID of the client account which owner was changed. Data type: id_type (common.xsd).

Response Samples
A positive response packet received from the server can look as follows:
<packet version=”1.6.0.0”> <client> <change-owner> <result> <status>ok</status> <filter-id>JDoe</filter-id> <id>2</id> </result> </change-owner> </client> </packet>

If the operations failed, the response can look as follows:
<packet version=”1.6.0.0”> <client> <change-owner> <result> <status>error</status> <errcode>1013</errcode> <errtext>Owner does not exist</errtext> <filter-id>JDoe</filter-id> </result> </change-owner> </client> </packet>

Supported Operations

135

Managing Client Templates
Operator: <client-template> XML Schema: client_template.xsd Plesk version: Plesk 8.0 for UNIX | Plesk 7.6 for Windows and higher API RPC version: 1.4.1.0 and higher Plesk user: Plesk Administrator Description Client templates are a kind of presets which are used for creating multiple client accounts with identical permissions, limits, IP pool settings, and preferences. Supported operations

   

ADD (see page 143) creates a client template GET (see page 148) retrieves information on a particular client template DEL (see page 153) removes a client template SET (see page 156) updates preferences, limits, and IP pool configuration set for a client template

In this section:
Client Template Settings ................................................................................... 136 Filtering Issues .................................................................................................. 142 Creating Client Template ................................................................................... 143 Retrieving Information on Client Templates ....................................................... 148 Removing Client Templates .............................................................................. 153 Updating Client Template Settings .................................................................... 156

136

Supported Operations

Client Template Settings
This section describes a collection of Plesk client settings that can be defined in a client template. These settings can be specified when creating a client template or later.

In this section:
Permissions....................................................................................................... 136 Limits................................................................................................................. 138 IP Pool Settings................................................................................................. 140 Preferences ....................................................................................................... 141

Permissions
For details on client permissions, refer to the Limits and Permissions (on page 70) section. Samples The "Limits" XML schema is the same for client and client template. In API RPC 1.5.0.0 and later versions, 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.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>

Supported Operations <permission> <name>manage_dns</name> <value>true</value> </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>

137

138

Supported Operations

In API RPC 1.4.2.0 and earlier versions, a packet that requests for creating a new client template and with a collection of permissions can look as follows:
<packet version=”1.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
Client template limits and client limits are described by the same XML structures. The only difference between descriptions of these two objects is in names of types that define XML structures: The former is of clientLimits type, while the latter is of clientTemplateLimits type. For details on client limits description, refer to the Limits and Permissions (on page 70) section. Samples In API RPC 1.5.0.0 and later versions, a packet that requests for creating a new client template and with a collection of limits can look as follows:
<packet version=”1.5.0.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>

Supported Operations </limit> <limit> <name>max_db</name> <value>50</value> </limit> <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>

139

In API RPC 1.4.2.0 and earlier versions, a packet that requests for creating a new client template and with a collection of limits can look as follows:
<packet version=”1.4.2.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>

140

Supported Operations

IP Pool Settings
A client template holds IP pool settings for clients that will be created using this template. The client IP pool can contain a set of shared and exclusive IP addresses. Shared IP addresses are selected from Plesk server IP pool. Exclusive IP addresses are created for the client. IP pool settings are specified by the ip-pool node which is presented by the ClienttemplatePoolType complex type (client_template.xsd). It is structured as follows:

 

The ip-address node is optional. It specifies the IP address available in Plesk IP pool. Data type: ip_address (common.xsd). The allocate-ip node is optional. It specifies the number of exclusive IP addresses. Data type: integer.

The following request packet creates a client template for Plesk Administrator and specifies IP pool settings for the template:
<packet version=”1.6.0.0”> <client-template> <add> <name>base_template</name> <ip-pool> <ip-address>196.0.2.121</ip-address> <ip-address>196.0.2.122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> <owner-login>admin</owner-login> </add> </client-template> </packet>

Supported Operations

141

Preferences
Preferences for clients created with a client template are specified by the preferences node. This node is presented by the ClientTemplatePreferencesType complex type (plesk_client.xsd). 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 feature is supported by Plesk for Windows since API RPC protocol v.1.4.2.0 and by Plesk for Unix since API RPC protocol v.1.5.2.0. The shared node is optional. It indicates whether other Plesk users have access to this template. Specify this option only for client templates created by Plesk Administrator. Data type: boolean. Supported since protocol version 1.6.0.0.

Note: The preferences node is supported by API RPC 1.4.2.0 and later. The following request packet creates a client template and sets preferences for it:
<packet version=”1.6.0.0”> <client-template> <add> <name>base_template</name> <preferences> <sbnet-user>true</sbnet_user> <shared>false</shared> </preferences> <owner-id>3</owner-id> </add> </client-template> </packet>

or by name.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> <id>11</id> <id>12</id> </filter> <limits/> <owner-login>JDoe</owner-login> </get> </client-template> </packet> .142 Supported Operations Filtering Issues Filtering is the way a request XML packet indicates the object (one or several client templates) to which an operation is to be applied. The filter node is presented by the ClientTemplateFilterType complex type (client_template. The same is true if several client templates are filtered by the same filter node. The name node is required. It specifies the client template ID which is unique for a template owner.0.xsd). Parameters nested within the filter node are called filtering rule. Data type: string.6. This data type is structured as follows:   The id node is required. Note: Different client templates which belong to different Plesk users can have the same ID or name. A client template can be filtered either by id. The following sample packet is invalid as it uses both id and name within the same filter: <packet version=”1. Data type: integer. It specifies the client template name which is unique for a template owner.

0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> <owner-login>JDoe</owner-login> </get> <get> <filter> <id>11</id> <id>12</id> </filter> <limits/> <owner-login>JDoe</owner-login> </get> </client-template> </packet> The filter node can be left empty. use two different <get> sections instead: <packet version=”1.6.0”> <client-template> <get> <filter/> <owner-id>4</owner-id> </get> </client-template> </packet> .0. In this case all client templates belong to one Plesk user will be filtered: <packet version=”1.6.Supported Operations 143 To fix this packet.0.

. Its graphical representation is as follows:   The name node is required.....xsd)....................................6..................144 Supported Operations Creating Client Template The add operation is used to create client templates................ 145 Response Packet Structure .............. 146 Response Samples ..................................... 144 Request Samples ................... ...... 147 Request Packet Structure A request XML packet adding a new client template to Plesk database includes the add operation node: <packet version=”1......................................................................... refer to the Limits (see page 138) section............ Data type: string.... Data type: clientLimits (plesk_client....... The limits node is optional......................0”> <client-template> <add> … </add> </client-template> </packet> The add node is presented by type ClienttemplateAddInputType (client_template.......... It specifies a collection of limits that will be set for clients created using this template............................ It specifies client template name unique for the template owner. To view the structure of this node..xsd)................. In this section: Request Packet Structure...........0.......................

0”> <client-template> <add> <name>base_template</name> <ip-pool> <allocate-ip>2</allocate-ip> </ip-pool> <owner-login>JDoe</owner-login> </add> <add> <name>quick_template</name> <ip-pool> <ip-address>192. refer to the Preferences (see page 141) section. It specifies IP pool settings for clients created using this template. It specifies the ID of the client template owner. refer to the IP Pool Settings (see page 140) section.0. To view the structure of this node. Data type: clienttemplateIpPoolType (client_template. The node is supported since protocol version 1. To view the structure of this node.2. It specifies a collection of permissions for clients created using this template.6.Supported Operations 145  The permissions node is optional. <packet version=”1.0.xsd). It specifies a collection of preferences for clients created using this template. The preferences node is optional.2. Data type: string.     Request Samples The following packet creates a client template with a minimal collection of settings.121</ip-address> <ip-address>192. It specifies the login name of the client template owner. refer to the Permissions (on page 136) section.0.0.xsd). The owner-login node is required. include two different add operations: <packet version=”1. The node is supported since protocol version 1.6.6.0.0. The owner-id node is required. The ip-pool node is optional.6. Data type: clientPerms (plesk_client. Data type: ClientTemplatePreferencesType (client_template.0”> <client-template> <add> <name>base_template</name> <ip-pool> <allocate-ip>2</allocate-ip> </ip-pool> <owner-id>2</owner-id> </add> </client-template> </packet> To create two client templates with a single packet. Data type: integer.0.122</ip-address> </ip-pool> <owner-id>4</owner-id> </add> </client-template> </packet> .xsd). To view the structure of this node.0.

xsd).xsd). The id node is required if the add operation succeeds. The errcode node is required if the add operation fails. . It returns the name of the created client template. Data type: string. It returns the ID of the created client account. Data type: result_status (common. It wraps the response retrieved from the server.146 Supported Operations Response Packet Structure The add node of the output XML packet is structured as follows:       The result node is required. It specifies the execution status of the add operation. Data type: integer. Data type: string. Allowed values: ok|error. The status node is required. It returns the error code. The name node is required if the add operation succeeds. The errtext node is required if the add operation fails. Data type: ClientTemplateOutputResulttype (client_template. Data type: unsignedInt. It returns the error message.

2.4.Supported Operations 147 Response Samples A positive response received from the server after adding a new client template can look as follows: <packet version=”1.4.2.</errtext> </result> </add> </client-template> </packet> .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.0”> <client-template> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

... 150 Response Packet Structure ...................................... The get operation will return only the settings currently stored in the database.......................................................0”> <client-template> <get> … </get> </client-template> </packet> ...... 151 Response Samples ................0.......................................................... A client template can even be empty (specified by its id and name and not containing any other information)............................................................................... In this section: Request Packet Structure.... 148 Request Samples ..148 Supported Operations Retrieving Information on Client Templates The get operation is used to retrieve information about client templates from Plesk database..........................6...................... This information is as follows:     client template name and ID which are unique for the template owner permissions and limits on use Plesk resources IP pool settings preferences The get operation can return all or particular settings currently present in Plesk database. 152 Request Packet Structure A request XML packet retrieving information on specified client templates from Plesk database includes the get operation node: <packet version=”1.......................... All settings are optional and can be missing in the client template...................

Data type: none.0. Data type: none. It specifies the filtering rule. The owner-id node is required. Data type: none. The owner-login node is required. Its graphical representation is as follows:  The filter node is required. It is used to request IP pool settings defined for a client template. Data type: ClientTemplateFilterType (client_template.0. The permissions node is optional.6. The node is supported since protocol version 1. It is used to request permissions on Plesk resources set for a client template.xsd).       . The ip-pool node is optional. The node is supported since protocol version 1. To view the structure of this node. It is used to request preferences set for a client template. It specifies the ID of a client template owner . The limits node is optional. Data type: none. Data type: string.Supported Operations 149 The get node is presented by the ClientTemplateGetInputType complex type (client_template. The preferences node is optional.0. It is used to request limits on Plesk resources set for a client template. It specifies the login name of a client template owner.6. Data type: integer.xsd). refer to the Filtering Issues (on page 142) section.0.

0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> <owner-login>admin</owner-login> </get> <get> <filter> <id>12</id> </filter> <limits/> <owner-login>admin</owner-login> </get> </client-template> </packet> To filter all client templates belong to one Plesk user.150 Supported Operations Request Samples The following packet requests all available information about two client templates: <packet version=”1.6.0.0”> <client-template> <get> <filter> <name>base_template</name> <name>quick_template</name> </filter> <limits/> <permissions/> <ip-pool/> <preferences/> <owner-login>JDoe</owner-login> </get> </client-template> </packet> To filter some client templates by id and others by name within the same packet.0”> <client-template> <get> <filter/> <owner-id>4</owner-id> </get> </client-template> </packet> . use two get operations: <packet version=”1.6.0.0.6. specify the packet as follows: <packet version=”1.

xsd). Data type: result_status (common. Its graphical representation is as follows:       The result node is required. Data type: string. It returns the error message.Supported Operations 151 This packet does not specify any particular settings. Data type: string.  . It returns the ID of the client template which settings are retrieved in the response packet. It specifies the execution status of the get operation.It returns the name of the client template which settings are retrieved in the response packet. Data type: unsignedInt. It wraps the response retrieved from the server. It returns limits on Plesk resources set for a client template. The errtext node is required if the get operation fails. The name node is required if the get operation succeeds.xsd).xsd). Allowed values: ok | error. Data type: ClientTemplateOutputResulttype (client_template. For more information on this node. so the response packet will only return the list of identifiers and template names.xsd). It returns the error code. Response Packet Structure The get node of the output XML packet is presented by the ClientTemplateOutputGetType (client_template. Data type: clientLimits (plesk_client. The status node is required. refer to the Limits (see page 138) section. The id node is required if the get operation succeeds. The limits node is required if the request get packet has the limits node and the operation succeeds. The errcode node is required if the get operation fails. Data type: integer.

and the operation succeeds. It returns IP pool settings set for a client template. Data type: ClientTemplatePreferencesType (client_template.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.122</ip-address> <ip-address>192.0.0.2.2. <packet version=”1. To view the structure of this node. refer to the Permissions (on page 70) section.xsd).4. Data type: ClienttemplateIpPoolType (client_template. It returns preferences set for a client template. refer to the Preferences (see page 141) section. The preferences node is required if the request get packet has the preferences node. It returns permissions set for a client template.152 Supported Operations  The permissions node is required if the request get packet has the permissions node. The ip-pool node is required if the request get packet specifies the ip-pool node. Data type: clientPerms (plesk_client.2.   Response Samples The following packet demonstrates a positive response received from Plesk server. For more information on this node.123</ip-address> </ip-pool> </result> </get> </client-template> </packet> . and the operation succeeds.xsd). refer to the IP Pool Settings (see page 140) section.xsd). and the operation succeeds. To view the structure of this node.

....................0”> <client-template> <del> … </del> </client-template> </packet> .............2.6.....</errtext> <id>24</id> <name>base_template</name> </result> <result> <status>error</status> <errcode>1027</errcode> <errtext>IP operation failed..............................................................0”> <client-template> <get> <result> <status>error</status> <errcode>1027</errcode> <errtext>IP operation failed...................Supported Operations 153 A negative response received from Plesk server can look as follows: <packet version=”1...... 155 Response Samples .................................................4........................ 156 Request Packet Structure A request XML packet that removes client templates from Plesk database includes the del operation node: <packet version=”1...0............................................................................ In this section: Request Packet Structure....................... 153 Request Samples ...... 154 Response Packet Structure .............................</errtext> <id>12</id> <name>quick_template</name> </result> </get> </client-template> </packet> Removing Client Templates The del operation is used to remove client templates from Plesk database....................

The following packet is invalid as it uses both these nodes within one filter node: <packet version=”1.0.6. Data type: id_type (common.6.xsd). Data type: ClientTemplateFilterType (client_template. To view the structure of this node.0.0”> <client-template> <del> <filter> <name>base_template</name> </filter> <owner-login>JDoe</owner-login> </del> <del> <filter> <id>12</id> </filter> <owner-login>JDoe</owner-login> </del></client-template></packet> .154 Supported Operations The del node is presented by type ClientTemplateDelInputType (client_template. use different filter nodes (and different del operations): <packet version=”1.xsd).0. The owner-login node is required.0. The node is supported since protocol version 1. or by name.xsd):  The filter node is required.   Request Samples To select client templates for deletion. It specifies the filtering rule.0. It specifies the login name of a client template owner. refer to the Filtering Issues (on page 142) section.6. It specifies the ID of a client template owner. Data type: string. The node is supported since protocol version 1. The owner-id node is required. filter them either by id.0”> <client-template> <del> <filter> <name>base_template</name> <id>12</id> </filter> <owner-login>JDoe</owner-login> </del> </client-template> </packet> To fix this issue.6.0.

Allowed values: ok|error.xsd).6. . It returns the error message. The errtext node is required if the del operation fails. The name node is required if the del operation succeeds. The errcode node is required if the del operation fails.0”> <client-template> <del> <filter/> <owner-id>3</owner-id> </del> </client-template> </packet> Response Packet Structure The del node of the output XML packet is structured as follows:       The result node is required. It returns the error code. The status node is required. Data type: ClientTemplateOutputResulttype (client_template. It returns the ID of the removed client template.xsd). Data type: string. It specifies the execution status of the del operation.Supported Operations 155 The following packet deletes all client templates belong to Plesk user: <packet version=”1. Data type: unsignedInt. Data type: result_status (common. It wraps the response retrieved from the server. Data type: integer.0. Data type: string. It returns the name of the removed client template. The id node is required if the del operation succeeds.

156 Supported Operations Response Samples The following packet returns a positive response after the del operation is performed: <packet version=”1.4.2.2. while the deletion of the second template (filtered by id = 12) failed.4. .</errtext> <id>12</id> </result> </del> </client-template> </packet> The deletion of the first client template (filtered by name = base_template) was successful.0”> <client-template> <del> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>ok</status> <id>12</id> </result> </del> </client-template> </packet> The first template was filtered by name (name = base_template).0”> <client-template> <del> <result> <status>ok</status> <name>base_template</name> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. the second one was filtered by id (id = 12). A negative response received from Plesk server can look as follows: <packet version=”1.

...........................xsd)................ In this section: Request Packet Structure.............................................................................. 159 Response Samples ............ 158 Response Packet Structure ............0................ These settings are as follows:    Permissions and limits on Plesk resources IP pool settings Preferences You can update all settings of a domain template at once..0”> <client-template> <set> … </set> </client-template> </packet> The set node is presented by the ClientTemplateSetInputType complex type (client_template....................................... 161 Request Packet Structure A request XML packet updating client template settings includes the set operation node: <packet version=”1.......Supported Operations 157 Updating Client Template Settings The set operation is used to update client template settings..................... Its graphical representation is as follows: .....................................6.............................. or specify particular settings.................... 157 Request Samples ......................................

It specifies the login name of a client template owner. Data type: clientLimits (plesk_client. To view the structure of this node.158 Supported Operations  The filter node is required.0. It specifies the filtering rule.121</ip-address> <ip-address>192. It specifies limits on Plesk resources for clients created with a client template.6.0. To view the structure of this node. Data type: ClienttemplateIpPoolType (client_template. refer to the Permissions (on page 136) section. refer to the Preferences (see page 141) section. we use two different filter nodes (and two set operations): <packet version=”1.0.xsd). The limits node is optional.2.122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> <owner-login>admin</owner-login> </set> <set> <filter> <name>base_template</name> </filter> <ip-pool> <ip-address>192. It specifies preferences for clients created with a client template. Data type: string. Data type: id_type (common.121</ip-address> <ip-address>192.0. refer to the IP Pool Settings (see page 140) section. For information on filters.2.2.0.xsd). The owner-login node is required.xsd). one template is specified by id. Data type: ClientTemplatePreferencesType (client_template.xsd).0. Data type: ClientTemplateFilterType (client_template.       Request Samples The following set request packet updates IP pool settings for two client templates which belong to Plesk Administrator. Since the same filter node cannot use both id and name nodes.0. The permissions node is optional. refer to the Limits (see page 138) section. Data type: clientPerms (plesk_client. It specifies the ID of a client template owner. The node is supported since protocol version 1. and another by name. It specifies IP pool settings for clients created with a client template.6.6. The preferences node is optional. The ip-pool node is optional. The node is supported since protocol version 1.0”> <client-template> <set> <filter> <id>12</id> </filter> <ip-pool> <ip-address>192. To view structure of this node. refer to the Filtering Issues (on page 142) section.0.2.xsd).0.xsd). The owner-id node is required. To view the structure of this node.122</ip-address> <allocate-ip>2</allocate-ip> </ip-pool> <owner-login>admin</owner-login></set></client-template></packet> . It specifies permissions for clients created with a client template.

6.0.0.122</ip-address> </ip-pool> <owner-login>JDoe</owner-login> </set> </client-template> </packet> The following packet will be considered invalid as it does not specify any settings: <packet version=”1.0.6.121</ip-address> <ip-address>192.0”> <client-template> <set> <filter/> <ip-pool> <ip-address>192. refer to the Client Template Settings (see page 136)section.Supported Operations 159 The following packet updates all client templates belong to one Plesk user with similar IP pool settings: <packet version=”1. .0.2.2.0”> <client-template> <set> <filter> <id>12</id> </filter> <owner-id>3</owner-id> </set> </client-template> </packet> To see sample packets setting up various client settings.

It returns the name of the client template which settings were modified. The name node is required if the set operation succeeds. The id node is required if the set operation succeeds. The errcode node is required if the set operation fails. Data type: string.160 Supported Operations Response Packet Structure The set node of the output XML packet is structured as follows:       The result node is required. The errtext node is required if the set operation fails. Data type: unsignedInt. It returns the error code. It returns the error message. Data type: ClientTemplateOutputResulttype (client_template. The status node is required. Data type: integer.xsd). It returns the ID of the client template which settings were modified.xsd). Data type: result_status (common. It specifies the execution status of the set operation. Data type: string. . Allowed values: ok | error. It wraps the response retrieved from the server.

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

........................................... 184 Retrieving Database Server Parameters .... Plesk for Unix supports MySQL and PostgreSQL databases............... without specifying the parent database server..........3... A default database server is the one on which databases of a particular type are created by default.....e.............. Note: Use lower case for defining database servers types........1 and higher Plesk user: Plesk Administrator Description Managing database servers differs in Plesk for Unix and Plesk for Windows........................................5..................... 164 Changing Database Server Preferences .................... 189 Retrieving Supported Types Of Databases .......... database_output....... In this section: Adding Database Server ............ 170 Detaching Database Servers .... 175 Setting Default Database Server .............. In other case.......................................xsd............................ the request might be incorrectly processed by Plesk server......................................0................. 195 Retrieving Local Database Servers Info ........................................4 for Unix and later API RPC version: 1..................... 198 ...........xsd Plesk version: Plesk for MS Windows 7.5........ i............................... Plesk 7......162 Supported Operations Managing Database Servers Operator: <db_server> XML Schema: database_input..... 180 Retrieving Default Database Server Info .................... Only one default database server for each type of databases is available in Plesk.. basing on what databases are supported: Plesk for Windows supports MySQL and Microsoft SQL Server databases.................................................

The default database server cannot be removed. SET (on page 170) updates properties of the specified database server. GET-LOCAL (on page 198) retrieves ID of a local database server. GET (on page 189) retrieves the database server info by the server ID. SET-DEFAULT (on page 180) sets a remote database server entry as default for its DBMS type. GET-SUPPORTED-TYPES (on page 195) get the DBMS types supported by the Plesk. Only remote database servers can be specified.Supported Operations 163 Supported operations         ADD (on page 164) creates a database server entry of the specified type. GET-DEFAULT (on page 184) retrieves ID of a default database server. specifying the login and password of the database administrator. . Only remote database servers can be specified. DEL (on page 175) removes a database server entry.

........ For more information.... make sure the database server type is supported by Plesk.............. Note: This operation is supported in Plesk for Windows since v........................ 166 Response Packet Structure ........................xsd).................1............5....... 164 Request Samples ...8............. Data type: string..............2 (API RPC protocol v.0"> <db_server> <add-db> … </add-db> </db_server> </packet> The add node is presented by type DatabaseServerAddParam (plesk_db.........164 Supported Operations Adding Database Server The add operation is used to add a database server of the specified type to Plesk............ 168 Request Packet Structure A request XML packet adding a database server includes the add operation node: <packet version="1........................................1... ............0)..................2...................... In this section: Request Packet Structure.................... It specifies the IP address or name of the database server you want to add... refer to the Managing Database Server (on page 161) topic..................... Before adding the database server................ and its graphical representation is as follows:  The host node is required.. 167 Response Samples ........5........................................

Allowed values: mysql | postgresql | mssql. It specifies the port of the database server. The type node is required. Data type: string.3. It specifies the password of administrator of the database server.. The password node is optional. The admin node is required. Add as many add operations as the number of database servers you want to add.Supported Operations 165      The port node is required. <db_server> <add> … </add> . It specifies if the database server manages the databases of a certain type (defined by type). <add> … </add> </db_server> . It specifies the login name of administrator of the database server. Data type: integer. Note: The add operation is presented by type DatabaseServerDescription in API RPC v.1 Remarks You can add multiple database servers in a single packet. Data type: integer. Data type: string.5. Data type: none..1. It specifies the database server type. The default node is optional.

29</host> <port>3306</port> <type>postgresql</type> <admin>senior</admin> <password>senior</password> <default/> </add> </db_server> </packet> Adding multiple database servers This request packet adds local MySQL and PostgreSQL database servers.2.2.44. <packet version="1.5.2.166 Supported Operations Request Samples Adding a single database server This packet adds the local MySQL database server.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.0"> <db_server> <add> <host>71.5. <packet version="1.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> . <packet version="1.5.5.

Data type: string.Supported Operations 167 Response Packet Structure The add node of the output XML packet is structured as follows:  The result node is required. Data type: integer. If the add operation succeeds. Is returns the error code if the add operation fails. It specifies the execution status of the add operation. It wraps the response retrieved from the server. it returns the ID of the database server. Allowed values: ok | error. The errcode node is optional.     . It returns the error message if the add operation fails. The errtext node is optional. The status node is required. Data type: integer.xsd). Data type: DatabaseServerResultType (database_output. The id node is optional. Data type: string.

5.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.2.168 Supported Operations Response Samples Adding a single database server This request packet adds the local MySQL database server.2.0"> <db_server> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed</errtext> </result> </add></db_server></packet> . the response looks as follows: <packet version="1.2.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.5.2. <packet version="1. the response looks as follows: <packet version="1.5.5.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.

the error 1019 occurs. Adding multiple database servers This request packet adds local MySQL and PostgreSQL database servers. and PostgreSQL already exists in Plesk.5.2.0 and later versions.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. <packet version="1.5.Supported Operations 169 In API RPC 1.2. if incorrect parameters were specified in the request packet. a response from the server can look as follows: <packet version="1.1.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> .5.

...... 173 Request Packet Structure A request XML packet changing a database server preferences includes the set operation node: <packet version="1.... The admin node is required.........170 Supported Operations Changing Database Server Preferences Use the set operation to change preferences of the database server specified by ID...................................................................................... Data type: integer............... 171 Response Packet Structure ................. 172 Response Samples ............0"> <db_server> <set> … </set> </db_server> </packet> The set node is presented by type DatabaseServerDescriptionOpt (plesk_db......... You can change preferences for multiple database servers in a single packet.....................xsd) and has the following graphical representation:     The host node is required................ It specifies new port of the database server........ Data type: string...... It specifies new IP address or name of the database server..................... 170 Request Samples ................ In this section: Request Packet Structure.... The password node is optional.................................. . The port node is required.........2............................. Data type: string........ It specifies the login name of administrator of the database server........... Data type: integer................. It specifies the password of the administrator of the database server......

0"> <db_server> <set> <host>11. <packet version="1.5. Add as many set operations as the number of database servers which preferences are to be changed. <db_server> <set> … </set> .122. <set> … </set> </db_server> Request Samples Changing preferences of a database server This packet changes IP address of the database server specified by ID 1...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> .2.23.2. Data type: integer. It specifies the database server ID. <packet version="1. Remarks You can change preferences for multiple database servers in a single packet.Supported Operations 171  The id node is required.5.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.

Data type: string. Data type: integer. it returns the ID of the database server. It wraps the response retrieved from the server. The errcode node is optional. Data type: integer. If the set operation succeeds.     . Is returns the error code if the set operation fails.172 Supported Operations Response Packet Structure The set node of the output XML packet is structured as follows:  The result node is required. The errtext node is optional. The status node is required. Allowed values: ok | error. It specifies the execution status of the set operation. It returns the error message if the set operation fails. Data type: DatabaseServerResultType (database_output.xsd). The id node is optional. Data type: string.

<packet version="1.5.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.23.0"> <db_server> <set> <result> <status>ok</status> <id>1</id> </result> </set> </db_server> </packet> If the database server with ID 1 was not found on the server.122. the positive response looks as follows: <packet version="1.0"> <db_server> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist</errtext> </result> </set> </db_server> </packet> .5.Supported Operations 173 Response Samples Changing preferences of a database server This packet changes IP address of the database server specified by ID 1.0"> <db_server> <set> <host>11.2.2.5.2.

5. <packet version="1. and the database server with ID 8 was not found on the server.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.5. the response looks as follows: <packet version="1.2.2.174 Supported Operations 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.0"> <db_server> <set> <result> <status>ok</status> <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> .

......................... 176 Response Packet Structure ......... Default database servers cannot be removed using this operation......... Data type: DatabaseServerFilterType (database_input.......................... The id node is optional... Note: This operation is supported in Plesk for Windows since v...... In this section: Request Packet Structure.........1... Specifies the filtering rule...................0"> <db_server> <del> … </del> </db_server> </packet> The del node has the following graphical representation:   The filter node is required.....................2 (API RPC protocol v..............................8.... . You can detach multiple database servers in a single packet........................... 178 Request Packet Structure A request XML packet detaching a database server from Plesk includes the del operation node: <packet version="1....................................................................... This option is available only for remote database servers. 175 Request Samples ......5...0).....................Supported Operations 175 Detaching Database Servers Use the del operation to detach database servers from Plesk. It specifies ID of the database server to be detached............... Data type: integer...............xsd)..2................. 177 Response Samples .........1.............4..

.. <packet version="1. <id>.5..2.</id> . <packet version="1. Add as many id parameters as the number of database servers which are to be detached.2.5.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. <packet version="1.0"> <db_server> <del> <filter/> </del> </db_server> </packet> .. <db_server> <del> <filter> <id>.2.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..5..176 Supported Operations 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.

Allowed values: ok | error. Is returns the error code if the del operation fails.     . Data type: integer. It specifies the execution status of the del operation.Supported Operations 177 Response Packet Structure The del node of the output XML packet is structured as follows:  The result node is required. Data type: string. Data type: DatabaseServerResultType (database_output. Data type: string. It returns the error message if the del operation fails. It wraps the response retrieved from the server. The errcode node is optional.xsd). The status node is required. Data type: integer The errtext node is optional. The id node is optional. It returns the ID of the database server.

5.178 Supported Operations Response Samples Unregistering a single database server This packet detaches the database server specified by ID 5 from Plesk.2.2.5.0"> <db_server> <del> <result> <status>error</status> <errcode>1023</errcode> <errtext>The default database server cannot be deleted. the response from the server looks as follows: <packet version="1. <packet version="1.0"> <db_server> <del> <result> <status>ok</status> <id>5</id> </result> </del> </db_server> </packet> If the database server was a default database server.</errtext> <id>5</id> </result> </del> </db_server> </packet> .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.2.5.

2. the response looks as follows: <packet version="1. A possible response from the server looks as follows: <packet version="1.0"> <db_server> <del> <filter/> </del> </db_server> </packet> Three database servers were detached from Plesk.0"> <db_server> <del> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist.5.2. <packet version="1.0"> <db_server> <del> <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> .Supported Operations 179 If the database server with ID 5 was not found on the server.5.5.2.</errtext> <id>5</id> </result> </del> </db_server> </packet> Unregistering multiple database servers This packet detaches all remote database servers from Plesk.

..2 (API RPC protocol v..............................180 Supported Operations Setting Default Database Server A default database server manages all databases of the corresponding type......... Use the setdefault operation to set a database server as default........ the local database server will be set as default for managing the databases of the specified type.2....................................................... 180 Request Samples .........1........1......... It specifies the remote database server ID... The type node is required..5...................... Note: This operation is supported in Plesk for Windows since v. In this section: Request Packet Structure..... ........................... 182 Response Samples ................ Allowed values: mysql | postgresql | mssql.. Data type: string.5...... Note: You can set only one default database server for each type of databases................ 183 Request Packet Structure A request XML packet setting a default database server includes the set-default operation node: <packet version="1.........0)............... If specified........0"> <db_server> <set-default> … </set-default> </db_server> </packet> The set-default node has the following graphical representation:   The id node is required....... 181 Response Packet Structure ..........................................8............................... Only one default database server for each type of databases is available in Plesk........................ Data type: integer.

<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. <db_server> <set-default> … </set-default> .5.2.2.0"> <db_server> <set-default> <id>1</id> </set-default> <set-default> <type>mssql</type> </set-default> </db_server> </packet> . <packet version="1. <packet version="1..Supported Operations 181 Remarks You can set multiple database servers as default in a single packet. the following packet sets the database server as default for managing MySQL databases. <packet version="1. Add as many setdefault operations as the number of database servers which status is to be changed.5.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..2.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 Microsoft SQL database server as default for MySQL and Microsoft SQL databases correspondingly.5.

The errcode node is optional.     . Data type: string. The id node is optional.xsd). The status node is required. It wraps the response retrieved from the server. It returns the error message if the set-default operation fails. Data type: integer. It specifies the execution status of the set-default operation.182 Supported Operations Response Packet Structure The set-default node of the output XML packet is structured as follows:  The result node is required. Data type: integer. it returns the ID of the database server. Data type: string. Allowed values: ok | error. If the set-default operation succeeds and ID was specified in the request packet. Data type: DatabaseServerResultType (database_output. The errtext node is optional. Is returns the error code if the set-default operation fails.

5.2.</errtext> </result> </set-default> </db_server> </packet> .5.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. the response looks as follows: <packet version="1. the following request packet sets the database server as default for managing MySQL databases.Supported Operations 183 Response Samples Changing status of a database server Upon supposition that the type of remote database server with ID 1 is mysql. <packet version="1.0"> <db_server> <set-default> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist.5.2.0"> <db_server> <set-default> <id>1</id> </set-default> </db_server> </packet> The positive response from the server looks as follows: <packet version="1.

...............1......................................2................................ Only one default database server for each type of databases is available in Plesk..... Note: This operation is supported in Plesk for Windows since v.........................................0)........2 (API RPC protocol v............... Use the getdefault operation to retrieve a default database server....8.. 186 Response Samples ....... 185 Request Samples ...184 Supported Operations Changing status of multiple database servers This packet sets the remote database server with ID 1 and local Microsoft SQL database server as default for MySQL and Microsoft SQL databases correspondingly..........5....... In this section: Request Packet Structure.1................................................... <packet version="1..........................0"> <db_server> <set-default> <result> <status>ok</status> <id>1</id> </result> </set-default> <set-default> <result> <status>ok</status> </result> </set-default> </db_server> </packet> Retrieving Default Database Server Info A default database server manages all databases of the corresponding type........... 186 Response Packet Structure ...0"> <db_server> <set-default> <id>1</id> </set-default> <set-default> <type>mssql</type> </set-default> </db_server> </packet> A response from the server can look as follows: <packet version="1..2............................... 187 .............5...................5....................

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

Data type: DatabaseServerResultType (database_output. It wraps the response retrieved from the server.2.5.5. <packet version="1. .xsd).0"> <db_server> <get-default> <filter> <type>mssql</type> </filter> </get-default> </db_server> </packet> Retrieving status of multiple database servers This packet retrieves default MySQL and PostgreSQL database servers.186 Supported Operations Request Samples Retrieving status of a database server This packet retrieves default Microsoft SQL database server.2. <packet version="1.0"> <db_server> <get-default> <filter> <type>mysql</type> <type>postgresql</type> </filter> </get-default> </db_server> </packet> Response Packet Structure The get-default node of the output XML packet is structured as follows:  The result node is required.

Data type: string. Allowed values: ok | error. It returns the type of the database server. Is returns the error code if the get-default operation fails.2. Data type: integer. The type node is optional.5. <packet version="1.0"> <db_server> <get-default> <result> <status>ok</status> <type>mssql</type> <id>2l</id> </result> </get-default> </db_server> </packet> . It specifies the execution status of the get-default operation. If the get-default operation succeeds.0"> <db_server> <get-default> <filter> <type>mssql</type> </filter> </get-default> </db_server> </packet> A positive response from the server can look as follows: <packet version="1. The id node is optional.5.1 either id or type can be retrieved.5.Supported Operations 187      The status node is required. Data type: string. Data type: string. Response Samples Retrieving status of a database server This request packet retrieves default Microsoft SQL database server info.2. Note: In the API RPC 1. It returns the error message if the get-default operation fails. it returns the ID of the database server. The errtext node is optional. Data type: integer.3. The errcode node is optional.

5.5.2.188 Supported Operations If an unsupported type was specified in the request packet. <packet version="1.0"> <db_server> <get-default> <result> <status>error</status> <status>14006</status> <status>unsupported database type</status> </result> </get-default> </db_server> </packet> Retrieving status of multiple database servers This packet retrieves default MySQL and PostgreSQL database servers info.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> .2.5. the response from the server looks as follows: <packet version="1.2.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.

.... 190 Response Packet Structure ....0"> <db_server> <get> … </get> </db_server> </packet> The get node has the following graphical representation:   The filter node is required.. Remarks A single operation can retrieve the data of multiple database servers.................................... It specifies the filtering rule............ the operation will return info on all database servers..................................... The id node is optional............. Specifies the database server ID....5.. 189 Request Samples ... Add as many different id parameters as the number of database servers info on which you want to retrieve.......................................................... Note: If the filter node is left blank (<filter/>)..... <db_server> <get> … </get> .............. You can retrieve preferences of multiple database servers in a single operation....2...................... Data type: integer........Supported Operations 189 Retrieving Database Server Parameters Use get operation to retrieve parameters of the database server specified by ID...... In this section: Request Packet Structure..................... 191 Response Samples ....................... Data type: none...... 193 Request Packet Structure A request XML packet retrieving a database server info includes the get operation node: <packet version="1.................................. <get> … </get> </db_server> ...............................................

0"> <db_server> <get> <filter/> </get> </db_server> </packet> .2.5. <packet version="1.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.190 Supported Operations Request Samples Retrieving a single database server This packet retrieves info on the database server specified by ID 7.0"> <db_server> <get> <filter> <id>7</id> <id>9</id> </filter> </get> </db_server> </packet> This packet retrieves info on all database servers available for the packet sender. <packet version="1.2.5. <packet version="1.5.2.

. Data type: integer. Data type: string. The id node is optional.Supported Operations 191 Response Packet Structure The get node of the output XML packet is structured as follows:      The result node is required. It specifies the execution status of the get operation. Data type: integer. The errcode node is optional. The status node is required. It returns the error message if the get operation fails.xsd). Allowed values: ok | error. It wraps the response retrieved from the server. Data type: string. It returns the ID of the database server. Is returns the error code if the get operation fails. The errtext node is optional. Data type: extension of DatabaseServerResultType (database_output.

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

0"> <db_server> <get> <result> <status>ok</status> <id>7</id> <data> <host>14.5. the result is as follows: <packet version="1.5.</errtext> </result> </get> </db_server> </packet> .2.5.0"> <db_server> <get> <filter> <id>7</id> </filter> </get> </db_server> </packet> A positive response from the server can look as follows: <packet version="1.2.2.Supported Operations 193 Response Samples Retrieving a single database server This packet retrieves the database server specified by ID 7 <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.0"> <db_server> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database server does not exist.11.13.

194 Supported Operations Retrieving multiple database servers This request packet retrieves info on the database servers specified by ID 2 and ID 92.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> .5.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.2. <packet version="1.0"> <db_server> <get> <filter> <id>2</id><id>92</id> </filter> </get> </db_server> </packet> A possible response from the server can look as follows: <packet version="1.5.2.

.......0"> <dns> <get-supported-types/> </dns> </packet> The graphical representation of the get-supported-types node is as follows: Request sample This request packet retrieves the supported types of database servers................................ 196 Response Samples ..Supported Operations 195 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...........................0"> <db_server> <get-supported-types/> </db_server> </packet> In this section: Response Packet Structure .........................5..................... <packet version="1....2.............................. 197 ..........5...........

Data type: integer.196 Supported Operations Response Packet Structure The get-supported-types node of the output XML packet is structured as follows:      The result node is required. Is returns the error code if the get-supported-types operation fails. Allowed values: ok | error. It specifies the execution status of the get-supportedtypes operation. The errtext node is optional. The errcode node is optional. It wraps the response retrieved from the server. Data type: DatabaseServerResultType (database_output. . Data type: string. It returns the types of supported database servers if the get-supported-types operation succeeds. Data type: string. It returns the error message if the get-supported-types operation fails. Data type: string.xsd). The status node is required. The type node is optional.

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. the result is as follows: <packet version="1.2.2.2.Supported Operations 197 Response Samples This request packet retrieves the supported types of database servers. the result is as follows: <packet version="1.0"> <db_server> <get-supported-types> <result> <status>ok</status> <type>mysql</type> <type>postgresql</type> </result> </get-supported-types> </db_server> </packet> .5. <packet version="1.5.5.0"> <db_server> <get-supported-types/> </db_server> </packet> If the request was sent to Plesk for MS Windows server.

.0"> <db_server> <get-local> … </get-local> </db_server> </packet> The get-local node has the following graphical representation:   The filter node is required......5..................1...........................0)..................................... In this section: Request Packet Structure................... ... Allowed values: mssql | mysql | postgresql............................. The type node is optional.................. 199 Response Packet Structure .1..4.........198 Supported Operations Retrieving Local Database Servers Info Use the get-local operation to retrieve info on local database servers of the specified type...8............................2..........2 (API RPC protocol v....................... 198 Request Samples ...... 200 Request Packet Structure A request XML packet retrieving a local database server info includes the get-local operation node: <packet version="1.............................. It specifies the type of local database servers........ You can retrieve preferences of multiple local database servers in a single packet................. the operation will return info on all local database servers. Note: If the filter node is left blank (<filter/>).................. 200 Response Samples ................................... Data type: string. Data type: none...... It specifies the filtering rule....... Note: This operation is supported in Plesk for Windows since v.....

2.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..5. <get-local> … </get-local> </db_server> Request Samples Retrieving info on a single database server This packet retrieves info on the local MySQL database server. <db_server> <get-local> … </get-local> .Supported Operations 199 A single operation can retrieve the data of multiple database servers. Add as many different type parameters as the number of local database servers info on which you want to retrieve. <packet version="1. <packet version="1.0"> <db_server> <get-local> <filter/> </get-local> </db_server> </packet> .5..2.

5.1 either id or type can be retrieved.3. It returns the type of the database server. The id node is optional. Data type: string. Data type: integer. The status node is required. <packet version="1. Data type: string. Response Samples Retrieving info on a single database server This request packet retrieves info on the MySQL local database server. The errtext node is optional. Data type: DatabaseServerResultType (database_output.2. Note: In the API RPC 1. Data type: integer. Is returns the error code if the get-local operation fails. Data type: string. The type node is required.200 Supported Operations Response Packet Structure  The get-local node of the output XML packet is structured as follows:       The result node is required.0"> <db_server> <get-local> <filter> <type>mysql</type> </filter> </get-local> </db_server> </packet> .5. It returns the error message if the get-local operation fails. It returns the ID of the database server.xsd). It specifies the execution status of the get-local operation. The errcode node is optional. It wraps the response retrieved from the server. Allowed values: ok | error.

Supported Operations 201 A positive response from the server can look as follows: <packet version="1.0"> <db_server> <get-local> <filter/> </get-local> </db_server> </packet> . the response from the server looks as follows: <packet version="1.5.2. <packet version="1.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.5.2.5.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> Retrieving info on multiple database servers This request packet retrieves info on all local database servers.2.

...................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> Managing Databases Operator: <database> XML Schema: database_input......... 205 Deleting Databases .................xsd Plesk version: Plesk 8....1 for Unix API RPC version: 1...........................................2................................................................................................0 and higher Plesk user: Plesk Administrator................................. You can add users to a database (create their own accounts) to grant them access to this information...xsd...................................................... 211 Creating Database Users ......................... 224 Retrieving Information About Databases .5..............................202 Supported Operations A possible response from the server can look as follows: <packet version="1. database_output..........4............................................................ In this section: Filtering Issues ............................1 for Windows | Plesk 8... 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........................ 221 Retrieving Database Administrator Info ............................................................................................... 230 Changing Database User Credentials ............................................. 215 Assigning Database Administrator........................................ Plesk client Description Databases are used to store information in a tables format... 246 ....2........................... 204 Creating Databases..... 242 Deleting Database Users........................ 237 Retrieving Database Users Info ...................................................................................

. be sure to call operation get_supported_types (on page 195) or the db_server (on page 161) operator in order to retrieve information on which database servers are configured on the specific Plesk server. If a database is used by an application installed on the server. defining the domain that will use it DEL-DB (see page 211) removes database entry. it cannot be removed GET-DB (see page 230) retrieves database parameters by the ID. domain name or domain ID SET-DEFAULT-USER (see page 221) specifies a database administrator GET-DEFAULT-USER (see page 224) retrieves ID of administrator of a specified database ADD-DB-USER (see page 215) creates a database user account for a specified database DEL-DB-USER (see page 246) removes a database user account from a specified database GET-DB-USERS (see page 242) retrieves the list of users of a specified database SET-DB-USER (see page 237) changes credentials of a database user Remarks Before working with databases.Supported Operations 203 Supported operations          ADD-DB (see page 205) creates database entry of the specified type.

2. The request XML filters data using a special <filter> section.4. If one of the following values was set as a filter rule parameter.com can look as follows: <packet version="1.204 Supported Operations Filtering Issues Filtering is the way the request XML packet indicates the object to which the operation will be applied. nested in the filter node are called filtering rule. It returns the filtering rule parameter. 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 filter can specify multiple database users. Earlier versions of the protocol do not support this node.. </filter> A packet that retrieves information about databases on domain MyDomain. get-db-users. It also can match multiple databases.0. . specified either by ID.0"> <database> <get-db> <filter> <domain-name>MyDomain. Parameters..4. get-default-user. Note: The <filter-id> node appears in API RPC 1. the filter-id node is nested in a response packet. A single operation can use only parameters of the same type in the filtering rule. it is returned in the filter-id node of the response packet:     database ID domain name domain ID database user ID It is done so to trace the request parameters in case of an error. domain ID. or domain name. the filter-id parameter will hold the ID of the object.2. <filter> . all specified either by ID or by database ID. get-db. The blank filter means that all objects (like databases or database users) are matched by this rule. Data type: anySimple.com</domain-name> </filter> </get-db> </database> </packet> If an operation in a request packet (del-db-user. If the filter node is left blank (<filter/>). deldb) uses filters.

.. 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 In this section: Request Packet Structure ................ Data type: integer...............209 Request Packet Structure A request XML packet creating a database includes the add-db operation node: <packet version="1.........................0"> <database> <add-db> … </add-db> </database> </packet> The add-db node is presented by type DatabaseAddInputType (database_input..........Supported Operations 205 Creating Databases The add-db operation is used to create a database for a certain domain.............. and its graphical representation is as follows:    The domain-id node is required...................................... MySQL and MS SQL are available in Plesk for Windows......... .................................................. It specifies the database type. It specifies the domain on which you want to create database. The name node is required......206 Response Packet Structure ............................. MySQL and PostgreSQL types are available in Plesk for Unix.................xsd).................... It specifies the database name......................... Data type: string........205 Request Samples ..208 Response Samples ................... Data type: string........4.......2.......... The type node is required........................ You can specify the database settings only on creation..........

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

4.2.2.Supported Operations 207 This packet adds My2Base PostgreSQL database to the domain specified by ID 8.4. This example is valid only in Plesk for Unix. <packet version="1.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. <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> . The packet is valid only in Plesk for Windows.

Data type: resultType (common. The errtext node is optional. Data type: string. It returns the error message if the add-db operation fails.208 Supported Operations Response Packet Structure The add-db node of the output XML packet is presented by type DatabaseAddDBOutputType (database_output. Allowed values: ok | error. The id node is optional.xsd) and structured as follows:      The result node is required. it returns the ID of the database. Data type: integer. Is returns the error code if the add-db operation fails. It wraps the response retrieved from the server. Data type: string. It specifies the execution status of the add-db operation. . The status node is required.xsd). The errcode node is optional. Data type: integer. If the add-db operation succeeds.

0"> <database> <result> <add-db> <status>ok</status> <id>14</id> </add-db> </result> </database> </packet> If MyBase already exists.0"> <database> <add-db> <domain-id>7</domain-id> <name>MyBase</name> <type>mysql</type> </add-db> </database> </packet> A positive response from the server can look as follows: <packet version="1.2.Supported Operations 209 Response Samples Adding a database The request packet structured as follows: <packet version="1.2.4.4.4. the response from the server looks as follows: <packet version="1.2.0"> <database> <result> <add-db> <status>error</status> <errcode>1007</errcode> <errtext>Database already exists</errtext> </add-db> </result> </database> </packet> .

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> .2.4.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.210 Supported Operations If the domain with ID 7 was not found. the response looks as follows: <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>MyBase</name> <type>mysql</type> </add-db> </database> </packet> A possible response from the server looks as follows: <packet version="1.2.4.

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

the get-db node is presented by type DatabaseGetDBInputType.4.212 Supported Operations  The domain-name node is optional.0"> <database> <del-db> <filter/> </del-db> </database> </packet> This packet deletes databases with ID 67 and ID 16. <packet version="1.0 and earlier versions.2. Request Samples Deleting a database This packet deletes the database with ID 55 <packet version="1.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.4. It specifies the name of the domain on which databases are removed.2.0.4. <packet version="1.5.0"> <database> <del-db> <filter> <db-id>67</db-id> <db-id>16</db-id> </filter> </del-db> </database> </packet> . Data type: string (Unicode). Remarks In API RPC 1.2.

xsd). If the add-db operation succeeds it returns the ID of the database. It returns the filtering rule parameter. The id node is optional.xsd) and structured as follows:       The result node is required. It returns the error message if the del-db operation fails. The errtext node is optional. The errcode node is optional.Supported Operations 213 Response Packet Structure The del-db node of the output XML packet is presented by type DatabaseDelDBOutputType (database_output. Is returns the error code if the del-db operation fails. It wraps the response retrieved from the server. refer to the Filtering Issues (see page 204) section. The status node is required. For more information. The filter-id node is optional. Allowed values: ok | error. It specifies the execution status of the del-db operation. Data type: integer. Data type: string. . Data type: string. Data type: resultType (common.

214 Supported Operations Response Samples Deleting database The request packet looks as follows: <packet version="1.4.0"> <database> <del-db> <filter> <db-id>55</db-id> </filter> </del-db> </database> </packet> Positive response from the server can look as follows: <packet version="1.2.2.4.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.2.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> .4.

0"> <database> <del-db> <filter/> </del-db> <del-db> <filter> <db-id>15</db-id> </filter> </del-db> </database> </packet> A response from the server can look as follows: <packet version="1.4.2. . because the database with ID 15 is already deleted.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.2.Supported Operations 215 Deleting multiple databases The request packet looks as follows: <packet version="1.4.

.......... It specifies ID of the database where a new user will be created..4............ 219 Request Packet Structure A request XML packet creating database user account for the database includes the add-db-user operation node: <packet version="1............ Data type: integer.......... ........................216 Supported Operations Creating Database Users You can create new user accounts for a certain database......... password and the ID of the database where you want to create new user account.................. Specifies if it is plain or encrypted password..... It specifies login name of the database user.... The password node is required...... You can add multiple users to the database in a single packet....xsd)...................... Data type: string (length should be more than five digits)..............................................2..... Data type: string............... Specify the user login name.............. The password-type node is optional..... and its graphical representation is as follows:     The db-id node is required............ The login node is required... 218 Response Samples ..... 216 Request Samples .. In this section: Request Packet Structure............. Data type:string........................ It specifies the password of the database user.................... 217 Response Packet Structure ............................. Allowed values: plain | crypt...............................0"> <database> <add-db-user> … </add-db-user> </database> </packet> The add-db-user node is presented by type DatabaseAddDBUserInputType (database_input.......

. You can also add multiple users to multiple databases in a single packet.. <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> .4.2.0"> <database> <add-db-user> <db-id>55</db-id> <login>MyUser</login> <password>hello</password> </add-db-user> </database> </packet> Creating multiple database users This packet creates users MyUser and My2User on the database with ID 55. <database> <add-default-user> … </add-default-user> .2.4.Supported Operations 217 Remarks You can add multiple users to database in a single packet. <packet version="1. <add-default-user> … </add-default-user> </database> Request Samples Creating a database user This packet creates user MyUser on the database with ID 55. Add as many add-db-user operations to the packet as the number of different users you want to create.

It specifies the execution status of the add-db--user operation.2. Data type: resultType (common.218 Supported Operations This packet creates users MyUser and My2User on the databases with ID 55 and ID 57.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> Response Packet Structure The add-db--user node of the output XML packet is presented by type DatabaseAddDBUserOutputType (database_output. Allowed values: ok | error. The status node is required.4.xsd) and structured as follows:   The result node is required. It wraps the response retrieved from the server.xsd). Data type: string. <packet version="1. .

Data type: integer.4. The errtext node is optional. Data type: string. Data type: integer. Is returns the error code if the add-db--user operation fails.0"> <database> <add-db-user> <result> <status>ok</status> <id>132</id> </result> </add-db-user> </database> </packet> If the database was not found. It returns the error message if the add-db--user operation fails. It specifies the database user ID. The id node is required.2. Response Samples Creating a database user This request packet creates user MyUser on the database with ID 55.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.4.2. <packet version="1.4. the response looks as follows: <packet version="1.0"> <database> <add-db-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </add-db-user> </database> </packet> .2.Supported Operations 219    The errcode node is optional.

4. the response from the server looks as follows: <packet version="1.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> .4.4.2.2.220 Supported Operations If the login name is already used by another user account on this database.2. <packet version="1. the response looks as follows: <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> If the first operation succeeded and the database with ID=57 was not found.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.

......... 222 Response Samples ......... the first user created in the database will be appointed to act as a database administrator.......................... The default-user-id node is optional.. In this section: Request Packet Structure............ Data type: integer..... 221 Request Samples ...... If you create a database. ............................. Data type: integer........... 223 Request Packet Structure A request XML packet assigning a database administrator includes the set-default-user operation node: <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... and its graphical representation is as follows:   The db-id node is required.............................................................................. There can be only one administrator's account for each database.... Specifies the database that will be managed by database administrator...xsd)....................... You can set any database user account as the database administrator's account..........2..........4............................................ Specifying the database administrator for managing a database........................................................Supported Operations 221 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........... 222 Response Packet Structure ..

222 Supported Operations Remarks You can set database administrators for multiple databases using a single packet.. Add as many set-default-user operations as the number of database administrator's accounts you want to set. . Data type: resultType (common. It wraps the response retrieved from the server..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. <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.2. <database> <set-default-user> … </set-default-user> .4.xsd).xsd) and structured as follows:  The result node is required. <packet version="1.

2.0"> <database> <set-default-user> <result> <status>error</status> <errcode>1015</errcode> <errtext>Database not found</errtext> </result> </set-default-user> </database> </packet> . The errcode node is optional. Response Samples Assigning a Database Administrator This request packet sets the user with ID 35 as administrator for the database with ID 132.Supported Operations 223    The status node is required. Data type: string. <packet version="1. The errtext node is optional.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.4. Data type: string.2. <packet version="1. Is returns the error code if the set-default-user operation fails. It specifies the execution status of the set-default-user operation.2. Allowed values: ok | error.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.4. It returns the error message if the set-default-user operation fails. <packet version="1.4. Data type: integer.

....4................................................. 227 Response Samples ....................... 228 ....................................................................... the first user created in the database will be set as its administrator...................................................................................224 Supported Operations The positive response received from the server looks as follows: <packet version="1.... 225 Request Samples .....2........ There can be only one administrator's account for each database........................ 226 Response Packet Structure ................ In this section: Request Packet Structure...... You can set any database user account as the database administrator's account................ If you create a new database.................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............................. either via Plesk graphical user interface (DB WebAdmin tool) or by connecting directly to the database server.

Data type: DatabaseDefaultUserFilterType.2. <database> <get-default-user> … </get-default-user> ..4.xsd). Remarks You can retrieve ID's of multiple database administrators using a single packet. Data type: integer. For more information. Specifies the filtering rule. and its graphical representation is as follows:   The filter node is required. Add the get-default-user operation for each database to the request packet. <get-default-user> … </get-default-user> </database> .Supported Operations 225 Request Packet Structure A request XML packet retrieving database administrator info includes the get-default-user operation node: <packet version="1.. It specifies ID of a database. refer to the Filtering Issues (see page 204) section. The db-id node is optional.0"> <database> <get-default-user> … </get-default-user> </database> </packet> The get-default-user node is presented by type DatabaseGetDBInputType (database_input.

4. <packet version="1. <packet version="1.2.4.226 Supported Operations Request Samples Retrieving info on a Database Administrator This packet retrieves info on administrator for the database with ID 35.0"> <database> <get-default-user> <filter/> </get-default-user> </database> </packet> .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.2.

Allowed values: ok | error. The filter-id node is optional. Data type: string. The id node is required.xsd) and structured as follows:       The result node is required. Data type: string.Supported Operations 227 Response Packet Structure The get-default-user node of the output XML packet is presented by type DatabaseGetDefaultUserOutputType (database_output. The errcode node is optional. For more information.xsd). It returns the filtering rule parameter. It returns the error message if the get-default-user operation fails. The errtext node is optional. It specifies the database administrator ID. Data type: integer. Data type: integer. It wraps the response retrieved from the server. . Data type: resultType (common. It specifies the execution status of the get-default-user operation. The status node is required. Is returns the error code if the get-default-user operation fails. refer to the Filtering Issues (see page 204) section.

228 Supported Operations Response Samples Retrieving info on a Database Administrator This packet retrieves a Database Administrator of the database with ID 35.4.0"> <database> <get-default-user> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database not found</errtext> </result> </get-default-user> </database> </packet> .4.4.0"> <database> <get-default-user> <filter> <db-id>35</db-id> </filter> </get-default-user> </database> </packet> A positive response from the server can look as follows: <packet version="1. <packet version="1.2.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.2.

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.4.0"> <database> <get-default-user> <result> <status>ok</status> <filter-id>15</filter-id> <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> .4.Supported Operations 229 Retrieving info on multiple Database Administrators This packet retrieves Database Administrators of all databases on all database servers available for the packet sender.2. <packet version="1.

.............................................................................................................4...................0"> <database> <get-db> … </get-db> </database> </packet> The get-db node is presented by type DatabaseGetDBInputType (database_input...........................................xsd)...................... 231 Response Packet Structure ..................................................................... 233 Response Samples ....... 234 Request Packet Structure A request XML packet retrieving database parameters includes the get-db operation node: <packet version="1..230 Supported Operations 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 In this section: Request Packet Structure....... and its graphical representation is as follows: ..........2.............. 230 Request Samples ..................................................

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

com.0"> <database> <get-db> <filter> <domain-name>MyDomain. <packet version="1.0"> <database> <get-db> <filter> <domain-name>MyDomain.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.4.com domains.2.4.2.2. and to the domain specified by ID 45.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.com and My2Domain.com</domain-name> <domain-id>117</domain-id> </filter> </get-db> </database> </packet> . <packet version="1.com</domain-name> <domain-name>My2Domain.4.0"> <database> <get-db> <filter> <domain-name>MyDomain.232 Supported Operations Retrieving parameters of multiple databases This packet retrieves information on all databases added to domain MyDomain. <packet version="1.

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

It is required if the get-db operation succeeds. The default-user-id node is optional. Data type: integer. <packet version="1. It is required if the get-db operation succeeds. This node is required only in Plesk for Unix. Data type: integer. It is required if the get-db operation succeeds.234 Supported Operations   The domain-id node is optional.  Response Samples Retrieving database parameters This packet retrieves information on a database with ID 5.0"> <database> <get-db> <filter> <id>5</id> </filter> </get-db> </database> </packet> Positive response from the server looks as follows: <packet version="1.2. Data type: integer. It specifies the ID of the database server on which a database will be created.2.4. It specifies the ID of the domain on which a database is added.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> .4. It specifies ID of the database administrator. The db-server-id node is optional.

2. The response from the server in this case looks as follows: <packet version="1.2.Supported Operations 235 Negative response from the server looks as follows: <packet version="1. <packet version="1.4.com.com</domain-name> <domain-name>My2Domain.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.0"> <database> <get-db> <result> <status>ok</status> <filter-id>MyDomain.0"> <database> <get-db> <filter> <domain-name>MyDomain.4. the domain with ID 45 and domain My2domain.com.4.com domains and to the domain specified by ID 45. My2Domain.com were not found.0"> <database> <get-db> <result> <status>error</status> <errcode>1013</errcode> <errtext>Database does not exist</errtext> <filter-id>5</filter-id> </result> </get-db> </database> </packet> Retrieving parameters of multiple databases This packet retrieves information on all databases added to the MyDomain.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> .

com</filter-id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>45</filter-id> </result> </get-db> </database> </packet> When two or more databases are found on the specified domain.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.4.236 Supported Operations <get-db> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <filter-id>My2Domain. a server response is the following: <packet version="1.0"> <database> <get-db> <result> <status>ok</status> <filter-id>MyDomain.2.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> .

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

0"> <database> <set-db-user> <id>61</id> <login>MyNewName</login> <password>a1b2c3d</password> </set-db-user> </database> </packet> ..2....4.2. </set-db-user> . <set-db-user> .2. <packet version="1.4.. <packet version="1.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..238 Supported Operations Remarks You can change credentials for multiple database users in a single packet. </set-db-user> </database> </packet> Request Samples Changing database user credentials This request packet sets new password for the database user identified by ID 61.4.0"> <database> <set-db-user> . <packet version="1. Add as many set-db-user operations to the packet as the number of different users you want to update.

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

240 Supported Operations Response Samples Changing database user credentials This request packet sets new password for the database user identified by ID 61.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.0"> <database> <set-db-user> <id>61</id> <password>a1b2c3d</password> </set-db-user> </database> </packet> A positive response from the server can look as follows: <packet version="1. <packet version="1.2.4.4.2.2.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> .4.

4.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> .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> If the user with ID 61 was not found on server.2.2. <packet version="1. the response packet looks as the follows: <packet version="1.Supported Operations 241 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. and the user with ID 68 was successfully updated.4.

................................242 Supported Operations Retrieving Database Users Info You can retrieve information on users of the certain database................5.....0"> <database> <get-db-users> … </get-db-users> </database> </packet> The get-db-user node is presented by type DatabaseGetDBInputType (database_input.. specify the ID of the database................. Specifies the filtering rule..........xsd)....... the get-db-user node is presented by type DatabaseGetDBUsersInputType (database_input.................. Remarks Note: In API RPC v...1........1........... 242 Request Samples ............ 243 Response Packet Structure ....... In this section: Request Packet Structure. You can retrieve information about users of multiple databases in a single get-db-users operation........ ......................................... Data type: DatabaseUserFilterType... The db-id node is optional....... Data type: integer..4.......0 and later versions.....................................................xsd)...... 245 Request Packet Structure A request XML packet retrieving users info from the database includes the get-db-users operation node: <packet version="1... For more information................................................. and its graphical representation is as follows:   The filter node is required.................... It specifies the ID of the database from which information about users is retrieved.. 244 Response Samples ....2.... refer to the Filtering Issues (see page 204) section..... To retrieve information on database users........

Add as many db-id parameters to the filtering rule as the number of different databases you want to scan.</db-id> … <db-id>.2.. Request Samples Retrieving information about users of database This request packet retrieves information on all users of the database with ID 79..Supported Operations 243 You can retrieve information from multiple databases using a single get-db-users operation.2..</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.0"> <database> <get-db-users> <filter/> </get-db-users> </database> </packet> .. <packet version="1.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. <database> <get-db-users> <filter> <db-id>. <packet version="1.4.4.

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

2.2.4. the response from the server looks as follows: <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.2. the response from the server looks as follows: <packet version="1.4.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> . <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.Supported Operations 245 Response Samples Retrieving information about users of database This request packet retrieves information about all users of the database with ID=79.

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

4. Add as many del-db-user operations as the number of different users you want to delete from the database..Supported Operations 247 Remarks You can delete multiple users from the database using a single packet. Request Samples Deleting a database user This packet removes the user with ID 55 from a database..0"> <database> <del-db-user> <filter> <db-id>45</db-id> </filter> </del-db-user> </database> </packet> . <database> <del-db-user> … </del-db-user> . <del-db-user> … </add-db-user> </database> You can also delete all users from the different databases using this construction.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. Note: Use the <filter/> parameter if you want to delete all users from all databases available for the sender.2. <packet version="1.2. <packet version="1.

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

4.0"> <database> <del-db-user> <filter> <id>55</id> </filter> </del-db-user> </database> </packet> A positive response from the server can look as follows: <packet version="1.2.Supported Operations 249 Response Samples Deleting database user This request packet removes the user with ID 55 from the database with ID 2.4.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> .2. <packet version="1.2.4.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.

2.0"> <database> <del-db-user> <result> <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> A negative response can look as follows: <packet version="1.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.250 Supported Operations Deleting multiple database users This request packet removes all users from the database with ID 45.2.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.4.2.4. <packet version="1. The response from the server looks as follows: <packet version="1.

4. Desktop presets can be of one of the following types:     presets for administrators presets for domain administrators presets for clients presets for resellers Each of these user types has a default preset that is applied to their home pages by default.0 and higher Plesk user: Plesk Administrator Description The desktop operator is used to modify desktop items of Plesk users' home pages by applying different desktop presets. The presets are the files containing configuration of desktop elements.5.xsd Plesk version: Plesk 7. Supported operations     SET-ADMIN (see page 252) changes Plesk Administrator preset SET-DEFAULT-PRESET (see page 255) chooses the default preset for Plesk users PRESET-LIST (see page 260) retrieves info on presets specified by ID ADD-PRESET (see page 265) overwrites the file of presets .0 and later API RPC version: 1.6 Win | Unix 8.0. You can have several presets for your interface and switch between them when needed.Supported Operations 251 Managing Desktop Presets Operator: <desktop> XML Schema: desktop.

0"> <desktop> <set-admin> ............................................................................ 254 Request Packet Structure A request XML packet changing the Plesk Administrator desktop view includes the setadmin operation node: <packet version="1............................................................................................. </set-admin> </desktop> </packet> The set-admin node is presented by the SetAdminInputCommandType type (desktop....... or ID In this section: Changing Plesk Administrator Preset ........270 Changing Plesk Administrator Preset Use the set-admin operation to change the view of the Plesk Administrator desktop.........................xsd)........................................................260 Adding Preset ........................................ and its graphical representation is as follows:  The desktop-preset node is required.............................4.265 Removing Preset . You can specify only presets for administrators...................... 253 Response Samples .. Data type: string............2.................................................. ...................... It specifies the name of the preset................................................................................... 253 Response Packet Structure ..................................................252 Choosing Default Preset .... In this section: Request Packet Structure..............252 Supported Operations  REMOVE-PRESET (on page 270) removes presets specified by name and type.........................255 Retrieving Preset Preferences ........................................................... 252 Request Samples .....................................................................................................

2. The status node is required. Data type: string.2. The errcode node is optional. Allowed values: ok | error.xsd) and structured as follows:    The result node is required.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.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. It specifies the execution status of the set-admin operation. It wraps the response retrieved from the server. <packet version="1.Supported Operations 253 Request Samples This packet applies preset Default Administrator Desktop to the desktop of Plesk Administrator.4. . Data type: integer. <packet version="1. Is returns the error code if the set-admin operation fails. Data type: DesktopOpResultType (desktop.4.xsd).

4. a response from the server can look as follows: <packet version="1.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. or the type of preset differs from 'admin'.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> . The id node is optional. It holds ID of the preset if the operation succeeds. It returns the error message if the set-admin operation fails.2.254 Supported Operations   The errtext node is optional.4.4.2. <packet version="1.2.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. Response Samples Request sample This request packet applies preset Default Administrator Desktop to the desktop of Plesk Administrator. Data type: string. Data type: integer.

......... If you choose a default preset for these Plesk users...xsd)............................. It specifies the ID of the preset... For information on types of presets................... Data type: integer...... .............. Allowed values: admin | client | domain | reseller... The type node is required..........4................................ 255 Request Samples ........... It specifies the name of the preset...... Data type: string................................................................................. 258 Request Packet Structure A request XML packet changing default preset includes the set-default-preset operation node: <packet version="1.................. and its graphical representation is as follows:    The name node is required...0"> <desktop> <set-default-preset> .......... 256 Response Packet Structure .. 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............. 257 Response Samples ............. it will be immediately applied to their home pages.............2............. </set-default-preset> </desktop> </packet> The set-default-preset node is presented by the SetDefaultPresetInputCommandType type (desktop. Data type: string.........Supported Operations 255 Choosing Default Preset Use the set-default-preset operation to choose default preset for Plesk users except for Plesk Administrator.................. It specifies the type of the preset................. refer to the Managing Desktop Presets (see page 251) section............ In this section: Request Packet Structure.. The id node is required.

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> . Types of the presets should differ.2. Request Samples Defining default preset for presets of the same type This packet chooses default preset for Plesk clients. <packet version="1.2.0"> <desktop> <set-default-preset> <name>ClientDefaultPreset</name> <type>client</type> </set-default-preset> </desktop> </packet> 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. Add as many set-defaultpreset operations as number of presets you want to set as default.4.256 Supported Operations Remarks You can choose default preset for multiple types of presets.4.

Is returns the error code if the set-default-preset operation fails. The errtext node is optional. The id node is optional. Data type: DesktopOpResultType (desktop. Data type: integer. It holds ID of the preset if the operation succeeds or if the ID was specified in the request packet. It returns the error message if the set-default-preset operation fails. . Allowed values: ok | error. The errcode node is optional.xsd) and structured as follows:      The result node is required.Supported Operations 257 Response Packet Structure The set-default-preset node of the output XML packet is presented by type SetDefaultResult (desktop. It wraps the response retrieved from the server. The status node is required. Data type: string. It specifies the execution status of the set-default-preset operation. Data type: string.xsd). Data type: integer.

4.4.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.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.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> .2. the response is as follows: <packet version="1.2.2. <packet version="1.258 Supported Operations Response Samples Defining default preset for presets of the same type This request packet chooses default preset for Plesk clients.

Supported Operations 259 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.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.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> .4.4.2.2.

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

4. <packet version="1. <packet version="1.2.Supported Operations 261 Request Samples Retrieving preferences of a single preset This packet retrieves preferences of the preset specified by ID 5.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. <packet version="1.0"> <desktop> <preset-list> <filter> <id>5</id> </filter> </preset-list> </desktop> </packet> Retrieving preferences of multiple presets This packet retrieves preferences the presets specified by ID 5 and ID 7.2.4.2.0"> <desktop> <preset-list> <filter/> </preset-list> </desktop> </packet> .4.

The type node is required. Data type: integer. Data type: string. The following nodes are nested in the response packet only if the operation succeeds:   The name node is required. It specifies if the preset will be default for the specified type of presets. Data type: string. For information on default presets. It wraps the response retrieved from the server.262 Supported Operations Response Packet Structure The preset-list node of the output XML packet is presented by type PresetlistsResult (desktop. Allowed values: admin | client | domain. The id node is optional. It holds preferences of the preset. Data type: DesktopOpAdvancedpresetType (desktop. refer to the Managing Desktop Presets (see page 251) section. Data type: PresetType (desktop. Data type: none. The errcode node is optional. Is returns the error code if the preset-list operation fails. The errtext node is optional. refer to the Managing Desktop Presets (see page 251) section. It holds ID of the preset.xsd). It returns the error message if the preset-list operation fails. Data type: integer. It specifies the execution status of the preset-list operation. It specifies the preset name. The preset node is optional. Data type: string. Allowed values: ok | error. .xsd).  The default node is optional. The status node is required. Data type: string. It specifies the type of the preset. For info on types of presets.xsd) and structured as follows:       The result node is required.

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 result looks as follows: <packet version="1.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> .4.2. <packet version="1.4.0"> <desktop> <preset-list> <result> <status>ok</status> <id>5</id> <preset> <name>ClientDefaultPreset</name> <type>client</type> <default></default> </preset> </result> </preset-list> </desktop> </packet> If the preset was not found on the server.Supported Operations 263 Response Samples Retrieving preferences of a single preset This request packet retrieves preferences of the preset specified by ID 5.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> <type>admin</type> </preset> </result> </preset-list> </desktop> </packet> .0"> <desktop> <preset-list> <filter/> </preset-list> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.2. <packet version="1.4.2.4.264 Supported Operations Retrieving preferences of multiple presets This request packet retrieves preferences of all presets on the server.

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

4. the operation will overwrite the old file.xml</file> <overwrite/> </add-preset> </desktop> </packet> .xml</file> <overwrite/> </add-preset> <add-preset> <file>/tmp/domainpreset.0"> <desktop> <add-preset> <file>/tmp/mypreset. <packet version="1.4.266 Supported Operations Request Samples Adding a preset This packet adds preset MyPreset to desktop presets located on the server.2.0"> <desktop> <add-preset> <file>/tmp/mypreset. If preset MyPreset already exists on the server.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. <packet version="1.2.

Supported Operations 267 Response Packet Structure The add-preset node of the output XML packet is presented by type AddPresetResult (desktop. Data type: integer. The errtext node is optional. Allowed values: ok | error. It returns the error message if the add-preset operation fails.     . It holds ID of the preset if the operation succeeds. The errcode node is optional. Data type: string. Data type: DesktopOpResultType (common. It specifies the execution status of the add-preset operation.xsd). The id node is optional. It wraps the response retrieved from the server. The status node is required. Is returns the error code if the add-preset operation fails. Data type: integer. Data type: string.xsd) and structured as follows:  The result node is required.

the response is as follows: <packet version="1. If preset MyPreset already exists on the server.4.2.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. the operation will overwrite the old file.2.</errtext> </result> </add-preset> </desktop> </packet> .0"> <desktop> <add-preset> <result> <status>ok</status> <id>12</id> </result> </add-preset> </desktop> </packet> If the file was not a valid preset.2.4. <packet version="1.0"> <desktop> <add-preset> <file>/tmp/mypreset.268 Supported Operations Response Samples Adding a preset This request packet adds preset MyPreset to desktop presets located on the server.xml</file> <overwrite/> </add-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.4.

2.0"> <desktop> <add-preset> <file>/tmp/mypreset.4. <packet version="1.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> .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.xml</file> <overwrite/> </add-preset> <add-preset> <file>/tmp/domainpreset.4.Supported Operations 269 Adding multiple presets This packet adds the presets MyPreset and DomainPreset to desktop presets located on the server.

.............270 Supported Operations Removing Preset Use the remove-preset operation to remove a preset.............0"> <desktop> <remove-preset> ..................... It specifies the ID of the preset...... .................................. It specifies the filtering rule... Data type: string.. In this section: Request Packet Structure........4........ If you specify the preset name................ Data type: string....... Data type: integer....................... you should also specify the preset name......2.................... and its graphical representation is as follows:     The filter node is required................................ you should also specify the preset type....... 272 Response Samples . 271 Response Packet Structure .... refer to the Managing Desktop Presets (see page 251) section.............. If you specify the preset type. Data type: PresetfilterType (desktop........................................................... It specifies the type of the preset. The id node is optional........ </remove-preset> </desktop> </packet> The remove-preset node is presented by the RemovePresetInputCommandType type (desktop..... 273 Request Packet Structure A request XML packet removing a preset includes the remove-preset operation node: <packet version="1. 270 Request Samples ................... For information on presets............. It specifies the name of the preset..... The name node is optional...... Note: You cannot delete default presets....xsd)..... The type node is optional.........xsd)..

4. or by ID.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.Supported Operations 271 Remarks Using different filtering rules.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. Request Samples Removing a preset This packet removes client preset MyPreset. <packet version="1. you can do the following operations:   Remove a single preset specified by name and type Remove one or more presets specified by ID The following filtering rule specifies the client preset called ClientPreset. name.0"> <desktop> <remove-preset> <filter> <id>6</id> <id>8</id> </filter> </remove-preset> </desktop> </packet> . add as many remove-preset operations to the request packet as the number of different filtering rules to be applied. The packet containing type. To use different filtering rules in a single packet. <packet version="1. and ID parameters in a single filter node will be considered invalid by Plesk.2.4.

<packet version="1. Data type: string. It specifies the execution status of the remove-preset operation.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> Response Packet Structure The remove-preset node of the output XML packet is presented by type RemovePresetResult (desktop. The errtext node is optional. The errcode node is optional. The status node is required. Data type: integer. Data type: DesktopOpResultType (common.xsd) and structured as follows:      The result node is required. The id node is optional. It holds ID of the preset if the operation succeeds or if it was specified in the request packet.2.xsd). It returns the error code if the remove-preset operation fails. It returns the error message if the remove-preset operation fails. Data type: integer.4. It wraps the response retrieved from the server. Data type: string.272 Supported Operations This packet removes administrator presets MyPreset and MyAdminPreset. Allowed values: ok | error. .

4.0"> <desktop> <remove-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Desktop preset "MyPreset" of type "client" was not found in repository.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.2. the response is as follows: <packet version="1.2.Supported Operations 273 Response Samples Removing a preset This request packet removes client preset MyPreset.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.4.</errtext> </result> </remove-preset> </desktop> </packet> .2. <packet version="1.

4.2. <packet version="1.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> .4.2. <packet version="1.2.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.274 Supported Operations Removing multiple presets This packet removes the presets specified by ID 6 and ID 8.0"> <desktop> <remove-preset> <filter> <id>6</id> <id>8</id> </filter> </remove-preset> </desktop> </packet> A positive response from the server can look as follows: <packet version="1.4.

4.Supported Operations 275 If the presets were not found on the server.</errtext> </result> </remove-preset> </desktop> </packet> .0"> <desktop> <remove-preset> <result> <status>error</status> <errcode>1013</errcode> <errtext>Desktop preset "MyPreset" of type "admin" was not found in repository.</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. the response looks as follows: <packet version="1.2.

......................................................................................... 368 ......................... 304 Managing SOA Records and Zone Parameters...............................................................................................................................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 282) Managing ACL (see page 304) Managing SOA record and zone parameters (see page 315) Managing name servers (see page 329) Managing local or remote DNS servers (see page 350) Managing recursive requests to DNS servers (see page 368) In this section: Filtering Issues ..................................................................................................... 278 Managing DNS Records ............. 350 Managing DNS Recursion ............... 329 Managing Local or Remote DNS Servers .....................................276 Supported Operations Managing DNS Operator: <dns> XML Schema: dns_input................. 315 Managing Name Servers ................................................. dns_output...........................................xsd................................. 282 Managing ACL ......

Supported Operations 277 Supported operations   ADD_REC (see page 282) adds a DNS record of the specified type to the specified domain zone GET_REC (see page 291) retrieves information about certain DNS records .

278 Supported Operations                   DEL_REC (see page 297) removes the specified DNS record(s) GET_ACL (see page 304) retrieves access control lists (ACL) from the server ADD_TO_ACL (see page 306) adds hosts to ACL REMOVE_FROM_ACL (see page 310) removes hosts from ACL SET (see page 316) updates the SOA record settings for the specified zone or zone template GET (see page 323) retrieves the SOA record settings SWITCH (see page 330) switches the DNS zone type between ‗master‘ and ‗slave‘ ADD_MASTER_SERVER (see page 334) adds a new master DNS server for the specified zone GET_MASTER_SERVER (see page 340) retrieves the master server for the specified zone DEL_MASTER_SERVER (see page 345) removes the master server for the specified zone ENABLE (see page 350) enables the name server for the specified zone DISABLE (see page 355) disables the name server for the specified domain ENABLE-REMOTE-DNS (see page 359) switches the DNS server to primary mode DISABLE-REMOTE-DNS (see page 362) switches the DNS server to slave mode GET-STATUS-REMOTE-DNS (see page 365) retrieves the status of the remote DNS server SET-RECURSION (see page 368) sets up preferences of recursive requests to DNS server GET-RECURSION (see page 372) retrieves the recursion preferences DNS server GET-SUPPORTED-RECURSION (see page 374) retrieves the available types of recursion for the DNS server .

0. The blank filter means that all records are matched by this rule. Earlier versions of the protocol do not support this node.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.4. domain ID or host IP address.2. Note: The <filter-id> node appears in API RPC 1. A single filter can specify multiple DNS records. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. all specified either by ID.4. the filter-id parameter will hold the ID of the object. It returns the filtering rule parameter. There are three kinds of filters. The request XML packet filters data using a special <filter> section. If the filter node is left blank (<filter/>). nested in the filter node are called filtering rule. it is returned in the filter-id node of the response packet. 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.2. Parameters.Supported Operations 279 Filtering Issues Filtering is the way the request XML packet indicates the object to which the operation will be applied. If one of the following values was set as a filter rule parameter. A single operation can use only parameters of the same type in the filtering rule.    Domain ID DNS Record ID Domain alias ID It is done to trace the request parameters in case of error. specified by different types:    aclFilter (see page 280) simpleFilter (see page 280) dnsSelectionFilter (see page 281) .

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

xsd). or domain alias ID. Data type: integer. The domain_alias_id node is optional.1.0.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. It is used in get_rec. The packet that contains both domain_id and domain_alias_id parameters in a single filter node will be considered invalid by Plesk server. del_master_server. 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. The id node is optional. For information on domain aliases. This filter parameter is supported starting with API RPC v. get_master_server operations. It specifies the DNS record ID in Plesk database. del_rec. It specifies the domain alias ID in Plesk database. refer to the Managing Domain Aliases (see page 487) section. Data type: integer. The graphical representation of the filter node is as follows:    The domain_id node is optional.4. domain ID.Supported Operations 281 Remarks You can match multiple domains using this filter. Data type: dnsSelectionFilterType (dns_input. dnsSelectionFilter The dnsSelectionFilter filter match DNS records by ID. Data type: integer. or domain_alias_id when using this filter. It specifies the domain ID in Plesk database. .

In this section: Adding DNS Record .. The packet that contains a combination of id..... where DNS information can be found about the domain name to which the NS record is attached... The following record types are available in Plesk:   A (Address)......... domain_id.... 282 Retrieving DNS Records .................. 297 Adding DNS Record Resource Records define data types in the Domain Name System (DNS).. and domain_alias_id parameters in a single filter node will be considered invalid by Plesk server................................ Managing DNS Records In Plesk. Defined in RFC 1035...... NS (Authoritative name server)......  ... 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......... Specifies a host name (which must have an A record associated with it).. Resource Records identified by RFC 1035 are stored in binary format internally for use by DNS software........ But resource records are sent across a network in text format while they perform zone transfers................... so CNAME only provides one layer of indirection............. domain_id........... or domain_alias_id when using this filter. an IPv4 32-bit address) associated with a domain name................ CNAME records should not point to domain names which themselves have associated CNAME records. Plesk automatically generates zone file for it basing on server templates... Note that if a domain name has a CNAME record associated with it....... The combination of two filtering rules in one filter node can look as follows: <filter> <id>1</id> <id>2</id> <id>3</id> </filter> Note: You can use either id.... In addition.............. domain aliases.............282 Supported Operations Remarks You can also match multiple domains....... NS records are the basic infrastructure on which DNS is built... they stitch together distributed zone files into a directed graph that can be efficiently searched........... 291 Deleting DNS Records ....... and domain or domain alias zone records..................... then it can not have any other record types. DNS records using this filter......... DNS resource records include zone template records........ CNAME (Canonical name for a DNS alias).. Used for storing an IP address (specifically...........

........... 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................................. Provides a general indirection facility for DNS records........... Where MX records work only for mail delivery and provide "failover" via the Priority value. On creation of a new domain....... TXT (Text string).......... SRV records add in support for load balancing (via the Weight value) and port selection (via the Port value)...... In this section: Request Packet Structure................0 and later.................................................. 284 Request Samples .. PTR (Domain name pointer)................................ Critical part of the infrastructure used to support SMTP email............ Each MX record specifies a domain name (which must have an A record associated with it) and a priority......................Supported Operations 283  MX (Mail Exchanger)...... This type of records is available only in Plesk for Windows via API RPC v........ AXFR (Asynchronous Full Transfer Zone)....     Note: You can add a DNS record for the specified domain or to the DNS zone template........ARPA domain....1.. 288 Response Samples ..........................0............................ SRV (service) records are a generalization and expansion of features provided by MX records........... a list of mail exchangers is then ordered by priority when delivering mail....... up to 255 bytes in length..... Arbitrary binary data....... 285 Response Packet Structure ................. 289 ...... Plesk automatically generates zone file for the domain or domain alias basing on the server template.............. Most often used to provide a way to associate a domain name with an IPv4 address in the IN-ADDR..5...

the DNS record will be added to DNS records for the domain with the corresponding ID. The type node is required. If specified. If specified. For more information about DNS types.2.0. The support of this node has started since 1.xsd).0"> <dns> <add_rec> … </add_rec> </dns> </packet> The add_rec node is presented by the dnsRecord type (plesk_dns.284 Supported Operations Request Packet Structure A request XML packet adding a new DNS record to Plesk database includes the add_rec operation node: <packet version="1. Data type: integer.0 version of the API RPC protocol. Data type: string. refer to the Adding a DNS Record (see page 282) section.4. It specifies the type of the DNS record. Data type: integer. Allowed values: A | NS | CNAME | MX | PTR | TXT | SOA | AXFR | SRV  .4. the DNS record will be added to DNS records for the domain alias with the corresponding ID. Its graphical representation is as follows:   The domain_id node is optional. The domain_alias_id node is optional.

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

2.</value> </add_rec> </dns> </packet> This packet adds an MX DNS record which makes mailex.12</value> </add_rec> </dns> </packet> This packet sets example. (domain ID of example.2.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>CNAME</type> <host>ftp</host> <value>example.5. <packet version="1.1.com. the main mail server for domain mail-exchange.0"> <dns> <add_rec> <type>MX</type> <host>mail-exchange</host> <value>mailex. (domain ID of example.com.5.net.5.1.example.12.example.com is 1).286 Supported Operations This packet links domain mail.com is 1) to IP address 192.net</value> <opt>0</opt> </add_rec> </dns> </packet> .1.com. <packet version="1.0.com.example.com.example.0.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>A</type> <host>mail</host> <value>192. (domain ID of example.example. as the canonical name for domain ftp. is 1). <packet version="1.com.

5.tst.4.1.com. is 1).0"> <dns> <add_rec> <type>MX</type> <host/> <value>mymail.0.4. (domain ID of example.2.Supported Operations 287 This packet adds a PTR DNS record which makes domain community.2._tcp.1.2.0.ldap.5.0"> <dns> <add_rec> <type>TXT</type> <host>about</host> <value>The best place to improve your experiences. <packet version="1. the domain name pointer for the subnet 192.1.domain-test-480908606.</host> <value>192.com.com.5.com. is 1).0.0. <packet version="1. <packet version="1.domain&gt.5.</value> <opt>25</opt> </add_rec> </dns> </packet> .&lt.2.0"> <dns> <add_rec> <domain_id>11</domain_id> <type>SRV</type> <host>_LDAP.example.</value> </add_rec> </dns> </packet> This packet adds an SRV record for LDAP service on host 192.0"> <dns> <add_rec> <type>PTR</type> <host>192.0</host> <value>community</value> <opt>24</opt> </add_rec> </dns> </packet> This packet adds a textual description to the domain about.example. <packet version="1.</value> <opt>5 25 220</opt> </add_rec> </dns> </packet> Adding a single record to the server DNS zone template This packet adds to the server DNS template an MX record.0/24 (domain ID of example.1.

The errtext node is optional. Data type: integer. The errcode node is optional.</value> </add_rec> </dns> </packet> Response Packet Structure The add_rec node of the output XML packet is structured as follows:      The result node is required. It wraps the response retrieved from the server. It returns the ID of the DNS record.288 Supported Operations Adding multiple DNS records This packet adds A and MX DNS records to DNS zone template. It is used to return the error code when the add_rec operation fails.0"> <dns> <add_rec> <type>MX</type> <host/> <value>mymail.&lt.1. Data type: resultType (common.5. Data type: unsignedInt. The status node is required. Returns the unique identifier of the DNS record just added to Plesk.xsd). . Allowed values: ok | error.domain&gt. <packet version="1. It specifies the execution status of the add_rec operation.</value> <opt>25</opt> </add_rec> <add_rec> <type>A</type> <host>newsome</host> <value>&lt. It is used to return the error message if the add_rec operation fails. it is required if the add_rec operation has succeeded.ip&gt. Data type: string. Data type: string. The id node is optional.

2.</value> </add_rec> </dns> </packet> A positive response from the server can look as follows: <packet version="1.com.4.0"> <dns> <add_rec> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> </result> </add_rec> </dns> </packet> .2.Supported Operations 289 Response Samples Adding a single DNS record This request packet adds an NS record.0"> <dns> <add_rec> <domain_id>1</domain_id> <type>NS</type> <host>Mydomain.0"> <dns> <add_rec> <result> <status>ok</status> <id>17</id> </result></add_rec> </dns> </packet> If the domain ID was not found on the server. <packet version="1.4.2.com. negative response from the server looks as follows: <packet version="1.4.</host> <value>ns.Mydomain.

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

refer to the Filtering Issues (see page 281) section...........................4................................... Data type: none................... You can retrieve multiple records in a single get_rec operation using filtering rules......................................................... For more information about filters..... only DNS zone template records are available for retrieving................ 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: dnsSelectionFilterType(dns_input... In this section: Request Packet Structure.. 295 Request Packet Structure A request XML packet retrieving a DNS record from Plesk database includes the get_rec operation node: <packet version="1.................0"> <dns> <get_rec> … </get_rec> </dns> </packet> The graphical representation of the get_rec node is as follows:  The filter node is required.. 292 Response Packet Structure .. The template node is optional.2............. 294 Response Samples ..................  Note: If you leave the filter node blank (<filter/>)................................... ...... In this case domain_id or domain_alias_id cannot be specified as a filtering rule................ For more information....... If present..............Supported Operations 291 Retrieving DNS Records Both zone template records and domain or domain alias zone records can be retrieved using the get_rec operation...... refer to the Filtering Issues (see page 278) section....... It specifies the filtering rule.............................................. 291 Request Samples .......xsd).

Add as many get_rec operations as the number of different filtering rules.2.4.2.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.4.0"> <dns> <get_rec> <filter> <domain_alias_id>1</domain_alias_id> </filter> </get_rec> </dns> </packet> .4.292 Supported Operations You can retrieve multiple DNS records in a single packet.2. <get_rec> … </get_rec> </dns> Request Samples Retrieving a single DNS record This packet retrieves information on the DNS record with ID 8. <dns> <get_rec> … </get_rec> . <packet version="1...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. <packet version="1. <packet version="1.

<packet version="1.4.0"> <dns> <get_rec> <filter/> <templates/> </get_rec> </dns> </packet> .4.0"> <dns> <get_rec> <filter/> </get_rec> </dns> </packet> This packet retrieves all DNS zone template records.2.4.0"> <dns> <get_rec> <filter> <domain_alias_id>1</domain_alias_id> </filter> </get_rec> <get_rec> <filter> <domain_id>7</domain_id> </filter> </get_rec> </dns> </packet> This packet retrieves zone parameters all domains and domain aliases on the server.2. <packet version="1.2. <packet version="1.Supported Operations 293 This packet retrieves zone parameters of the domain alias with ID 1 and the domain with ID 7.

Returns the unique identifier of the DNS record. Data type: string. It is used to return the error code when the get_rec operation fails. The errtext node is optional.294 Supported Operations Response Packet Structure The get_rec node of the output XML packet is structured as follows:  The result node is optional. Data type: dnsRecord (dns_input.xsd). It specifies the execution status of the get_rec operation.xsd). Data type: integer. The data node is optional. Data type: resultType (common. It is required if the operation get_rec succeeds. It is required if the get_rec operation has succeeded. Data type: unsignedInt. The status node is required. The node is structured as follows:      . The errcode node is optional. The id node is required if the get_rec operation has succeeded. Allowed values: ok | error. It is used to return the error message if the get_rec operation fails. Data type: string. and the data set retrieved from the server is not empty.

Data type: string.4. It specifies the value that will be linked with the host value. It specifies the type of the DNS record.     Response Samples Retrieving a single DNS record This request packet retrieves the DNS record with ID 8. <packet version="1. please visit the Adding a DNS Record (see page 282) section. Data type: string. If specified. It is required if the operation succeeded. Data type: string. The support of this node has started since 1.2. the DNS record is retrieved from zone parameters for the domain with the corresponding ID. the response looks as follows: <packet version="1. Allowed values: A | NS | CNAME | MX | PTR | TXT | SOA | AXFR | SRV The host node is optional.0"> <dns> <get_rec> </get_rec> </dns> </packet> .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. It specifies the IP address or name of a host. It is required if the operation succeeded. The opt node is optional. Data type: string. The value node is optional. It holds optional information about the DNS record.4.0 version of the API RPC protocol.0. For more information about DNS types.Supported Operations 295   The domain_id node is optional. If specified. Data type: integer. the DNS record is retrieved from zone parameters for the domain alias with the corresponding ID.4. It is required if the operation succeeded. The type node is optional.2. that will be used by DNS. Data type: integer. The domain_alias_id node is optional.

2.com.Mydomain.2. the response from the server looks 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. the response can look as follows: <packet version="1.0"> <dns> <get_rec> <result> <status>ok</status> <id>8</id> <data> <domain_id>8</domain_id> <type>NS</type> <host>Mydomain.com.4.4.</host> <value>ns.0"> <dns> <get_rec> </get_rec> </dns> </packet> . <packet version="1.0"> <dns> <get_rec> <filter> <domain_id>8</domain_id> </filter> </get_rec> </dns> </packet> If the domain with ID 8 was not found on the server.2.296 Supported Operations If the DNS record with ID 8 was found on the server.

................... 298 Request Samples ......................................................................Mydomain........com</value> <opt></opt> </data> </result> </get_rec> </dns> </packet> Deleting DNS Records Both zone template records and domain or domain alias zone records can be deleted using the del_rec operation...... 299 Response Packet Structure .................................................. </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... 302 ....Supported Operations 297 If the domain with ID 8 was found on the server. a response from the server can look as follows: <packet version="1.............2....................... In this section: Request Packet Structure............................................. 301 Response Samples ..................... refer to the Filtering Issues (see page 278) section...................com</host> <value>ns........................ You can retrieve multiple records in a single del_rec operation using filtering rules...... For more information about filters.............com......0"> <dns> <get_rec> <result> <status>ok</status> <id>18</id> <data> <domain_id>8</domain_id> <type>NS</type> <host>Mydomain..................

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

4.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.0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> <domain_id>8</domain_id> </filter> </del_rec> </dns> </packet> .2.2.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.2. <packet version="1. <packet version="1.4.Supported Operations 299 Request Samples Deleting a single DNS record This request packet deletes DNS record with ID 75 <packet version="1.4.

4. <packet version="1.0"> <dns> <del_rec> <filter/> </del_rec> </dns> </packet> This request packet deletes all DNS records from the server template.0"> <dns> <del_rec> <filter> <domain_id>7</domain_id> </filter> </del_rec> <del_rec> <filter> <id>5</id> </filter> </del_rec> </dns> </packet> This request packet deletes DNS records from zone files of all domain aliases and domains.4. <packet version="1.4. and the record with ID 5.2.0"> <dns> <del_rec> <filter/> <template/> </del_rec> </dns> </packet> .300 Supported Operations This request packet deletes DNS records from the zone of the domain with ID 7. <packet version="1.2.2.

xsd). Data type: string. The errcode node is optional. the result node is also required.Supported Operations 301 Response Packet Structure The del_rec node of the output XML packet is structured as follows:  The result node is optional. It is used to return the error code when the del_rec operation fails. the id node is also required. If the id was set as a filtering rule in the request packet. Data type: integer. The errtext node is optional. If the id was set as a filtering rule in the request packet. Allowed values: ok | error. It is required if the operation del_rec succeeds and the data set retrieved from the server is not empty. It is used to return the error message if the del_rec operation fails. The status node is required. Returns the unique identifier of the DNS record. Data type: unsignedInt. The id node is required if the del_rec operation has succeeded. It specifies the execution status of the del_rec operation. Data type: string.     . Data type: resultType (common.

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. <packet version="1.4.302 Supported Operations Response Samples Deleting a single DNS record This request packet deletes DNS record with ID 75.</errtext> <id>75</id> </result> </del_rec> </dns> </packet> . the response from the server looks as follows: <packet version="1.4.4.2.2.2.0"> <dns> <del_rec> <result> <status>error</status> <errcode>1013</errcode> <errtext>DNS record does not exist.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.

2.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. 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> . <packet version="1.4.4.Supported Operations 303 Deleting multiple DNS records This request packet deletes DNS records for the domain ID 7 and the record with ID 5.2. The record with ID 5 was not found on the server.

........ Request packet sample <packet version="1.......................................... You can define the hosts which can perform operations on your name server.................. 306 ........................................................2................................................. 310 Retrieving ACL To retrieve the ACL of your name server.................................................... 306 Removing Host From ACL.................................... use the get_acl operation.................... The get_acl operation in a request packet has the following graphics presentation: Data type: none...................................................................................0"> <dns> <get_acl/> </dns> </packet> In this section: Response Packet Structure ...4....................................... 304 Adding Hosts to ACL ............304 Supported Operations Managing ACL The Access Control List (ACL) is a concept in computer security used to enforce privilege separation... In this section: Retrieving ACL ... 305 Response Samples .......................

Data type: string. It is required if the del_acl operation has succeeded.xsd). Data type: string. Allowed values: ok | error. The errtext node is optional. Data type: unsignedInt. The errcode node is optional. Data type: string. The host node is optional. or when an error (if it occurred) was not of a system type. Data type: resultType (common.     . It specifies the execution status of the get_acl operation. It is used to return the error message if the get_acl operation fails.Supported Operations 305 Response Packet Structure The get_acl operation in a response packet has the following graphics presentation:  The result node is optional. It is used to return the error code when the get_acl operation fails. It is required in case when the get_acl operation has succeeded. The status node is required. Returns the IP address or name of hosts from ACL.

........2</host> </result> </get_acl> </dns> </packet> If the ACL list is empty.....2.......4. 307 Request Samples .............................................. 308 Response Samples .......................... In this section: Request Packet Structure......306 Supported Operations Response Samples A response packet can look as follows: <packet version="1.......... use the add_to_acl operation...0.........................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...............................0............. 309 ..................4...1</host> </result> <result> <status>ok</status> <host>127.......................................................0.. 307 Response Packet Structure ..........................................0............... You can add multiple hosts to ACL using a single packet....................2..... the response packet looks as follows: <packet version="1..........0"> <dns> <get_acl> <result> <status>ok</status> <host>127............

34. You can add multiple hosts to the ACL in a single packet using filters.Supported Operations 307 Request Packet Structure A request XML packet adding a new host to the ACL includes the add_to_acl operation node: <packet version="1.4.2. Add as many host parameters to the filter node as the number of hosts you want to add to the ACL. Data type: aclFilter (dns_input.34.34.168.168.34. refer to the Filtering Issues (see page 280) section. <packet version="1.56 to the ACL.0"> <dns> <add_to_acl> <filter> <host>192.56</host> </filter> </add_to_acl> </dns> </packet> .4.34. For more information.2. <packet version="1.0"> <dns> <add_to_acl> <filter> <host>192.16.168.4.56 and 12.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.56 to the ACL. Request Samples This packet adds host 192.xsd).16.168. It specifies the filtering rule.2.34.56</host> </filter> </add_to_acl> </dns> </packet> This packet adds hosts 192.56</host> <host>12.

Data type: string. The host node is optional. Data type: string. Data type: unsignedInt.     . It is required in case when an error (if it occurred) was not of a common type. The errcode node is optional.xsd). It is required in case when an error (if it occurred) was not of a system type. Data type: string. It is used to return the error code when the get_acl operation fails. It specifies the execution status of the get_acl operation. Data type: aclresultType (common. Allowed values: ok | error. The status node is required. The errtext node is optional. It is used to return the error message if the get_acl operation fails. Returns the IP address or name of hosts from the ACL.308 Supported Operations Response Packet Structure The add_to_acl node of the output XML packet is structured as follows:  The result node is optional.

2.34. <packet version="1.56</host> </result> </add_to_acl> </dns> </packet> A negative response from the server can look as follows: <packet version="1.4.2.34.0"> <dns> <add_to_acl> <result> <status>ok</status> <host>192.Supported Operations 309 Response Samples Adding a single host to ACL This request packet adds host 192.0"> <dns> <add_to_acl> <filter> <host>192.1 already exists.168.0.0"> <dns> <add_to_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 127.4.56</host> </filter> </add_to_acl> </dns> </packet> The positive response from the server looks as follows: <packet version="1.</errtext> </result> </add_to_acl> </dns> </packet> .2.168.56 to the ACL.34.0.4.168.

4.</errtext> </result> </add_to_acl> </dns> </packet> .168.168.56</host> </filter> </add_to_acl> <add_to_acl> <filter> <host>192.168.56</host> </result> </add_to_acl> <add_to_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.34.56 already exists. <packet version="1.4.0"> <dns> <add_to_acl> <filter> <host>192.34.34.56 to the ACL two times.0"> <dns> <add_to_acl> <result> <status>ok</status> <host>192.168.2.34.2.56</host> </filter> </add_to_acl> </dns> </packet> A response from the server can look as follows: <packet version="1.34.310 Supported Operations Adding a single host to ACL This request packet adds host 192.168.

..................56 from the ACL...... 311 Response Packet Structure . <packet version="1.............................168......... Data type: aclFilter (dns_input.............................. You can remove multiple hosts from the ACL in a single packet using filters............Supported Operations 311 Removing Host From ACL To remove a host from the ACL of your name server...4.........0"> <dns> <remove_from_acl> <filter> <host>192. For more information...168... It specifies the filtering rule.....2.......56</host> </filter> </remove_from_acl> </dns> </packet> ...........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........ 312 Response Samples ................................ Add as many host parameters to the filter node as the number of hosts you want to remove from ACL...............2......... Request Samples This packet removes host 192........... You can remove multiple hosts from the ACL using a single packet......34.............................................. use the remove_from_acl operation........................ 311 Request Samples ...4...........xsd)............34............... In this section: Request Packet Structure.................. refer to the Filtering Issues (see page 280) section... 313 Request Packet Structure A request XML packet removing a host from the ACL includes the remove_from_acl operation node: <packet version="1...........

It is required in case an error (if it was) was not of a common type.0"> <dns> <remove_from_acl> <filter> <host>192.34. Returns the IP address or name of hosts from the ACL. The host node is optional.168.56 and 12.     .2. refer to the Common Errors (see page 1383) section.56 from the ACL. Data type: unsignedInt. For more information about common errors. <packet version="1. Data type: string.34.4. It specifies the execution status of the remove_from_acl operation.312 Supported Operations This packet removes hosts 192.xsd).34. Data type: string.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. It is used to return the error message if the remove_from_acl operation fails. Allowed values: ok | error. It is used to return the error code when the remove_from_acl operation fails.34. The errtext node is optional.56</host> <host>12.16. The errcode node is optional. Data type: string. Data type: resultType (common. The status node is required.168.16. It is required in case when an error (if it occurred) was not of a common type.

</errtext> </result> </remove_from_acl> </dns> </packet> .56 from the ACL.56</host> </filter> </remove_from_acl> </dns> </packet> The positive response from the server looks as follows: <packet version="1.168.Supported Operations 313 Response Samples Removing a single host to ACL This request packet removes host 192.168.4.34. <packet version="1.34.2.168.34.0"> <dns> <remove_from_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.0"> <dns> <remove_from_acl> <result> <status>ok</status> <host>192.2.56 does not exists.56</host> </result> </remove_from_acl> </dns> </packet> A negative response from the server can look as follows: <packet version="1.2.34.4.168.0"> <dns> <remove_from_acl> <filter> <host>192.4.

34.56 to the ACL two times.2.168.4.34.168.4.168.56</host> </result> </remove_from_acl> <remove_from_acl> <result> <status>error</status> <errcode>1007</errcode> <errtext>IP address 192.314 Supported Operations Removing a single host to ACL This request packet adds host 192. <packet version="1.0"> <dns> <remove_from_acl> <result> <status>ok</status> <host>192.34.56</host> </filter> </remove_from_acl> </dns> </packet> A response from the server can look as follows: <packet version="1.34.168.2.</errtext> </result> </remove_from_acl> </dns> </packet> .34.168.56 already exists.0"> <dns> <remove_from_acl> <filter> <host>192.56</host> </filter> </remove_from_acl> <remove_from_acl> <filter> <host>192.

................. Plesk sets the default value of three hours....... If you do not specify the zone... In this section: SOA Parameters ..................................... This is the amount of time (in seconds) that slave DNS servers should store the record in a cache.. RFC 1912 recommends to vary this parameter from 1200 to 43200.... Data type: integer... Plesk sets the default value of one hour.. 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.Supported Operations 315 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........... 316 Retrieving Parameters of SOA Record and Zone ................... Typical values vary from 180 (three minutes) to 900(15 minutes).................. Use the 1200 value if your data is volatile and 43200 if not............ the status of the local DNS server is returned.......... Data type: unsignedInt..... The refresh node is optional............... This type has the following graphics representation:  The ttl node is optional..xsd)......... The SOA resource record indicates that this DNS name server is the best source of information for the data within this DNS domain.. The zone status is the status of DNS service for the specified zone..... This is the time (in seconds) a slave (secondary) DNS server waits before retrying a failed zone transfer.............................. Plesk sets the default value of one day.......... This time is typically less than the refresh interval. 315 Updating SOA Record . The retry node is optional.. 323 SOA Parameters The soa node is presented by type SOAType (plesk_dns.. Data type: unsignedInt.... Data type: unsignedInt.........   ..........

. 319 Response Samples .... Data type: unsignedInt.......... If contact is made the expiry and refresh values are reset and the cycle starts again.... For more information about SOA records....... The parameters in the SOA record of the zone template will be applied to a new domain or domain alias on creation................... The minimum node is optional................ If the slave fails to contact the master...........316 Supported Operations  The expire node is optional............ 317 Request Samples ... Applies to Slaves or Secondary servers only....... BIND9 slaves stop responding to queries for the zone when this time has expired and no contact has been made with the master............ Thus when the ref values expires the slave will attempt to read the SOA record for the zone ..... at which point it will stop answering queries for the domain.4........... 318 Response Packet Structure .......and request a zone transfer AXFR/ IXFR if the sn has changed. Plesk sets the default value of three hours......1.................. 321 .........  Updating SOA Record Use the set operation to update a SOA record for the DNS zone template...................... Data type: unsignedInt........... refer to the SOA parameters (see page 315) section.......... it will retry every retry period but continue to supply authoritative data for the zone until the expiry value is reached.0................. Note: The set operation is supported starting with API RPC protocol v............. This is the time (in seconds) during which a secondary server should cache a negative response............................ The maximum value allowed by BIND 9 for this parameter is 3 hours (10800 seconds).................... You can update multiple SOA records in a single packet....................... Signed 32-bit value in seconds........... or for the domain (domain alias) specified by ID.....................0....... Plesk sets the default value of one week.. RFC 1912 recommends 1209600 to 2419200 seconds (2-4 weeks) to allow for major outages of the master. Indicates when the zone data is no longer authoritative. In this section: Request Packet Structure.........................

0"> <dns> <set> … </set> </dns> </packet> The graphical representation of the set node is as follows:  The filter node is optional.xsd). Specifies the SOA parameters.2.xsd).  Note: If you omit the filter node. Add as many set operations as the number of different filtering rules.. It specifies the filtering rule. the operation will update SOA parameters for the DNS zone template. refer to the Filtering Issues (see page 280) section.4. Data type: SOAType (plesk_dns.Supported Operations 317 Request Packet Structure A request XML packet updating a SOA record includes the set operation node: <packet version="1. The soa node is required. For more information. Data type: simpleFilterType (dns_input. <set> … </set> </dns> . <dns> <set> … </set> . You can update multiple SOA records in a single packet..

<packet version="1. <packet version="1.4.318 Supported Operations Request Samples Updating a single SOA record This packet updates a SOA record of the domain with ID 12.4.2.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.0"> <dns> <set> <soa> <ttl>86400</ttl> <refresh>10800</refresh> <retry>3600</retry> <expire>604800</expire> <minimum>10800</minimum> </soa> </set> </dns> </packet> .

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> .2.4.2.Supported Operations 319 Updating multiple SOA records This packet updates SOA records of the domains with ID 12 and 13.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> This packet updates SOA records of the domains with ID 5 and ID 7 and the server template SOA record. <packet version="1. <packet version="1.4.

It is used to return the error message if the set operation fails. Data type: string.xsd). The domain_alias_id node is optional. Allowed values: ok | error. The status node is required. Data type: integer. It is used to return the error code when the set operation fails. . The errtext node is optional. It specifies the execution status of the set operation. Data type: resultType (common. The domain_id node is optional. It is required in case when an error (if it occurred) was not of a system type. It is required if the domain alias ID was set as a filtering rule in the request packet. Data type: string. The errcode node is optional.320 Supported Operations Response Packet Structure The set node of the output XML packet is structured as follows:       The result node is optional. Data type: integer. Data type: unsignedInt. It is required if the domain ID was set as a filtering rule in the request packet.

<packet version="1.2.4.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.0"> <dns> <set> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <domain_id>12</domain_id> </result> </set> </dns> </packet> .Supported Operations 321 Response Samples Updating a single SOA record This request packet updates a SOA record of the domain with ID 12.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.2.2. the negative response looks as follows: <packet version="1.4.4.

4.4.</errtext> <domain_id>13</domain_id> </result> </set> </dns> </packet> .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.322 Supported Operations Updating multiple SOA records This request packet updates SOA records of the domains with ID 12 and ID 13. the response packet looks as follows: <packet version="1.2.2. <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. and the domain with ID 12 was updated.

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

and zone status of the domain with ID 1. if either filter or soa node is omitted. zone status of a domain or alias Filter omitted zone status.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> <soa/> </get> </dns> </packet> .324 Supported Operations The following table shows the response parameters. Add as many get operations as the number of different filtering rules. <packet version="1. <packet version="1.2. <get> … </get> </dns> Request Samples This packet retrieves a zone type and zone status of the domain with ID 1.4. SOA record of the server template SOA omitted zone type..2. zone status of a domain or domain alias You can retrieve the parameters of multiple domains or domain aliases in a single packet.. SOA present Filter present SOA record. <dns> <get> … </get> . zone type. zone type.4.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> </get> </dns> </packet> This packet retrieves the SOA record.

<packet version="1.4.2.4.2.0"> <dns> <get> <soa/> </get> </dns> </packet> 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.Supported Operations 325 This packet retrieves the SOA record of the server template and the status of the DNS server.0"> <dns> <get> <soa/> </get> <get> <filter> <domain_id>1</domain_id> </filter> </get> </dns> </packet> .

It is used to return the error message if the set operation fails. It is used to return the error code when the get operation fails. The zone_status is optional. Specifies the type of the DNS name server. The domain_id node is optional. It is required if the get operation succeeds. Allowed values: ok | error. Data type: string. Data type: unsignedInt.xsd). The domain_alias_id node is optional. Data type: integer. Data type: string. The status node is required. The zone_type is optional. It wraps the response from the server. Allowed values: enabled | disabled. It is required if the domain ID was set as a filtering rule in the request packet. Data type: resultType (common. Allowed values: master | slave. It is required if the filter node was specified in the request packet. The errtext node is optional. It is required if the soa node was specified in the request packet.326 Supported Operations Response Packet Structure The set node of the output XML packet is structured as follows:         The result node is required. Data type: string. Data type: SOAType (plesk_dns. The soa node is optional. Data type: integer. Data type: string.xsd). The errcode node is optional. It is required if the domain alias ID was set as a filtering rule in the request packet.  . Specifies the status of the local DNS name server. It specifies the execution status of the get operation.

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. zone type.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.4.0"> <dns> <get> <filter> <domain_id>1</domain_id> </filter> <soa/> </get></dns></packet> . <packet version="1.4. and zone status of the domain with ID 1.4.4.2.2.2.Supported Operations 327 Response Samples This request packet retrieves the zone type and zone status of the domain with ID 1.0"> <dns> <get> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <domain_id>1</domain_id> </result> </get> </dns> This request packet retrieves the SOA record.2. <packet version="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> .328 Supported Operations A possible response from the server can look as follows: <packet version="1.2. <packet version="1. and zone status of the domain with ID 2 and domain alias with ID 1.4.4.2.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.

.......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> Managing Name Servers Name servers are defined by domain or domain alias ID................................................................................................................... In this section: Switching Name Server Mode ........................................ 330 Adding Primary Name Server .............................. Secondary name servers are used when you turn the primary name server to slave mode....................... They can be primary or secondary for the zone they manage................4......Supported Operations 329 The positive response from the server looks as follows: <packet version="1..........2... 334 Retrieving Primary Name Servers ....................... 340 Deleting Primary Name Servers .................... 345 ......

......................330 Supported Operations Switching Name Server Mode To switch a name server between master and slave mode.................1. 333 Request Packet Structure A request XML packet changing name server mode includes the switch operation node: <packet version="1...............................0. refer to the Filtering Issues (see page 280) section.....................  ....... Specifies the zone parameters................ You can switch multiple name servers in a single packet.... The zone_type node is required.2..............0"> <dns> <switch> … </switch> </dns> </packet> The graphical representation of the switch node is as follows:  The filter node is required..... To retrieve the zone type.0................ 332 Response Samples ...... It specifies the filtering rule..................... refer to the Retrieving Parameters of SOA Record and Zone (see page 323) section.........xsd)....... For more information.........4..... use the switch operation.................. 330 Request Samples ...... Data type: string... Allowed values: master | slave............. Note: The switch operation is supported starting with API RPC protocol v............... In this section: Request Packet Structure............................. Data type: simpleFilterType (dns_input.....................................4............................. 331 Response Packet Structure ......

Add as many switch operations as the number of different filtering rules.4.2.2. <switch> … </switch> </dns> 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.. <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.0"> <dns> <switch> <filter> <domain_id>1</domain_id> <domain_id>2</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> .Supported Operations 331 You can change mode of multiple name servers in a single packet. you use to change the mode of name servers you need.4. <dns> <switch> … </switch> . <packet version="1.

Data type: unsignedInt The errtext node is optional.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> Response Packet Structure The switch node of the output XML packet is structured as follows:     The result node is required. The errcode node is optional. . Allowed values: ok | error. It is used to return the error message if the switch operation fails.332 Supported Operations 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. Data type: string.2. It specifies the execution status of the get operation.xsd). Data type: string. The status node is required. It is used to return the error code when the switch operation fails. Data type: resultType (common. It wraps the response from the server.4.

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> .4. The domain_alias_id node is optional. It is required if the domain alias ID was set as a filtering rule in the request packet. Data type: integer.0"> <dns> <switch> <filter> <domain_id>1</domain_id> </filter> <zone_type>slave</zone_type> </switch> </dns> </packet> The positive response from the server looks as follows: <packet version="1. Data type: integer.2.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.Supported Operations 333   The domain_id node is optional. 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. <packet version="1.2.2. It is required if the domain ID was set as a filtering rule in the request packet.4.4.

4.2.2. <packet version="1.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.4.334 Supported Operations 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.0"> <dns> <switch> <result> <status>ok</status> <domain_id>1</domain_id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist</errtext> <domain_id>2</domain_id> </result> </switch> </dns> </packet> .

........................................ 336 Response Packet Structure ........ Specifies the IP address of a primary name server...... Data type: integer.. You can add multiple primary servers in a single packet.....0.... Data type: integer.............. which zone will be served by the primary name server...... Specifies the ID of the domain.................. The ip_address node is required....................................... Note: The add_master_server operation is supported starting with API RPC protocol v................2...........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.. This server will be primary for the zone specified by the domain ID or domain alias ID... The domain_alias_id node is required..............1......4........... which zone will be served by the primary name server..................................4........... Specifies the ID of the domain alias.... 337 Response Samples .......................Supported Operations 335 Adding Primary Name Server Use the add_master_server operation to add a primary name server....... 335 Request Samples .................... In this section: Request Packet Structure.............. .....0...................... Data type: integer............... 338 Request Packet Structure A request XML packet adding a primary name server includes the add_master_server operation node: <packet version="1.........

336 Supported Operations You can add multiple primary name servers in a single packet. <packet version="1.6. <add_master_server> … </add_master_server> </dns> Request Samples Adding a single primary name server This packet adds a primary name server to the zone of the domain with ID 5..45.4.18</ip_address> </add_master_server> <add_master_server> <domain_id>7</domain_id> <ip_address>10.45.18</ip_address> </add_master_server> </dns> </packet> .6. <packet version="1.2.45.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10. <dns> <add_master_server> … </add_master_server> ..4. Add as many add_master_server operations as the number of different servers you want to add.2.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.6.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10.

xsd). It is required if the operation add_master_server has succeeded. The id node is optional. Data type: string. Data type: resultType (common. Data type: integer. It is used to return the error message if the add_master_server operation fails. The errtext node is optional. It specifies the execution status of the add_master_server operation. The status node is required. Data type: string. It is used to return the error code when the add_master_server operation fails. The errcode node is optional.Supported Operations 337 Response Packet Structure The add_master_server node of the output XML packet is structured as follows:      The result node is required. Returns the ID of the primary name server in Plesk database. Data type: unsignedInt. Allowed values: ok | error. . It wraps the response from the server.

4.338 Supported Operations 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.4.2.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> . <packet version="1.6.18</ip_address> </add_master_server> </dns> </packet> A positive response from the server can look as follows: <packet version="1.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.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10.2.2.45.4. the response looks as follows: <packet version="1.

0"> <dns> <add_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.2.4.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> .18</ip_address> </add_master_server> <add_master_server> <domain_id>7</domain_id> <ip_address>10.4.45.4.6. <packet version="1.</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.0"> <dns> <add_master_server> <domain_id>5</domain_id> <ip_address>10.45.2.2.6.18</ip_address> </add_master_server> </dns> </packet> A possible response from the server can look as follows: <packet version="1.Supported Operations 339 If the domain specified by the ID was not found on the server. the response looks as follows: <packet version="1.

..............0...1............................. <dns> <get_master_server> … </get_master_server> ............ Note: The get_master_server operation is supported starting with API RPC protocol v...... 343 Request Packet Structure A request XML packet retrieving a primary name server includes the get_master_server operation node: <packet version="1.............. 342 Response Samples ............... <get_master_server> … </get_master_server></dns> ............ In this section: Request Packet Structure........2........ the operation will retrieve all primary name servers available for a packet sender on the server..........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............................0............... refer to the Filtering Issues (see page 281) section......................................................4................ 340 Request Samples ...... It specifies the filtering rule..................................4.... Note: If the filter node is left blank (<filter/>).................... Add as many get_master_server operations as the number of different filtering rules you use... 341 Response Packet Structure ... Data type: dnsSelectionFilterType (dns_input.................xsd)..... You can retrieve multiple primary servers in a single packet.340 Supported Operations Retrieving Primary Name Servers Use the get_master_server operation to retrieve IP addresses of the primary name servers for the specified zone. For more information............................ You can retrieve multiple primary name servers in a single packet....

2..2.4.4.4.2. <packet version="1.0"> <dns> <get_master_server> <filter><id>5</id></filter> </get_master_server> </dns> </packet> Retrieving multiple name servers This packet retrieves primary name servers for the zones specified by domain ID 5 and ID 6. <packet version="1.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> .Supported Operations 341 Request Samples Retrieving a single name server This packet retrieves the IP address of the primary name server with ID 5. <packet version="1.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. Data type: integer. Returns the ID of the primary name server in Plesk database. The errcode node is optional. . <packet version="1.xsd). Allowed values: ok | error.2. It is used to return the error code when the get_master_server operation fails. The id node is optional. The status node is required. Data type: unsignedInt The errtext node is optional. It is required if the operation get_master_server has succeeded. It specifies the execution status of the get_master_server operation. It wraps the response from the server.342 Supported Operations This packet retrieves all primary name servers on the server available for a packet sender.4. Data type: resultFilterType (common.0"> <dns> <get_master_server> <filter/> </get_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. Data type: string. It is used to return the error message if the get_master_server operation fails.

Supported Operations 343     The filter-id node is optional.2.17.4. which zone will be served by the primary name server. For info on filters. refer to the Filtering Issues (see page 278) section.18</ip_address> </result> </get_master_server> </dns> </packet> If the name server 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. Data type: integer.4. It holds the filtering rule parameter. Data type: integer. <packet version="1.16. ID : 5</errtext> </result> </get_master_server> </dns> </packet> . Specifies the IP address of a primary name server.2. The ip_address node is required. Response Samples Retrieving a single name server This packet retrieves the IP address of the primary name server with ID 5. Specifies the ID of the domain. which zone will be served by the primary name server.0"> <dns> <get_master_server> <result> <status>error</status> <errcode>1013</errcode> <errtext>Master server is not found. the response can look as follows: <packet version="1. Specifies the ID of the domain alias.2.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. The domain_alias_id node is required. Data type: integer. The domain_id node is required.4. Data type: integer.

and domain alias ID 16.4.4.0"> <dns> <get_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.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.2. the response can look as follows: <packet version="1.17.344 Supported Operations If the domain specified by the ID was not found.16.</errtext> </result> </get_master_server> </dns> </packet> Retrieving multiple name servers This packet retrieves primary name servers for the zones specified by domain ID 5 and ID 6.17.18</ip_address> </result> <result> <status>ok</status> <filter-id>5</filter-id> <id>16</id> <domain_id>5</domain_id> <ip_address>11.2. The domain alias with ID 16 was not found on the server.18</ip_address> </result> <result> . one on the domain with ID 6 are found. A possible response from the server can look as follows: <packet version="1. <packet version="1.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.2.4.16.

............................6.................18</ip_address> </result> </get_master_server> <get_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain alias does not exist...................................17......................</errtext> </result> </get_master_server> </dns> </packet> 345 Deleting Primary Name Servers Use the del_master_server operation to delete primary name servers from the specified zone.....0...................................................2........4...... 347 Response Samples ..... 348 Request Packet Structure A request XML packet deleting a primary name server includes the del_master_server operation node: <packet version="1.....................1....................... You can delete multiple primary servers in a single packet..........................................4..... In this section: Request Packet Structure..0...........................0"> <dns> <del_master_server> … </del_master_server> </dns> </packet> ....... Note: The del_master_server operation is supported starting with API RPC protocol v..............Supported Operations <status>ok</status> <filter-id>6</filter-id> <id>28</id> <domain_id>6</domain_id> <ip_address>10........... 345 Request Samples ......................... 346 Response Packet Structure .......

It specifies the filtering rule. <dns> <del_master_server> … </del_master_server> . refer to the Filtering Issues (see page 281) section. Note: If the filter node is left blank (<filter/>). Data type: dnsSelectionFilterType (dns_input. You can delete multiple primary name servers in a single packet.. For more information. <packet version="1. the operation removes all primary name servers available for a packet sender on the server.xsd).4.0"> <dns> <del_master_server> <filter><id>5</id></filter> </del_master_server> </dns> </packet> Deleting multiple name servers This packet removes primary name servers for the zones specified by domain ID 5 and ID 6..346 Supported Operations The graphical representation of the del_master_server node is as follows:  The filter node is required.2. <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. Add as many del_master_server operations as the number of different filtering rules you use.4.0"> <dns> <del_master_server> <filter> <domain_id>5</domain_id> <domain_id>5</domain_id> </filter> </del_master_server> </dns> </packet> .2. <packet version="1.

Allowed values: ok | error. Data type: integer. It is required if the operation del_master_server has succeeded. Data type: string.Supported Operations 347 This packet removes all primary name servers available for a packet sender from Plesk database. It is used to return the error code when the del_master_server operation fails.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 message if the del_master_server operation fails. It wraps the response from the server. . <packet version="1.2. The errcode node is optional. The status node is required.xsd). The id node is optional. It specifies the execution status of the del_master_server operation. Data type: unsignedInt The errtext node is optional.4. Returns the ID of the primary name server in Plesk database. Data type: string. Data type: resultType (common.

4. ID : 5</errtext> </result> </del_master_server> </dns> </packet> If the domain specified by the ID was not found. <packet version="1.2.0"> <dns> <del_master_server> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.0"> <dns> <del_master_server> <result> <status>error</status> <errcode>1013</errcode> <errtext>Master server is not found. the response can look as follows: <packet version="1.2.</errtext> </result> </del_master_server> </dns> </packet> . the response can look as follows: <packet version="1.4.4.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.348 Supported Operations Response Samples Removing a single name server This packet removes the primary name server specified by ID 5.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.2.4.2.

4. <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.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.4.2. and primary server with ID 25. ID : 25</errtext> </result> </del_master_server> </dns> </packet> . 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.2.Supported Operations 349 Removing multiple name servers This packet deletes primary name servers for the zones specified by domain ID 5 and ID 6.

.... 350 Disabling Local DNS ................. the zone is served by a remote DNS server. To learn how to retrieve the status information for the local DNS server.......................................... you can also enable or disable the local DNS support for the DNS zone template............... In this section: Request Packet Structure........... Note: The enable operation is supported starting with API RPC protocol v............. In this section: Enabling Local DNS ................................. All the domains or domain alias zones.............. When the local DNS server is disabled. refer to the Managing SOA Records and Zone Parameters (see page 323) section................................................................................... 365 Enabling Local DNS The enable operation is used to enable local DNS support for the current zone...................... will be supported by local DNS....................................................................................... You can enable the local DNS support for multiple zones in a single packet.... which were added according to the template with the enabled status......................................1.............. 352 Response Packet Structure ..............0................................ With the operation.................................................................. 353 Response Samples ............ 359 Disabling Remote DNS Support ........................ 351 Request Samples .........350 Supported Operations Managing Local or Remote DNS Servers All zones on the server can be served by local or remote DNS servers.................... 355 Enabling Remote DNS Support ..........0.................................................................................................. 362 Retrieving Remote DNS Status ..........................4............................. 354 ......................

4. It specifies the filtering rule. Data type: dnsSelectionFilterType (dns_input. If the filter node is omitted.0"> <dns> <enable> … </enable> </dns> </packet> The graphical representation of the enable node is as follows:  The filter node is optional.. For more information.xsd). <dns> <enable> … </enable> . You can enable the local DNS support for multiple zones. Add as many enable operations as the number of different filtering rules.Supported Operations 351 Request Packet Structure A request XML packet switching on the local DNS support includes the enable operation node: <packet version="1.2.. refer to the Filtering Issues (see page 281) section. the DNS zone template will change status to "enable". <enable> … </enable> </dns> .

4.2. <packet version="1.2.0"> <dns> <enable> <filter> <domain_id>8</domain_id> </filter> </enable> </dns> </packet> This packet enables the local DNS for the DNS zone template .4.2. <packet version="1.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.0"> <dns> <enable/> </dns> </packet> .352 Supported Operations Request Samples This packet enables the local DNS for the zones specified by domain ID 8 and ID 9. <packet version="1.

It is used to return the error message if the enable operation fails. The domain_alias_id node is optional. Data type: integer. The errcode node is optional. It specifies the execution status of the enable operation. Data type: string. Specifies the ID of the domain alias. Data type: string. Specifies the ID of the domain.  . which zone will use local DNS.Supported Operations 353 Response Packet Structure The enable node of the output XML packet is structured as follows:      The result node is required. which zone will use local DNS. It is required if the domain ID was set as a filtering rule in the response packet. It is required if the domain ID was set as a filtering rule in the response packet. Allowed values: ok | error. It wraps the response from the server. The domain_id node is optional. The status node is required. Data type: unsignedInt. Data type: integer.xsd). Data type: resultOpType (dns_output. The errtext node is optional. It is used to return the error code when the enable operation fails.

4. the response is as follows: <packet version="1.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. <packet version="1.2.0"> <dns> <enable> <result> <status>ok</status> <domain_id>8</domain_id> </result> <result> <status>error</status> <errcode>1015</errcode> <errtext>Domain does not exist.2.4.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.4.354 Supported Operations Response Samples This request packet enables the local DNS for the zones specified by domain ID 8 and ID 9.2.</errtext> </result> </enable> </dns> </packet> .

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

.2..0"> <dns> <disable/> </dns> </packet> .356 Supported Operations You can disable the local DNS support for multiple zones. <packet version="1.2.4. Add as many disable operations as the number of different filtering rules. <packet version="1.4. <dns> <disable> … </disable> . <disable> … </disable> </dns> Request Samples This packet disables the local DNS for the zones specified by domain ID 8 and ID 9.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 .

Supported Operations 357 Response Packet Structure The disable 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 disable operation fails. The errtext node is optional. It specifies the execution status of the disable operation. Specifies the ID of the domain. which zone will use local DNS. It is used to return the error code when the disable operation fails.      . Data type: resultOpType (dns_output. Data type: integer. Data type: integer. It is required if the domain ID was set as a filtering rule in the response packet.xsd). Data type: unsignedInt. Allowed values: ok | error. Specifies the ID of the domain alias. Data type: string. which zone will use local DNS. It is required if the domain ID was set as a filtering rule in the response packet. The domain_alias_id node is optional. Data type: string. The errcode node is optional. The status node is required. The domain_id node is optional. It wraps the response from the server.

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.358 Supported Operations Response Samples This request packet disables the local DNS for the zones specified by domain ID 8 and ID 9.4.</errtext> </result> </disable> </dns> </packet> .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. <packet version="1.2.4. the response is as follows: <packet version="1.2.2.4.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.

......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...................2... Note: The enable-remote-dns operation is supported starting with API RPC protocol v......................4........2.....................................1... 360 Response Samples .........1 and next versions. and you can use remote DNS servers.... that enables use of remote DNS servers....4......2. includes the enableremote-dns operation node: <packet version="1...0"> <dns> <enable-remote-dns/> </dns> </packet> In this section: Response Packet Structure ....... A request XML packet.....Supported Operations 359 Enabling Remote DNS Support The enable-remote-dns operation is used to disable the local DNS server...... <packet version="1...4..... 361 .............0............ This node is available only in Plesk for Windows 8............

Allowed values: ok | error. Data type: unsignedInt. It specifies the execution status of the enable-remote-dns operation. The errcode node is optional.xsd).    . The status node is required. It is used to return the error message if the enableremote-dns operation fails. Data type: string. It wraps the information got from the server. The errtext node is optional. It is used to return the error code when the enableremote-dns operation fails.360 Supported Operations Response Packet Structure The enable-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output. Data type: resultType (common.xsd) and is structured as follows:  The result node is required. Data type: string.

4. <packet version="1.2.4.4.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> . the response is as follows: <packet version="1.0"> <dns> <enable-remote-dns/> </dns> </packet> The positive response from the server looks as follows: <packet version="1.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.Supported Operations 361 Response Samples This request packet enables use of remote DNS servers.2.2.

....................... that disables use of remote DNS servers............4...................2................2..0.... <packet version="1............ A request XML packet.... and you can use the local DNS server..............2.......1 and next versions..............1.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... Note: The disable-remote-dns operation is supported starting with API RPC protocol v..4..362 Supported Operations Disabling Remote DNS Support The disable-remote-dns operation is used to disable remote DNS servers....4......... 364 ......... 363 Response Samples ....0"> <dns> <disable-remote-dns/> </dns> </packet> In this section: Response Packet Structure ........ includes the disableremote-dns operation node: <packet version="1.................. This node is available only in Plesk for Windows 8..

Allowed values: ok | error. It is used to return the error message if the enableremote-dns operation fails.    . The errtext node is optional. The errcode node is optional. It wraps the information got from the server. Data type: resultType (common.xsd) and is structured as follows:  The result node is required. It specifies the execution status of the enable-remote-dns operation.xsd). Data type: string.Supported Operations 363 Response Packet Structure The disable-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output. Data type: string. Data type: unsignedInt. It is used to return the error code when the enableremote-dns operation fails. The status node is required.

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.0"> <dns> <disable-remote-dns/> </dns> </packet> The positive response from the server looks as follows: <packet version="1.4.364 Supported Operations Response Samples This request packet disables use of remote DNS servers.4.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> . the response is as follows: <packet version="1.4.2. <packet version="1.2.2.

0.......................... If remote DNS servers are disabled. Note: The get-status-remote-dns operation is supported starting with API RPC protocol v...................4.......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................ 367 .1 and next versions...... This node is available only in Plesk for Windows 8.....2....... Use the get-status-remote-dns to retrieve the status of remote DNS servers... that retrieves the status of remote DNS servers.2.......0"> <dns> <get-status-remote-dns/> </dns> </packet> In this section: Response Packet Structure ......Supported Operations 365 Retrieving Remote DNS Status Remote DNS servers are enabled or disabled..............4.... all zones are served by the local DNS server.2....4...... includes the get-status-remote-dns operation node: <packet version="1................ <packet version="1........... 366 Response Samples ................. A request XML packet........

Data type: string. The errtext node is optional.366 Supported Operations Response Packet Structure The get-status-remote-dns node is presented by type DNSEnableRemoteDNS (dns_output. Data type: boolean. It specifies the execution status of the get-status-remotedns operation. It is used to return the error code when the get-statusremote-dns operation fails. It wraps the information got from the server. Data type: unsignedInt. Data type: resultType (common. The dns-status node is optional. Data type: string. It is used to return the error message if the get-statusremote-dns operation fails. It is required if the operation get-status-remote-dns succeeds. The errcode node is optional.xsd).     .xsd) and is structured as follows:  The result node is required. The status node is required. Allowed values: ok | error.

<packet version="1.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> .4. </result> </get-status-remote-dns> </dns> </packet> If the packet is sent to Plesk for Unix server. the response is as follows: <packet version="1.0"> <dns> <get-status-remote-dns> </dns> </packet> The positive response from the server looks as follows: <packet version="1.Supported Operations 367 Response Samples This request packet retrieves the status of remote DNS servers.2.2.0"> <dns> <get-status-remote-dns <result> <status>ok</status> <dns_status>true</dns_status&gt.4.4.

.................. on.......... The recursion is allowed for all requests................................. The recursion is allowed for requests from local net......368 Supported Operations Managing DNS Recursion When a DNS server receives a recursive request from a client that it is willing to perform recursion for............. etc................ The recursion is not allowed................................. 369 Response Packet Structure ..... 374 Setting Recursion Type The type of recursion can be changed by the set-recursion operation............... it will go through the process of resolving the requested domain name by first asking the root servers...........................................................................................................2............ 369 Request Samples .......... localnets... The recursion is allowed for requests from local machine......... In this section: Setting Recursion Type ..................................... then asking one of those servers...... Before setting the recursion type...............4............. which respond with a referral to the top level DNS servers.. use the get-supported-recursion to make sure it is supported by the server........ 371 ..1......... Note: Not all of the following types can be supported by the server.. which respond with a referral to the next level DNS servers........ 368 Retrieving Recursion Type ............................................... 370 Response Samples .............. In this section: Request Packet Structure............... Note: The set-recursion operation is supported starting with API RPC protocol v..................... When a DNS server receives a non-recursive request or a request from a client that it is not willing to perform recursion for.. Four types of recursive requests to the local DNS sever in Plesk are available:     off.. it typically responds immediately with whatever local data it has available at the time without doing any additional processing........................ 372 Retrieving Supported Recursion Types ......... localhost..0...................................... make sure it is supported by the server.............................. Before setting the recursion type....

0"> <dns> <set-recursion> <value>localnets</value> </set-recursion> </dns> </packet> . <packet version="1.4.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. <packet version="1. Data type: DNSRecursionValueType (plesk_dns.2. Specifies the type of recursion. Allowed values: on | off | local | localnets.xsd) and structured as follows:  The value node is required.2.xsd). Request Samples This packet allows all recursive requests to the local DNS server.0"> <dns> <set-recursion> … </set-recursion> </dns> </packet> The set-recursion node is presented by type DNSSetRecursionInputType (dns_input.Supported Operations 369 Request Packet Structure A request XML packet changing the recursion type includes the set-recursion operation node: <packet version="1.2.4.4.

370 Supported Operations Response Packet Structure The set-recursion node is presented by type DNSSetRecursionOutputType (dns_output. It is used to return the error code when the setrecursion operation fails.    . Data type: unsignedInt. The errtext node is optional. Data type: resultType (common. Allowed values: ok | error. The errcode node is optional. It specifies the execution status of the set-recursion operation. It wraps the information got from the server.xsd). Data type: string. It is used to return the error message if the set-recursion operation fails.xsd) and is structured as follows:  The result node is required. The status node is required. Data type: string.

the response is as follows: <packet version="1.2.0"> <dns> <set-recursion> <value>on</value> </set-recursion> </dns> </packet> If the recursion type is supported by the server. the response is as follows: <packet version="1. <packet version="1.Supported Operations 371 Response Samples This request packet allows all recursive requests to the local DNS server.0"> <dns> <set-recursion> <result> <status>error</status> <errcode>4605</errcode> <errtext>Not supported type for DNS recursion</errtext> </result> </set-recursion> </dns> </packet> .4.4.4.2.0"> <dns> <set-recursion> <result> <status>ok</status> </result> </set-recursion> </dns> </packet> If the recursion type is not supported by the server.2.

.. includes the get-recursion operation node: <packet version="1........4........ 374 ....... <packet version="1....... 373 Response Samples ............0"> <dns> <get-recursion/> </dns> </packet> In this section: Response Packet Structure ..0........... that retrieves a type of recursion..................2..................1................4..................2....... Request packet sample This request packet retrieves the recursion type.................4......2....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............372 Supported Operations Retrieving Recursion Type A request XML packet............

xsd) and is structured as follows:  The result node is required. Allowed values: ok | error. The status node is required. Data type: string. The errtext node is optional. It specifies the execution status of the get-recursion operation. The errcode node is optional. It is used to return the error message if the get-recursion operation fails. Data type: unsignedInt. Data type: string.xsd).Supported Operations 373 Response Packet Structure The get-recursion node is presented by type DNSGetRecursionOutputType (dns_output. The value node is optional. It is used to return a type of recursion if the get-recursion operation succeeds. It is used to return the error code when the getrecursion operation fails.     . Data type: resultType (common. Data type: string. It wraps the information got from the server.

includes the getsupported-recursion operation node: <packet version="1.4.374 Supported Operations Response Samples This request packet retrieves the recursion type.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.2. please refer to the Managing DNS recursion (see page 368) section. that retrieves the supported types of recursion.1. <packet version="1.4.2. A request XML packet.4.4.2.0"> <dns> <get-recursion/> </dns> </packet> A response from the server can look as follows: <packet version="1. supported by the local DNS server. For more information on types of requests. .0.2.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.

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

0"> <dns> <get-supported-recursion/> </dns> </packet> A response from the server can look as follows: <packet version="1.4.2.376 Supported Operations Response Samples This request packet retrieves the types of recursive requests supported by the server.0"> <dns> <get-supported-recursion> <result> <status>ok</status> <value>on</value> <value>localnets</value> <value>local</value> </result> </get-supported-recursion> </dns> </packet> .4.2. <packet version="1.

Managing domain accounts includes creating. settings various domain/ Domain Administrator settings. or Plesk clients). etc. A domain account holds the information about the domain administrator and various domain settings (hosting settings.0). Plesk resellers can create domains for their Plesk clients and transfer domain accounts from one of their Plesk clients to another. plesk_domain. These settings specify various resources at the domain‘s disposal.0. limits on use of Plesk resources. Plesk Administrator can create domains for any Plesk client or reseller. besides. and the capabilities of Domain Administrator as well. performance settings. Plesk resellers. if the corresponding reseller permission is set. and.6. Domain accounts can be created by Plesk users who are allowed to manage domains (Plesk Administrator. refer to the Domain Settings (on page 383) section. Plesk client Description Adding a new domain in Plesk is equivalent to creating a domain account.). Plesk reseller (since protocol version 1. All these users can create domains for themselves. Settings Domain accounts are used to store a collection of domain settings.xsd. .xsd.xsd Plesk version: all versions API RPC version: all versions Plesk user: Plesk Administrator. domain_output. deleting. 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 For details.Supported Operations 377 Managing Domain Accounts Operator: <domain> XML Schema: domain_input.

0.0.5. preferences.378 Supported Operations Supported operations           ADD (see page 422) creates a domain account and sets general information.5.0.5. limits. hosting settings.0) .0) GET-PHYSICAL-HOSTING-DESCRIPTOR (on page 482) retrieves descriptor of hosting settings (supported since protocol version 1.0) GET-PERMISSION-DESCRIPTOR (on page 478) retrieves descriptor of permissions (supported since protocol version 1. and domain administrator settings GET (see page 429) retrieves information on domains from Plesk database SET (see page 444) updates domain settings in Plesk database DEL (see page 440) removes domains from Plesk database CFORM_BUTTONS_LIST (see page 452) retrieves list of buttons displayed on the home page of a domain administrator GET_TRAFFIC (see page 459) retrieves information on traffic spent by the domain(s) between two dates SET_TRAFFIC (see page 468) sets information on traffic spent by the specified domain(s) GET-LIMIT-DESCRIPTOR (on page 472) retrieves descriptor of limits (supported since protocol version 1.

......................................................... Parameters nested in the filter node are called filtering rule.................................................................................... 429 Deleting Domain Accounts ........................................... 468 Retrieving Descriptor of Limits .................................... 478 Retrieving Descriptor of Hosting Settings ....................................................... 379 Domain Settings .....................................................................xsd)......... 459 Setting Domain Traffic Settings .......................... 452 Getting Traffic Usage Information ...................................................................................................................................................................................... 472 Retrieving Descriptor of Permissions ...................................... 422 Getting Information About Domain Accounts ................................................... 383 Creating Domain Account.................................................................. The filter node is presented by the DomainFilterType complex type (domain_input............Supported Operations 379 In this section: Filtering Issues ................. 440 Setting Domain Parameters ........................................................... 482 Filtering Issues Filtering is the way a request XML packet indicates the object (one or several domains) to which an operation is to be applied............................................................................................. Its graphical representation is as follows: .. 444 Getting the Domain Buttons List ......

Plesk resellers and for Plesk clients. The guid node is optional.0.6. The domain_name node is optional. Supported since protocol version 1. Use owner-id node instead.6.6.6. Data type: integer.  Group filtering Nodes owner-id and owner-login serve to filter all domains of certain Plesk users at once. It is supported since protocol version 1. It specifies the login name of Plesk user who owns domains.0. This node is supported since protocol version 1.0. The owner-id node is optional.380 Supported Operations         The id node is optional.0. For details on GUIDs. It specifies the domain ID. Data type: string. It is not supported since protocol version 1.0.0”> <domain> <get> <filter> <id>124</id> <id>127</id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> . The client_id node is optional. Use owner-login node instead.0. This kind of filtering is allowed for Plesk Administrator and Plesk resellers. The domain-name node is optional. It specifies the domain name. ‗Individual‘ filtering is allowed for Plesk Administrator.0.0. It is supported since protocol version 1. It is not supported since protocol version 1. Two types of filtering are available:  Individual filtering Nodes id and domain-name serve to filter one to many domains individually.0. Data type: string.6. It is not supported since protocol version 1.0.6. Data type: integer. The owner-login node is optional. The client_login node is optional. Use domain-name node instead.6.0.0. It specifies the ID of a Plesk user that owns domains.0. Individual filtering The following packet requests hosting settings of domains specified by their id: <packet version=”1. Data type: string. It specifies the GUID of a domain account.0. refer to the API RPC Protocol > GUIDs Overview section of Plesk API RPC Developer's Guide.6.0.

0”> <domain> <get> <filter> <domain-name>example.com</domain-name> </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.0. use two different <get> sections: <packet version=”1.0”> <domain> <get> <filter> <domain-name>example.6.com</domain-name> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <id>126</id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> .Supported Operations 381 The following packet is identical except it specifies domains by their names: <packet version=”1.6.com</domain-name> <id>126</id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> To fix this issue.0.6.0”> <domain> <get> <filter> <domain-name>example.com</domain-name> <domain-name>sample.0.

0”> <domain> <del> <filter> <owner-id>1324</owner-id> </filter> </del> <del> <filter> <owner-login>RRoe</owner-login> </filter> </del></domain></packet> .0.6.382 Supported Operations Group filtering The following packet removes all domains owned by two Plesk users: <packet version=”1.6. use two different <del> sections: <packet version=”1.0”> <domain> <del> <filter> <owner-login>JDoe</owner-login> <owner-loginn>RRoe</owner-login> </filter> </del> </domain> </packet> The following packet is invalid as it uses both the owner-id node and the owner-login node within one filter: <packet version=”1.6.0.0”> <domain> <del> <filter> <owner-id>1324</owner-id> <owner-login>RRoe</owner-login> </filter> </del> </domain> </packet> To fix this packet.0”> <domain> <del> <filter> <owner-id>1324</owner-id> <owner-id>1325</owner-id> </filter> </del> </domain> </packet> The same packet removes domains of JDoe and RRoe Plesk users: <packet version=”1.6.0.0.

...0..................................... If sent by a Plesk client/reseller...... and retrieved from Plesk database as well... 397 Disk Space Usage Settings ..... These settings can be defined when creating a domain or later.................... 418 Domain Preferences.......0”> <domain> <del> <filter/> </del> </domain> </packet> Domain Settings This section describes a collection of domain and Domain Administrator settings.................... 421 .........6.................................................................... 391 Limits............................... 420 Performance Settings .......................................................................Supported Operations 383 The following packet sent by Plesk Administrator removes all domains available in Plesk..................................................... In this section: General Domain Account Information ................................................... 383 Domain Administrator Settings . it will delete all domains of this client/reseller: <packet version=”1..................... 415 Statistics Settings ...................................................................................................................................... Permissions and Hosting Settings .................

..   In this section: Node gen_setup ..... updated.... 390 .......xsd).. This is done using the gen_setup node of type SetGenSetupType (plesk_domain.........................xsd).............................................. See the structure of this node in the Node gen_setup (see page 385) section...... or retrieved.................................. General information about the specified domains can be retrieved from Plesk database (the get operation). defined within the add operation node).. See the structure of this node in the Node gen_info (see page 387) section...........  General domain information is always set when creating a domain account (the add operation)........ It is returned in the gen_info node of type domainGenInfoType (plesk_domain.....................384 Supported Operations General Domain Account Information General domain information can be added. General domain information can be updated/modified (the set operation).................... This is done using the gen_setup node (no data type.. See the structure of this node in the Node gen_setup (type SetGenSetupType) (see page 390) section............. 385 Node gen_info (type domainGenInfoType) ... 387 Node gen_setup (type setGenSetupType) ...........

disabled by Plesk reseller. 16 . It specifies the login name of the domain owner when the domain is created by Plesk Administrator or Plesk reseller. It specifies the domain name. Data type: string. . Note: If the information about owner is omitted.disabled by Plesk Administrator.0.0.6.0.0.0. Data type: ip_address (common. Meanings: 0 . Data type: integer. the node should not be specified. standard forwarding.6. If the domain account is created by Plesk client. you should also include the hosting node into the request packet. The owner-login node is optional. It specifies ID of the domain owner when the domain is created by Plesk Administrator or Plesk reseller. It specifies the IP address associated with the domain. or owner-admin node instead. It specifies the owner of the new domain account (Plesk client) when the domain is created by Plesk Administrator.6. The status node is optional.   The ip_address node is required. it is defined within the parent node and has the following structure:   The name node is required. Is not supported since protocol version 1. Data type: string. Allowed values: vrt_hst | std_fwd | frm_fwd | none.xsd). 32 .Supported Operations 385 Node gen_setup This node is used in the add request packets to set general properties for the newly created domain account. Data type: string.    The htype node is optional. The owner-id node is optional. This node does not have its own type. Note: If you specify this node. Use owner-id. the domain account belongs to the user who issued the request. owner-login. Data type: integer. 64 . frame forwarding.disabled by a client. It specifies one of the following hosting types: virtual hosting. Allowed values: 0 | 16 | 64.0. The client_id node is optional. Data type: string. It specifies the status of the created domain.active. Supported since protocol version 1. none. Supported since protocol version 1.

2.0.11</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.com</name> <htype>vrt_hst</htype> <ip_address>192.2.2.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> .0”> <domain> <add> <gen_setup> <name>example.386 Supported Operations The following packet creates a domain and sets all necessary general information for it: <packet version=”1.0.4.

It is defined by complex type domainGenInfoType (plesk_domain. Data type: objectStatus (plesk_common. It holds the creation date of the specified domain. The status node is required.0 and later versions This node is used in the get response packets. It holds the current status of the specified domain. The ascii-name node is required.Supported Operations 387 Node gen_info (type domainGenInfoType) Representation of gen_info in API RPC 1.4. 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.2. Data type: date.xsd). Data type: string.4. Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 32 (disabled by Plesk reseller) |64 (disabled by Plesk client) | 256 (expired).0.xsd) and holds a collection of common domain settings. Starting from API RPC 1. Format: YYYY-MM-DD. It holds the domain name displayed in Plesk GUI.2. The name node is required. It holds the domain name in ASCII format. Data type: string. .

com</ascii-name> <status>256</status> <real_size>54687742156789</real_size> <owner-id>111</owner-id> <dns_ip_address>196. Data type: ip_address (common.com</name> <ascii-name>www. Data type: string. Data type: integer.2.2.     The following packet with general domain information can be received from Plesk server if API RPC 1.example. The dns_ip_address node is optional. It contains the domain account GUID. Use owner-id node instead. It holds the domain IP address shown in the DNS record.2.2.0. For details on GUIDs. It holds the identifier of a Plesk client who owns this domain account. It specifies the type of hosting set on the domain. . Data type: unsignedLong. Is not supported since protocol version 1. The request packet filtered the domain by domain id.0.0. The htype node is required. Note that the earlier versions of API RPC protocol do not support this feature. and the id node returns the domain identifier. This node is supported in API RPC 1.6. refer to the GUIDs Overview section of the API RPC Developer's Guide. It holds the actual size of the domain (in bytes).6.388 Supported Operations   The real_size node is required.xsd).0”> <domain> <get> <result> <status>ok</status> <filter-id>1234</filter-id> <id>1234</id> <data> <gen_info> <cr_date>2000-12-12</cr_date> <name>www.0 is used: <packet version=”1. Supported since protocol version 1.0 and later: The response contains the filtering parameter (the filter-id node). It holds the ID of Plesk user who owns this domain account.0. Must be specified if the request is issued by Plesk Administrator or Resellers.example.0.5.0. The guid node is required. The owner-id node is optional.123</dns_ip_address> <htype>vrt_hst</htype> <guid>aasdgr342dsaddw3r32rsdfsdf3t</guid> </gen_info> </data> </result> </get> </domain> </packet> This packet is specific for protocol version 1.0 and later versions.4. Allowed values: vrt_hst | std_fwd | frm_fwd | none. The client_id node is required. Data type: integer.4. Data type: string.6. so the filter-id node of the response packet returns this filtering parameter.

Data type: objectStatus (plesk_common. It holds the actual size of the domain (in bytes). Data type: string.1. It holds the current status of the specified domain. It holds the creation date of the specified domain. It holds the identifier of Plesk client who owns this domain account. It holds the domain name displayed in Plesk GUI. Data type: string.Supported Operations 389 Representation of gen_info in API RPC 1. Allowed values: vrt_hst | std_fwd | frm_fwd | none.2 and earlier. The real_size node is required. It specifies the type of hosting set on the domain. Format: YYYY-MM-DD. The client_id node is required.2 and earlier versions In API RPC 1. Data type: date. Data type: string.4. Data type: integer.xsd). The display_name node is required. It holds the domain's IP address shown in the DNS record. The htype node is required. this node is structured as follows:     The cr_date node is required. Data type: unsignedLong.4.     .xsd). The name node is required. Data type: ip_address (common.1. The dns_ip_address node is optional. It holds the domain name. Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk client) | 256 (expired). The status node is required.

uk</name> <display_name>Error! Hyperlink reference not valid.123.co. It is used to modify the domain name.> <status>256</status> <real_size>54687742156789</real_size> <client_id>111</client_id> <dns_ip_address>123. Data type: objectStatus (plesk_common.  . Allowed values: 0 (active) | 16 (disabled by Plesk Administrator) | 32 (disabled by Plesk reseller) | 64 (disabled by Plesk client).1.123</dns_ip_address> <htype>vrt_hst</htype> </gen_info> </data> </result> </get> </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). The name node is optional. It is used to set the current status of the specified domain. It is defined by data type setGenSetupType (plesk_domain.390 Supported Operations The following packet with general domain information can be received from Plesk server: <packet version=”1.13. The gen_setup node is structured as follows:  The status node is optional.2”> <domain> <get> <result> <status>ok</status> <id>1234</id> <data> <gen_info> <cr_date>2000-12-12</cr_date> <name>alterzone. Data type: string.4.xsd).xsd).

121</ip_address> </gen_setup> </values> </set> </domain> </packet> . The owner-id node is optional. The ip_address node is optional. or Plesk client).0.xsd). the new GUID is assigned to the domain. refer to the GUIDs Overview section of the API RPC Developer's Guide.0.5.0. It is not supported since protocol version 1.0.Supported Operations 391   The client_id node is optional.6. The owner-login node is optional. Supported since protocol version 1.0.For details on GUIDs. It is used to modify the IP address associated with the domain. This packet can be sent by Plesk Administrator or Plesk reseller.    The following packet assigns all domains of one Plesk client (ID 1111) to another Plesk client (ID 1122).2.2. Data type: string.0 and later versions. Plesk reseller. Data type: ip_address (common.0”> <domain> <set> <filter> <owner-id>1111</owner-id> </filter> <values> <gen_setup> <status>0</status> <owner-id>1122</owner-id> <ip_address>192.0. Supported since protocol version 1. Data type: integer. Data type: boolean. If specified. <packet version=”1.6. It specifies the login name of the new domain owner (Plesk Administrator. or Plesk client).0. Plesk reseller. Use owner-id or owned-login node instead.0. The guid node is optional. This node is supported in API RPC 1.6. It specifies the ID of the new domain owner (Plesk Administrator.6.

........................................xsd)................392 Supported Operations Domain Administrator Settings Domain Administrator settings are defined by two data types. 394 Type domainUserSet The user node is used in the add and set request packets.......................................... This node is structured as follows (pareddown variant): ...................... 392 Type domainUserGet ....... It is specified by complex type domainUserSet (plesk_domain............   Type domainUserSet (see page 392) is used in the add and set request packets Type domainUserGet (see page 394) is used in the get response packets In this section: Type domainUserSet..........................................

xsd). Is required for US only. It specifies the postal address of a domain administrator. The perms node is optional.5. It specifies the domain administrator state. To view the structure of this node. The city node is optional. Permessions and Hosting Settings (see page 397) section. Is required for US only. It specifies the domain administrator city. The state node is optional. Data type: string (0 to 10 characters long). It specifies the phone number of a domain administrator. The country node is optional. The pname node is optional. The cname node is optional.2. It specifies the company of a domain administrator. The email node is optional. Data type: string (0 to 2 characters long). Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long).Supported Operations 393                The enabled node is optional. It specifies the email address of a domain administrator. The fax node is optional. Data type: string (0 to 255 characters long). It specifies the domain administrator name. The phone node is optional. Data type: string (0 to 255 characters long). Data type: string (0 to 255 characters long). It specifies the zip code of a domain administrator. It specifies the country code of a domain administrator. refer to the Limits. The password node is optional.0. Data type: string (0 to 255 characters long). Data type: domainPerms (plesk_domain. The pcode node is optional. The global-login and the uid nodes are deprecated since protocol version 1. The multiply_login node is optional. It specifies the domain account status. Data type: string (0 to 255 characters long). It specifies a collection of permissions set for the domain administrator. It specifies the domain administrator password. Data type: string (0 to 255 characters long). It indicates whether multiple logins with the same domain administrator credentials are allowed. Data type: Boolean. It specifies the fax number of a domain administrator. Data type: string (5 to 14 characters long). Data type: Boolean. . The address node is optional.

com</email> <address>Gray Lake Road.com</name> <owner-id>1234</owner-id> <ip_address>192.0.0. 12</address> <city>Totonto</city> <state/> <pcode/> <country>CA</country> <multiply_login>false</multiply_login> <permissions/> </user> </add> </domain> </packet> .6.0”> <domain> <add> <gen_setup> <name>example.394 Supported Operations The following sample packet creates a domain account and sets Domain Administrator information: <packet version=”1.123</ip_address> </gen_setup> <user> <enabled>false</enabled> <password>123456</password> <cname>Mega Company</cname> <pname>John Doe</pname> <phone>2121342526</phone> <fax>2121342527</fax> <email>JDoe@sample.2.

Data type: string (0 to 255 characters long). The fax node is optional. It is structured as follows:        The enabled node is optional.Supported Operations 395 Type domainUserGet The user node used in the get response packets is specified by complex type domainUserGet (plesk_domain. Data type: string (0 to 255 characters long). Data type: Boolean. It specifies the phone number of the domain administrator. The address node is optional. It specifies the postal address of the domain administrator. It specifies the name of the domain administrator.xsd). The cname 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 email node is optional. It specifies the company where the domain administrator works. The pname node is optional. It specifies the email address of the domain administrator. 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. It shows whether the domain account is enabled.

2.com</email> <address>Gray Lake Road. The global-login and the uid nodes are deprecated since protocol version 1. It specifies the zip code of the domain administrator. .396 Supported Operations       The city node is optional. The multiply_login node is optional. The state node is optional.2. The request packet filtered the domain by domain ID.5.0: the response contains the filtering parameter (the filter-id node). Is required for US only.4. Data type: string (0 to 2 characters long). Data type: string (0 to 10 characters long). Permissions and Hosting Settings (see page 397) section. so the filter-id node of the response packet returns this filtering parameter. It indicates whether multiple logins are allowed under the same domain administrator credentials. Note that the earlier versions of API RPC protocol do not support this feature. It specifies the country code of the domain administrator.0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <user> <enabled>true</enabled> <cname>Mega Company</cname> <pname>John Doe</pname> <phone>2121342526</phone> <fax>2121342527</fax> <email>JDoe@sample.4.  The following response packet demonstrates the domain administrator information returned from Plesk server: <packet version=”1. The country node is optional. Data type: string (0 to 255 characters long). Is required for US only. 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. and the id node returns the domain identifier. Data type: Boolean. The perms node is optional. Data type: domainPerms (plesk_domain.2. It specifies a collection of permissions set for the domain administrator. Data type: string (0 to 255 characters long). See the structure of this node in the Limits.0. The pcode node is optional.xsd). It specifies the state of the domain administrator. It specifies the city of the domain administrator.

..........6.........0 you can manage the settings using descriptors.5........ The node is supported since protocol version 1...........4.0 and Later Versions ...0..... 397 Permissions.......... 397 API RPC 1.... that are available in API RPC v.... It specifies the limits overusage policy for a specified domain......................5.............0................. and its graphical representation is as follows:  The overuse node is optional...................2.. Starting from API RPC 1.......................................... For details on descriptors...... .......... 400 API RPC 1................................ 398 Hosting Settings ..........1............ or to the API RPC Protocol Developer's Guide..........0.... In this section: API RPC 1. Allowed values: block | notify | normal............ In this section: Limits..............0 and Earlier Versions ............................0.......xsd)... refer to the Presentation of Object Descriptor (on page 47) section in API Reference......Supported Operations 397 Limits....... 399 Limits The limits node is presented by domainLimits type (plesk_domain...........0..5.............0 and Later Versions This section contains domain limits and domain administrator permissions' settings.............. Permissions and Hosting Settings This section contains limits and permissions settings for domain administrators...........0 and later..................5.............. Data type: string...................0..............................

Data type: any. It specifies a permission name. refer to the Retrieving Descriptor of Limits (on page 472) section. Data type: sting. The value node is required.   The name node is required. It specifies limit parameters. Data type: PleskLimitType (plesk_client. Data type: any. .398 Supported Operations  The limit node is optional. The value node is required. Note: You can specify multiple permission parameters in one perms node. For details. It specifies limit name.xsd). Data type: PleskPermissionType (plesk_common. containing names of limits.xsd). The following code example specifies the limits overusage policy and the mailbox quota limit: <limits> <overuse>block</overuse> <limit> <name>mbox_quota</name> <value>100</value> </limit> </limits> Note: To manage limits. It specifies parameters of a permission.   The name node is required. Note: You can specify multiple limit parameters within one limits node.xsd). Permissions The perms node is presented by the domainPerms complex type (plesk_domain. Data type: sting. It specifies limit value. and its graphical representation is as follows:  The permission node is required. you should first retrieve limits descriptor. It specifies a permission value.

5. Data type: ip_address (common.0. The graphical representation of the vrt_hst node (API RPC 1.0.4.xsd). Hosting Settings The hosting node in API RPC 1.. For details. For details on the hosting node. It specifies a hosting parameter name. It specifies a hosting parameter value. </permissions> Note: To manage preferences. refer to the Hosting Settings (see page 397) (API RPC 1. Note: You can specify multiple property parameters in one vrt_hst node. you should first retrieve permissions descriptor. Data type: any. The value node is required. Data type: sting. refer to the Retrieving Descriptor of Permissions (on page 478) section. It specifies the IP address of the domain.2.5.0) section.   The name node is required.2.  The ip_address node is required. .0 and later versions is the same as in API RPC 1. containing names of permissions..0 except for the vrt_hst node. It specifies a hosting parameter.xsd).Supported Operations 399 The following code represents permission to access shell: <permissions> <permission> <name>manage_sh_access</name> <value>100</value> </permission> . Data type: PleskPhysHostingPropertyType (plesk_domain.4.0) is as follows:  The property node is required.

...........................0 and Earlier Versions This section contains domain limits and domain administrators' permissions settings......2.......................0 and earlier.................... 407 ..............1...... 401 Permissions........................................ you should first retrieve a hosting settings descriptor. For details... </vrt_hst> Note: To manage hosting settings.............. refer to the Retrieving Descriptor of Hosting Settings (on page 482) section.................4................ 403 Hosting Settings ..............4.............................................. In this section: Limits.. containing names of the settings............ that are available in API RPC v.................2......... API RPC 1.....400 Supported Operations The following code represents FTP login parameter: <vrt_hst> <property> <name>ftp_login</name> <value>MyFTPlogin</value> </property> ......................................

The max_maillists node is optional. Specifies the maximum number of mailing lists on the domain. Data type: integer. It is structured as follows:   The max_webapps node is optional. Specifies the maximum number of web applications allowed on the domain. This node is specified by complex type domainLimits (plesk_domains.xsd). .Supported Operations 401 Limits Limits imposed on use of system resources are defined by the limits node. Data type: integer.

Specifies the maximum number of redirects on the domain. Data type: integer. Is used for Plesk for Windows only. Data type: integer. Data type: integer. The expiration node is optional. Sets the disk space limit (in bytes) on MySQL databases belonging to the domain. Data type: integer (a UNIX timestamp format). Restricts the maximum amount of disk space (in bytes) allotted for a single mailbox on the domain. The max_box node is optional. Limits the number of Microsoft SQL databases for the domain. Restricts the amount of disk space (in bytes) for the domain. Data type: integer. Specifies the maximum number of email boxes on the domain. Data type: integer. Specifies the maximum number of mail groups on the domain. Data type: integer. The mssql_dbase_space node is optional. The max_redir node is optional. The max_db node is optional. The max_mg node is optional.402 Supported Operations              The max_resp node is optional. Specifies the validity period for the domain account. Data type: integer. The mysql_dbase_space node is optional. Data type: integer. Data type: integer. The max_traffic node is optional. Is used for Plesk for Windows only. The max_mssql_db node is optional. Data type: integer. Specifies the maximum data traffic per month (in bytes) for the domain. The max_wu node is optional. Data type: integer. Data type: integer. Data type: integer. Sets the disk space limit (in bytes) on Microsoft SQL databases belonging to the domain. Is used for Plesk for Windows only. The disk_space node is optional. Data type: integer. The mbox_quota node is optional. It specifies the maximum number of MySQL databases for the domain. Data type: integer. The total_mboxes_quota node is optional. The max_shared_ssl_links node is optional. Restricts the maximum amount of disk space (in bytes) occupied by all mail boxes on the domain. Specifies the maximum number of subdomains that can be created on the domain. The max_dom_aliases node is optional. Data type: integer. Specifies the maximum number of aliases for the domain.     . Specifies the maximum number of web pages (web users) hosted on the domain. Specifies the maximum number of autoresponders (preset messages sent automatically) on the domain. The max_subdom node is optional. Specifies the maximum number of shared SSL links for the domain.

123</ip_address> </gen_setup> <limits> <disk_space>209715200</disk_space> <max_traffic>209715200</max_traffic> <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> Permissions The perms node is specified by complex type domainPerms (plesk_domain.0”> <domain> <add> <gen_setup> <name>newdomain.Supported Operations 403  The max_subftp_users node is optional.0 and later.2.   Note: The limits on Plesk resources set for the domain account are restricted by similar limits set for the ‗parent‘ client account. The max_fpse_users node is optional. 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.2. Specifies the maximum number of ODBC connections allowed on the domain.4. Is supported by API RPC 1.4.com</name> <client_id>1234</client_id> <ip_address>192. Specifies the maximum number of additional FTP accounts on the domain. Is used for Plesk for Windows only. Data type: integer. Data type: integer.0.xsd). Data type: integer.2. Specifies the maximum number of additional MS FrontPage accounts on the domain. It is structured as follows: . Is used for Plesk for Windows only. The max_odbc node is optional.

404 Supported Operations .

Data type: Boolean. It indicates whether the domain administrator can manage mailing lists on the domain.Supported Operations 405             The manage_phosting node is optional.0 for Unix and later. It indicates whether the domain administrator can manage the task scheduler on the domain. Data type: Boolean. The manage_anonftp node is optional. The manage_domain_aliases node is optional. Data type: Boolean. The manage_log node is optional. It indicates whether the domain administrator can manage anonymous FTP account settings on the domain. Data type: Boolean. Data type: Boolean. It indicates whether the domain administrator can use SiteBuilder. It indicates whether the domain administrator can manage Tomcat web applications installed 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_performance node is optional. It indicates whether the domain administrator can make dumps of the domain using backup/restore facilities of Plesk. It indicates whether the domain administrator can manage hosting performance on the domain. The manage_quota node is optional. The dashboard node is optional. The manage_ftp_password node is optional. Data type: Boolean. It indicates whether the domain administrator can manage logging on the domain. This feature is not supported on Plesk 8. It indicates whether the domain administrator can manage IIS application pool settings on the domain. It indicates whether the domain administrator can manage physical hosting parameters of the domain. It indicates whether the domain administrator can manage domain aliases. The manage_crontab node is optional. Data type: Boolean. Data type: Boolean. Data type: Boolean. Data type: Boolean. Data type: Boolean. The manage_sh_access node is optional. The manage_subdomains node is optional. It indicates whether the domain administrator can manage system shell access on the domain. It indicates whether the domain administrator can change the password of the FTP account on the domain. The manage_dns node is optional. The make_dumps node is optional. It indicates whether the domain administrator can manage the domain via Plesk desktop. It indicates whether the domain administrator can customize Plesk desktop. The manage_webapps node is optional. It indicates whether the domain administrator can manage DNS settings on the domain. Data type: Boolean . Data type: Boolean. The manage_iis_app_pool node is optional. Data type: Boolean. It indicates whether the domain administrator can manage DrWeb antivirus software on the domain (if supported by the key). Data type: Boolean. The manage_not_chroot_shell node is optional. Data type: Boolean. The stdgui node is optional. It indicates whether the domain administrator can manage subdomains created on the domain. Data type: Boolean. It indicates whether the domain administrator can manage non-chrooted shell access. Data type: Boolean. The site_builder node is optional. The manage_dashboard node is optional. Data type: Boolean. It indicates whether the domain administrator can use the standard GUI of Plesk. The manage_drweb node is optional. The manage_maillists node is optional.

ca</email> <address>Gray Lake Road. Data type: Boolean. The allow_ftp_backups node is optional.    The following sample packet creates a domain account and sets Domain Administrator information and permissions: <packet version=”1. Is supported by API RPC 1.0 and later. It indicates whether the domain administrator can use the local repository for backup/restore operations. Is used for Plesk for UNIX only.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.4. Data type: Boolean.4.0”> <domain> <add> <gen_setup> <name>newdomain.0 and later.2.com</name> <client_id>1234</client_id> <ip_address>192. The manage_spamfilter node is optional. Is supported by API RPC 1. It indicates whether the domain administrator can manage additional FTP accounts created on the domain.2.0.2.4. 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> .4.2. The element is supported beginning with version 1. Is used for Plesk for UNIX only. The allow_local_backups node is optional.0 and later.0 of API RPC.1.406 Supported Operations  The manage_subftp node is optional. Data type: Boolean. It indicates whether the domain administrator can manage the spam filter.4. Data type: Boolean.2. It indicates whether the domain administrator can use the FTP repository for backup/restore operations. Is supported by API RPC 1.

The vrt_hst node is required if physical hosting is specified on the domain. hosting settings will be deleted. Extended by: domainFFHostingBase (plesk_domain.   Complex type domainHostingAgentSet is used in the add and set request packets. 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. Data type: none.xsd). Extended by: domainPhHostingSet (plesk_domain. See the structure of this node in the Node vrt_hst (type domainPhHostongGet) sub-topic.   .xsd). Data type: none.  The std_fwd node is required if standard forwarding is specified on the domain. Extended by: domainSFHostingBase (plesk_domain. The none node is required if no hosting is specified on a domain. Data type: none. Complex type domainHostingAgentGet is used in the get response packets. See the structure of this node in the Node std_fwd (see page 413) sub-topic. Data type: none. See the structure of this node in the Node vrt_hst (type domainPhHostingSet) (see page 409) subtopic.Supported Operations 407 Hosting Settings Hosting settings are described by two data types.xsd). Data type: none. Extended by: domainPhHostingGet (plesk_doman. Both data types are similar. If specified. The frm_fwd node is required if frame forwarding is specified on a domain. See the structure of this node in the Node frm_fwd (see page 414) sub-topic.xsd).

...................1..................................... 413 Node frm_fwd ....................4.............com</name> <client_id>1234</client_id> <status>0</status> </gen_setup> <hosting> <none/> </hosting> </add> </domain> </packet> In this section: Node vrt_hst (type domainPhHostingSet) ............................................................................2”> <domain> <add> <gen_setup> <name>newdomain..............408 Supported Operations The following request add packet sent by Administrator creates a domain with disabled hosting : <packet version=”1.................... 414 ................... 409 Node std_fwd .............................................

It is presented by complex type domainPhHostingSet. This node is structured as follows: .Supported Operations 409 Node vrt_hst (type domainPhHostingSet) The vrt_hst node is used in the add and set request packets.

The ftp_password node is required. The shell-forbidden node is optional. The ssi_html node is optional. This parameter makes sense for Plesk for Windows only. Starting with API RPC v.1. The fp_auth node is optional. It is supported by API RPC beginning with version 1.                 . It specifies the password of the FTP account created on the domain. This node is used in API RPC 1. Data type: Boolean. Data type: Boolean. If set to true. It enables/disables Perl support on the domain.4. It specifies the login name of the FrontPage administrator (if FP is supported on the domain). refer to the table below. The ssi node is optional. The fp node is optional. The fp_admin_password node is optional. Data type: Boolean. It enables/disables PHP support on the domain. Data type: Boolean.1.4.‘). It restricts the disk space (in bytes) allotted for FTP needs on the domain. allowed characters: a-z. 0-9. you can choose between nodes <shell> and <shell-forbidden> (the latter node prohibits shell access to Plesk). Data type: string (1 to 17 characters long. it indicates that PHP scripts are executed by IIS as ISAPI extensions (otherwise they are executed as CGI applications). Data type: Boolean. It allows/disallows shell access to Plesk with FTP user login credentials. It is used to prohibit shell access to Plesk for FTP users of the domain. This parameter makes sense for Plesk for Windows only. Data type: none. The cgi node is optional. Data type: Boolean. it indicates that the web server should look in HTML and HTM files for SSI scenarios (they are normally used in SHTML. The mod_perl mode is optional. It allows/disallows authoring using FrontPage on the domain. Allowed values in Windows: ‗Login Enabled‘ | ‗Login Disabled‘.1. It enables/disables SSI support on the domain. It enables/disables support for FrontPage via SSL.4. ‗. Data type: string (up to 20 characters long). The ftp_quota node is optional. A path of a shell command interpreter (like ‗/bin/sh‘ or ‗/bin/bash‘) allows shell access. It enables/disables FrontPage support on the domain.0.1. The fp_admin_login node is optional. ‗_‘. Data type: Boolean. Data type: Boolean. Data type: string (up to 255 characters long). The php node is optional. It specifies the login name of the FTP account created on the domain.0 and higher. If set to true. For details on unlimited values for FTP quota.0. The fp_ssl node is optional. The shell node is optional. It enables/disables CGI support on the domain. Data type: string (up to 64 characters long. STM files). Allowed values in UNIX: the default value (―/bin/false‖) disables shell access. Data type: Boolean. A-Z. SHTM. Data type: string (up to 16 characters long). Data type: Boolean. It specifies the password of the FrontPage administrator (if FP is supported on the domain).1. It indicates whether the domain is accessed via SSL connection. The php_isapi node in optional. The ssl node is optional.4.410 Supported Operations  The ftp_login node is required. Data type: integer.0. It is supported by API RPC beginning with version 1. not equal to FTP login).

The sb_publishing node is optional. If set to true. Makes sense for Plesk for Windows only. Data type: Boolean. This element is supported starting with API RPC v. This element is supported beginning with version 1.4.0. The create-sb-subdomains node is optional.0. Data type: Boolean. It indicates whether the FastCGI technology is supported on the domain. This element is supported starting with API RPC v. The php-version node is optional.NET on the domain.0 and later. The fastcgi node is optional.2.4.Supported Operations 411     The mod_python node is optional. It enables/disables executing php script files in the safe mode on the domain. The wuscripts node is optional. It specifies the IP address associated with the domain. The iis_app_pool node is optional. Data type: Boolean The asp_dot_net node is optional. It enables/disables support for ASP.4.NET version which is default for the domain. This parameter makes sense for Plesk for Windows only.2.0.1. The ip_address node is required. Data type: Boolean. Data type: string.0 of API RPC.0 The coldfusion node is optional. Indicates whether web user scripts are allowed for execution on the domain. Allowed values: 4 | 5. It enables/disables publishing web site on the domain using SiteBuilder.xsd).4. It specifies what version of PHP should be default for domain directory.0 and later.4. Data type: Boolean. Data type: ip_address (common. Data type: Boolean. It specifies ASP.4. Data type: string. Makes sense for Plesk for Windows only. Data type: boolean. This feature is supported by API RPC 1. Data type: Boolean.0. It specifies the web server statistics processor to be used on the domain.4. This parameter makes sense for Plesk for Windows only. Allowed values: 1.2. The php_safe_mode node is optional. If set to true. It enables/disables IIS application pool on the domain.2. It enables/disables Apache ASP support on the domain. It specifies if the SiteBuilder blog and photo gallery subdomains should be created on the domain. Data type: Boolean. Makes sense for Plesk for UNIX only. It enables/disables Coldfusion support on the domain. Data type: string.0 | 2. It enables/disables Python support on the domain. Makes sense for Plesk for Windows only.2. It is supported by API RPC beginning with version 1. The at_domains node is optional. Data type: Boolean. It enables/disables support for the @<domain_name> format on the domain.              . indicates that statistics is accessible via a password protected directory (‗/plesk-stat/‘).1. Data type: Boolean. The errdocs node is optional. The webstat node is optional. The webstat_protected node is optional. The asp node is optional. Allowed values: none | awstats | webalizer | smarterstats | urchin. The managed_runtime_version node is optional. Data type: Boolean.1. Data type: Boolean.1.0. This element is supported starting with API RPC v. indicates that the use of custom error documents is enabled on the domain. Is supported by API RPC 1. Makes sense for Plesk for Windows only.

0.com</name> <client_id>1234</client_id> <ip_address>123. . API RPC 1.412 Supported Operations Values for unlimited FTP quota parameter.123.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> <php_safe_mode>true</php_safe_mode> <ip_address>123.2.5.4.123.0”> <domain> <add> <gen_setup> <name>newdomain.4.123.0 and later -1 -1 The following sample packet creates a new domain and specifies physical hosting settings for it: <packet version=”1.2.123</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> 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.123.0 and earlier Plesk for Windows Plesk for Unix 0 -1 API RPC 1.

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

123.2”> <domain> <add> <gen_setup> <name>newdomain.testdomain.4. When the user goes to the domain on which frame forwarding is set.123.123.123.xsd).1. It specifies the IP address associated with the domain.414 Supported Operations Node frm_fwd The frm_fwd node is used to specify frame forwarding on a domain. Data type: ip_address (common.com</name> <client_id>1234</client_id> <ip_address>123.123</ip_address> </frm_fwd> </hosting> </add> </domain> </packet> .  The following sample packet specifies frame forwarding for a new domain: <packet version=”1. 1 to 255 characters long.  The dest_url node is required.123</ip_address> <status>0</status> </gen_setup> <hosting> <frm_fwd> <dest_url>www.com</dest_url> <ip_address>123. It specifies the URL to which the user will be redirected implicitly at the attempt to visit the specified domain. The ip_address node is required. Data type: forwardingUrl (string. 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). spaces not allowed).

The web_users node is required. Data type: long.) on a domain. Data type: long. Specifies the amount of disk space (in bytes) occupied by subdomains of this domain. The anonftp node is required. Specifies the amount of disk space (in bytes) occupied by the /httpdocs directory. etc. databases. it is nested within the data node (described in plesk_domain. To get these settings from Plesk database. Specifies the amount of disk space (in bytes) occupied by the /httpsdocs directory. The httpsdocs node is required. The returned disk_usage node has no data type. send the get packet and receive the response. folders.      The httpdocs node is required. The subdomains node is required. Data type: long.Supported Operations 415 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) allotted for web users on the domain. .xsd) and has the following structure. Data type: long. Specifies the amount of disk space (in bytes) occupied by anonymous FTP.

The maillists node is required. The maillists node is optional. The configs node is required. Data type: long.0. Specifies the amount of disk space (in bytes) occupied by configuration files of the domain. Makes sense for Plesk for Windows only.416 Supported Operations   The logs node is required. The chroot node is required. Specifies the amount of disk space (in bytes) occupied by mailing lists created on the domain. Data type: long.         Most of these settings cannot be set up directly. Specifies the amount of disk space (in bytes) occupied by logs. Specifies the amount of disk space (in bytes) occupied by MSSQL databases created for the domain. The mysql_dbases 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: long.5. Makes sense for Plesk for UNIX only. Specifies the amount of disk space (in bytes) occupied by databases created for the domain.0. The dbases node is required. The mssql_dbases node is required. Data type: integer. Data type: long.3. Makes sense for Plesk for UNIX only. . Specifies the amount of disk space (in bytes) allotted by mailboxes of the domain. Data type: long. Data type: long. The mailboxes node is required. Specifies the amount of disk space (in bytes) occupied by dumps of the domain. The webapps node is required.3. The domaindumps node is required. 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. Data type: integer. Data type: long. It is supported beginning with API RPC 1. Specifies the amount of disk space (in bytes) allotted by mailboxes of the domain. Data type: long. Data type: long. Specifies the amount of disk space (in bytes) occupied by mailing lists created on the domain.5. You can set only two of them: mailboxes and maillists. Data type: long. Makes sense for Plesk for UNIX only. It is supported beginning with API RPC 1. Makes sense for Plesk for Windows only. Specifies the amount of disk space (in bytes) occupied by Tomcat web applications deployed on the domain.

0”> <domain> <set> <filter> <id>123</id> <id>124</id> </filter> <values> <disk_usage> <mailboxes>1073741824</mailboxes> <maillists>1048576</maillists> </disk_usage> </values> </set> </domain> </packet> The following get response packet returns the disk usage information for the specified domain: <packet version=”1.Supported Operations 417 The following set request packet sets the limits on the hard disk space for email boxes and mailing lists: <packet version=”1.4. so the filter-id node of the response packet returns this filtering parameter.co.2. Note that the earlier versions of API RPC protocol do not support this feature.0: the response contains the filtering parameter (the filter-id node).2.4.4. The request packet filtered the domain by domain name. and the id node returns the domain identifier.2.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.

It holds the number of web users created on the domain. Data type: unsignedInt. . Data type: unsignedInt. The box node is required. The stat node of the get response packet is defined by the domainStat data type (plesk_domain. Data type: unsignedInt. Data type: unsignedInt. It returns the number of redirects created for the domain. The wu node is required. Data type: size (unsignedLong).xsd) and contains a collection of statistics data for the specified domains. It holds the number of email boxes created for the domain. The subdom node is required. The redir node is required. It returns the traffic (in bytes) spent by the domain during the current month.418 Supported Operations Statistics Settings Statistics settings can be received from Plesk server in the get response packet. It holds the number of subdomains created on the domain. This node is structured as follows:      The traffic node is required.

It returns the number of mailing lists created on the domain. It returns the number of autoresponders created on the domain. Data type: unsignedLong. It returns the number of mailing groups created on the domain. It returns the number of Java applications installed on the domain. It returns the traffic (in bytes) spent by the domain during the previous day. The traffic_prevday node is required.Supported Operations 419       The mg node is required. The resp node is required. Data type: unsignedInt.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> . Data type: unsignedInt. Data type: unsignedInt. Data type: unsignedInt.4. The webapps node is required. Data type: unsignedInt. The following response packet returns statistics settings for two filtered domains (ID 2435 and ID 2567): <packet version=”1. It holds the number of databases created for the domain. The maillists node is required.2. The db node is required.

The following sample packet creates a domain account and sets domain preferences: <packet version=”1.0. The stat_ttl node is optional. so the filter-id node of the response packet returns this filtering parameter. Data type: integer.2. It enables/disables the use of the www prefix with the domain name. and the id node returns the domain identifier.4. It specifies the number of months during which the domain traffic statistics is kept. Data type: Boolean.0.6. It is structured as follows:   The www node is optional.2.123</ip_address> </gen_setup> <prefs> <www>false</www> <stat_ttl>6</stat_ttl> </prefs> </add> </domain> </packet> . Domain Preferences Domain preferences are defined by the prefs node.xsd).0: the response contains the filtering parameter (the filter-id node).0”> <domain> <add> <gen_setup> <name>example. Note that the earlier versions of API RPC protocol do not support this feature. The maximal value: 999999.com</name> <owner-id>1234</owner-id> <ip_address>192. The request packet filtered the domain by domain ID.420 Supported Operations <traffic_prevday>152562874868127</traffic_prevday> </stat> </data> </result> </get> </domain> </packet> This packet is specific for API RPC 1. This node is specified by the domainPrefs (plesk_domain.

 The max_connections node is optional. the bandwidth is unlimited. Data type: integer. It restricts the network use by the specified value (Kb/sec) for the domain.123</ip_address> </gen_setup> <performance> <bandwidth>1000</bandwidth> <max_connections>20</max_connections> </performance> </add> </domain> </packet> . This type is structured as follows:  The bandwidth node is optional.0. Note: If you work with Plesk for Unix/Linux through API RPC 1. If set to -1.5.4. If set to -1.2.2.0. Note: All operations on domain performance settings are supported in API RPC beginning with version 1.0. you must provide bandwidth values in bytes/sec.xsd).6.1.Supported Operations 421 Performance Settings Domain performance settings are defined by the performance node. Data type: integer. It restricts the number of connections by the specified value for the domain.com</name> <owner-id>1234</owner-id> <ip_address>192. the number of connections is unlimited. This node is specified by complex type DomainPerformanceType (plesk_domain.1 or earlier versions.0”> <domain> <add> <gen_setup> <name>newdomain. The following sample packet creates a domain account and sets performance settings: <packet version=”1.

............................ 425 Response Packet Structure ............. and the IP address.................6......... send a packet as follows: <packet version=”1.......... namely: the domain name.. In this section: Request Packet Structure............................ The only exception from this rule is a domain template: it cannot be applied to the domain after it is created..... 423 Request Samples ........ Plesk reseller or Plesk client..... 428 ...... In addition......................................................... you can specify various domain settings when creating a domain account (all of them are optional):       Hosting settings (see page 397) Hosting performance settings (see page 421) Limits (see page 397) on use of Plesk resources Domain preferences (see page 420) Domain administrator settings (see page 392) Domain template A domain account can have all these settings specified......................... To register a new domain account in Plesk database............................ it is enough to specify some general setup information.................... You can specify domain settings when creating a domain account or later (they can be set using the set operation)............ To learn more about the domain templates management via API RPC..422 Supported Operations To undo the performance settings for this domain............................. or it can hold just some of them... the domain owner needs to be specified too........com</domain-name> </filter> <values> <performance> <bandwidth>-1</bandwidth> <max_connections>-1</max_connections> </performance> </values> </set> </domain> </packet> Creating Domain Account A domain account can be created by Plesk Administrator................ 427 Response Samples ....... If the domain is created by Plesk Administrator or Plesk reseller.........0”> <domain> <set> <filter> <domain-name>example.......... proceed to section Managing Domain Templates (see page 516)..0........

xsd). It is used to specify the most important information about the domain account. and the status got by the domain right after it is created. See the structure of this node in the Domain Preferences (see page 420) section.    . The prefs node is optional. the IP address associated with the domain. The limits node is optional. Data type: domainPrefs (plesk_domain. It specifies a collection of domain preferences. Data type: domainHostingAgentSet (plesk_domain. See the structure of this node in the General Account Information (see page 385) section. Data type: domainLimits (plesk_domain. it is nested within type DomainTypeRequest (domain_input. the Plesk user who owns this domain.2. See the structure of this node in the Hosting Settings (see page 397) section. that is: the name of the new domain. See the structure of this node in the Limits (see page 397)section.xsd). It specified hosting settings set for the domain. the hosting type used for this domain.xsd).Supported Operations 423 Request Packet Structure A request XML packet adding a new domain account to Plesk database includes the add operation node: <packet version=”1.4.0”> <domain> <add> … </add> </domain> </packet> The add node does not have a separate type. Data type: setGenSetupType (plesk_domain. It specifies limits imposed on use of Plesk resources for this domain.xsd).xsd). The add node has the following graphics representation:  The gen_setup node is required. The hosting node is optional.

424 Supported Operations  The user node is optional.xsd).4. password. It specifies the domain template by ID if it is necessary to create a domain using a domain template. It specifies a collection of domain performance settings (bandwidth. To learn more about domain templates.).  The template-id node is optional. Is specifies Domain Administrator settings (login. proceed to section Managing Domain Templates (see page 516). . This node is available in API RPC 1. Plesk Administrator can use only shared templates to create domain accounts for clients.  The template-name node is optional. postal address.  The performance node is optional. email address. the maximal number of connections). Data type: integer.0 and later.xsd). This node is available in API RPC 1. phone.4.1. Data type: string.4. fax. proceed to section Managing Domain Templates (see page 516). Data type: DomainPerformanceType (plesk_domain.1. Data type: domainUserSet (plesk_domain.0 and later. Note: You can use only templates to which the domain account owner has access. See the structure of this node in the Performance Settings (see page 421) section. It specifies the domain template by name if it is necessary to create a domain using a domain template. See the structure of this node in the Domain Administrator Settings (see page 392) section. This node is available in API RPC 1. For instance.0 and later.1. To learn more about domain templates. and so on.

2.com</name> <htype>vrt_hst</htype> <ip_address>192.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> .0. Here is a sample request packet that can be used by a Plesk client to create a domain account.0. <packet version=”1. Plesk resellers or Plesk clients.2.0.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.2.0.Supported Operations 425 Request Samples Creating domain accounts under different Plesk users Domain accounts can be created by Plesk Administrator. The domain account is created with a minimal collection of settings.0”> <domain> <add> <gen_setup> <name>newdomain.com</name> <owner-id>1234</owner-id> <htype>vrt_hst</htype> <ip_address>192.0”> <domain> <add> <gen_setup> <name>example.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.2.6.4.0.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> The following packet sent by Plesk Administrator specifies the Plesk user who owns this domain: <packet version=”1.2.

0.2.426 Supported Operations Creating multiple domain accounts To create two domain accounts with a single packet.2.2.54</ip_address> </vrt_hst> </hosting> </add> <add> <gen_setup> <name>sample.2.0.0.0”> <domain> <add> <gen_setup> <name>example.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192.com</name> <htype>vrt_hst</htype> <ip_address>192.4.2. include two different add nodes: <packet version=”1.com</name> <ip_address>192.54</ip_address> </vrt_hst> </hosting> </add> </domain> </packet> .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.123</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>c4u7dwbc2y8</ftp_login> <ftp_password>qweqwe</ftp_password> <ip_address>192. preferences. Data type: string. It returns the execution status of the add operation.0. limits.com</name> <htype>vrt_hst</htype> <ip_address>192. <packet version=”1. Allowed values: ok | error. . Response Packet Structure The add node of the response packet is structured as follows:   The result node is required.54</ip_address> </vrt_hst> </hosting> <template-name>base_template</template-name> </add> </domain> </packet> Note: To see the sample packets that set optional domain settings (hosting settings.0.0”> <domain> <add> <gen_setup> <name>example.Supported Operations 427 Using a domain template The following sample packet creates a domain account based on the domain template.2.2. It wraps the result of the requested add operation.xsd).4. refer to the related section in the Domain Settings (on page 383)section. and others). The status node is required. Data type: resultType (common.

Data type: integer. Data type: string. It is required if the add operation succeeds. Is used to return the error code when the add operation fails.</errtext> </result> </add> </domain> </packet> . Can be used to return an error message if the add operation fails.2. Response Samples A positive response got from the server after adding a new domain account looks as follows: <packet version=”1. The id node is optional.2.428 Supported Operations    The errcode node is optional.4.0”> <domain> <add> <result> <status>ok</status> <id>2435</id> </result> </add> </domain> </packet> A negative response can look as follows (you can get a different error code depending on what caused the failure): <packet version=”1.4. Data type: unsignedInt. The errtext node is optional. Returns the unique identifier of the domain account just added to Plesk.0”> <domain> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

.....1 and earlier versions............ or for all domains registered in Plesk............................. the info on all domain accounts (including the accounts owned by Plesk Administrator) will be returned......................... specify artificial client account login name in the filtering rule... hosting type.......g........... This information is as follows:         general information (domain name and ID.............. In this section: Request Packet Structure................. 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 at once or specify certain kinds of information (e..5.. In turn...... Plesk clients can get information on their own domain accounts only..................... 437 .............. for all domains belonging to a certain Plesk user (or several)...... 431 Response Packet Structure ............. Plesk will return info on only reseller's personal domain accounts............................. If you request info on all domain accounts..... To request the information about domains........... Plesk resellers can request information on their own domains and their clients' domains.......... Note: If you interact with Plesk 9 through API RPC 1.......... use a request XML packet with the get operation..................... and you request info on domain accounts owned by a reseller using get.......................2........ excluding those owned by the reseller's clients.......... for a group of domains.... 435 Response Samples ....................... To retrieve info on domain accounts owned by Plesk Administrator.... only hosting settings)........ 430 Request Samples ....Supported Operations 429 Getting Information About Domain Accounts Plesk Administrator can request any information about any domain account registered in Plesk database.......... The information can be selected for a certain domain.......

The limits node is optional. Data type: none. The stat node is optional. Data type: none. proceed to topic Filtering Issues (see page 379). The prefs node is optional. It is used to request general information about the specified domains. it is nested within the DomainTypeRequest complex type (domain_input. The hosting node is optional. It is used to request the limits on Plesk resources set for the specified domains.430 Supported Operations Request Packet Structure A request XML packet getting information about the specified domain(s) includes the get operation node: <packet version=”1. Data type: none. The dataset node is required. It specifies domains whose information will be got from Plesk database. Data type: domainDatasetType (plesk_domain. The get node has the following graphics representation:  The filter node is required. It is used to request hosting settings of the specified domains.xsd). It is used to request statistics settings of the specified domains. It specifies what type of information about the specified domains is requested. Data type: none. The gen_info node is optional.0”> <domain> <get> … </get> </domain> </packet> The get node does not have a separate data type. It is used to request preferences set for the specified domains. To see the structure of this node.xsd).xsd). Data type: DomainFilterType (domain_input.       . Data type: none.4.2.

6.0”> <domain> <get> <filter> <id>123</id> <id>124</id> <domain-name>example. The following packet is invalid as it uses both id and domain-name nodes within one filter: <packet version=”1. Data type: none.0 and higher.5.Supported Operations 431    The user node is optional.0”> <domain> <get> <filter> <client_login>admin</client_login> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> Getting multiple domains under Plesk Administrator Multiple domains can be specified within one filter either by id. The performance node is optional.0. This node is supported in API RPC 1. Data type: none. Data type: none. Request Samples If you work in the Plesk 9 backward compatibility mode.com</domain-name> <domain-name>sample. It is used to request the disk usage information for the specified domains. It is used to request performance settings set for the specified domains. The disk_usage node is optional.0. the following packet will request info on all domain accounts owned by Plesk Administrator: <packet version=”1.2. It is used to request domain administrator settings.4. or by domain-name.net</domain-name> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> .

4.com</domain-name> <domain-name>sample.0”> <domain> <get> <filter/> <dataset> <hosting/> </dataset> </get> </domain> </packet> .0”> <domain> <get> <filter> <id>123</id> <id>124</id> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <domain-name>example. use different <get> sections: <packet version=”1.net</domain-name> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> To get the information about all domains registered in Plesk.432 Supported Operations To specify some domains by id and others by domain-name.0.6. the following packet can be used: <packet version=”1.2.

0. Getting multiple domains under Plesk reseller Plesk resellers can manage their own domains and domains belong to their clients. use ‗group‘ filtering (see the Filtering Issues (see page 379) section for details).0”> <domain> <get> <filter> <owner-login>JDoe</owner-login> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <owner-id>1342</owner-id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> .6.6.Supported Operations 433 To get all domains of a certain Plesk user. Plesk users whose domains are requested can be specified within one filter either by owner-id or by owner-login.0”> <domain> <get> <filter> <owner-login>JDoe</owner-login> <owner-login>RRoe</ownerlogin> </filter> <dataset> <hosting/> </dataset> </get> <get> <filter> <owner-id>1342</owner-id> <owner-id>1452</owner-id> </filter> <dataset> <hosting/> </dataset> </get> </domain> </packet> You cannot specify Plesk users by login and by id in one filter. To get information on all domains of his clients.0. Use different filters (and <get> nodes) instead. specify request packet as follows: <packet version=”1. <packet version=”1.

specify request packet as follows: <packet version=”1. the request packets shown above can be used by Plesk clients too. In all other respects. One more exception is: the following packet gets the information about all domains belonging to the calling Plesk client.0”> <domain> <get> <filter/> <dataset> <hosting/> </dataset> </get> </domain> </packet> Getting different types of information To get the whole set of information about Plesk user domains.6. They cannot apply group filtering using nodes owner-id and owner-login.2.0”> <domain> <get> <filter/> <owner-login>RRoe</owner-login> </filter> <dataset/> </get> </domain> </packet> . <packet version=”1. use the following packet: <packet version=”1.0”> <domain> <get> <filter/> <dataset> <hosting/> </dataset> </get> </domain> </packet> Getting multiple domains under Plesk client Plesk clients can manage their own domain accounts only.0.434 Supported Operations To retrieve information on all domains belonging to the calling Plesk reseller.6.4.0.

g. and statistics settings). The errcode node is optional.4. Data type: unsignedInt.Supported Operations 435 To fetch a particular kind of data (e. The status node is required. Data type: string. It can be missing if some error occurs before the validation starts.0”> <domain> <get> <filter> <id>123</id> </filter> <dataset> <hosting/> <limits/> <stat/> </dataset> </get> </domain> </packet> Response Packet Structure The get node of the response packet is structured as follows:  The result node is optional.    . hosting settings. It wraps the result of the requested get operation. Ii is used to return the error code when the get operation fails. limits. Can be used to return the error message if the get operation fails. Data type: string. add certain child elements to in the dataset section as follows: <packet version=”1. It returns the execution status of the get operation. The errtext node is optional.2. Allowed values: ok | error. Data type: resultType (common.xsd).

Data type: domainHostingAgentGet (plesk_domain. See the Hosting Settings (see page 397)topic for details. it returns a collection of hard disk limits set for the specified domains. The node is always missing if the request packet fails before the validation on the server side.xsd). it returns a collection of statistics settings set for the specified domain(s). If specified in the request packet. The user node is optional.436 Supported Operations  The filter-id node is optional. See the Domain Administrator Settings (see page 394)topic for details. Data type: anySimple. The data node is optional. The limits node is optional. Data type: none.xsd). it returns a collection of domain administrator settings. See the Disk Usage Settings (see page 415)topic for details. The prefs node is optional. Data type: domainLimits (plesk_domain. it returns the identifier of the domain whose settings are requested. See the Domain Preferences (see page 420) topic for details.   The data node of the response get packet is structured as follows:  The gen_info node is optional. Data type: domainGenInfoType (plesk_domain. it is always present and used to return the parameter by which the domain was filtered by in the request packet. See the Statistics Settings (see page 418) topic for details. The hosting node is optional. See the Limits (see page 397)topic for details. If specified in the request packet.xsd). If specified in the request packet.xsd). Data type: integer. Data type: domainStat (plesk_domain.2.xsd). Is supported by API RPC 1. Data type: domainUserGet (plesk_domain. The id node is optional. If specified in the request packet. If specified in the request packet. If specified in the request packet. Data type: domainPrefs (plesk_domain. it returns hosting settings of the specified domain. If supported.       . it returns a collection of limits set for the specified domains.4. it returns a collection of general domain settings.0 and later.xsd). it returns a collection of preferences set for the specified domains. The stat node is optional. The disk_usage node is optional. See the General Account Information (see page 387) topic for details. Data type: none. If present. If specified in the request packet. It is used to return a collection of requested domain settings if the get operation succeeds.

The following response packet returns domain preferences for two specified domains: <packet version=”1.0 and higher.4.4.0.2. Response Samples A positive response received from the server contains the information for each requested domain in a separate result block. it returns a collection of performance settings set for the specified domains. This node is supported in API RPC 1. If specified in the request packet.Supported Operations 437  The performance node is optional.xsd). See the Performance Settings (see page 421) topic for details.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> . Data type: DomainPerformanceType (plesk_domain.

If you need an example of a particular setting returned in the response get packet.2. proceed to a related topic of the Domain Settings (on page 383) section.1.g.4.2 and earlier return the domain identifier in its id node.2.4.438 Supported Operations <packet version=”1.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node).0”> <domain> <get> <result> <status>ok</status> <filter-id>2435</filter-id> <id>2435</id> <data> <prefs/> </data> </result> </get> </domain> </packet> . prefs) empty: <packet version=”1.4.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> Notice the difference in these identical packets sent using different versions of API RPC:   versions 1. If the request get packet asks for a certain kind of settings. versions 1.4. These two nodes can coincide if the domain was filtered by domain_id. but the specified domain is missing these settings in the database.1. the response get packet will return the requested node (e.

4.2”> <domain> <get> <result> <status>ok</status> <id>2435</id> <data> <prefs/> </data> </result> </get> </domain></packet> 439 If the get operation fails.2.4.1.4.2 and does not return the domain identifier.4.1.Supported Operations <packet version=”1. a negative response can look as follows (you can get a different error code depending on the cause of the failure): <packet version=”1. it indicates the filtering parameter (this time the domain ID) in the filter-id node.4.0.</errtext> <filter-id>1234</filter-id> </result> </get> </domain> </packet> <packet version=”1.</errtext> </result> </get> </domain> </packet> The left packet is sent via API RPC 1.1.2. The right packet is sent using API RPC 1.2”> <domain> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found. .0”> <domain> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.

..................... The del node has the following graphics representation:  The filter node is required........................ 440 Request Samples .... 441 Response Packet Structure ................... Data type: DomainFilterType (domain_input..... proceed to topic Filtering Issues (see page 379)................................ Plesk Administrator can delete any domain account available in Plesk..... 443 Request Packet Structure A request XML packet that deletes domain accounts should include the del operation node: <packet version=”1.................................. while Plesk clients can delete their own domain accounts only.................... 442 Response Samples .................... Domain accounts are deleted by sending a del request packet to Plesk server......... it is nested within the DomainTypeRequest complex type (domain_input... It indicates domains to be deleted.....................0”> <domain> <del> … </del> </domain> </packet> The del node does not have a separate type............4..................................2........................... .......................xsd). To see the structure of this node..............................440 Supported Operations Deleting Domain Accounts Domain accounts can be deleted individually or in bulk.. In this section: Request Packet Structure.....xsd)............

The following packet is invalid as it uses both id and domain-name nodes within one filter: <packet version=”1.com</domain-name> <domain-name>sample.net</domain-name> </filter> </del> </domain> </packet> To delete all domains registered in Plesk.0”> <domain> <del> <filter> <id>123</id> <id>124</id> <domain-name>example.0”> <domain> <del> <filter/> </del> </domain> </packet> .6. To delete multiple domains. Plesk reseller can remove any domain belongs to his client. use different <del> sections: <packet version=”1.0”> <domain> <del> <filter> <id>123</id> <id>124</id> </filter> </del> <del> <filter> <domain-name>example.net</domain-name> </filter> </del> </domain> </packet> To filter some domains by id and others by domain-name.4. or by domain-name.0. the request packet should filter them either by id.2.com</domain-name> <domain-name>sample.Supported Operations 441 Request Samples Deleting multiple domain accounts under Plesk Administrator or under Plesk reseller Plesk Administrator can remove any domain in Plesk server.0. the following packet can be used: <packet version=”1.6.

6. Plesk users whose domains are deleted can be specified within one filter either by owner-id or by owner-login. It can be missing if some error occurs before the validation starts. It returns the execution status of the del operation. <packet version=”1. Allowed values: ok | error.0”> <domain> <del> <filter> <owner-login>example. Use different filtering rules instead. Data type: resultFilterType (common. Response Packet Structure The del node of the response packet is structured as follows:  The result node is optional.com</owner-login> <owner-login>sample.0.  . The status node is required.442 Supported Operations To delete all domains of a certain Plesk user. Data type: string. It wraps the result of the requested del operation. use ‗group‘ filtering (see the Filtering Issues (see page 379) section for details).net</owner-login> </filter> </del> <del> <filter> <owner-id>1342</owner-id> <owner-id>1452</owner-id> </filter> </del> </domain> </packet> You cannot specify Plesk users by login and by id in one filter.xsd).

4.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node).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.2.4.  Response Samples A positive response got from the server after deleting the specified domains (e.2.1.2 and earlier return the domain identifier in its id node.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. These two nodes can coincide if the domain was filtered by domain_id. with id = 2435 and id = 2446) looks as follows: <packet version=”1.4. Data type: anySimple. Data type: string. It is missing if the request packet fails before the validation on the server side.2. The errtext node is optional.Supported Operations 443    The errcode node is optional.0 and later. Is supported by API RPC 1.g. versions 1. The id node is optional. Data type: unsignedInt. Data type: integer. it is always present and used to return the parameter by which the domain was filtered by in the request packet. Can be used to return an error message if the del operation fails. . If present. It is used to return an error code when the del operation fails. this node identifies the deleted domain.1.4. If supported. The filter-id node is optional.

2”> <domain> <del> <result> <status>ok</status> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found. it indicates the filtering parameter (this time the domain id) in the filter-id node.4.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.444 Supported Operations A negative response can look as follows: <packet version=”1.</errtext> <filter-id>2446</filter-id> </result> </del> </domain> </packet> The left packet is sent via API RPC 1. The right packet is sent using API RPC 1.2.1.2.</errtext> </result> </del> </domain> </packet> <packet version=”1.1.4.4.2 and does not return the domain identifier.4.0. .

....... 447 Response Packet Structure ..................... A collection of domain settings can be applied to one or several domain accounts at a time.................. In this section: Request Packet Structure...... the IP address...Supported Operations 445 Setting Domain Parameters Plesk Administrator can set any setting for any domain account registered in Plesk database..................................................... and the domain owner (Plesk client)..............the domain name........................ Domain settings are set by sending a request set packet to Plesk server........................... or for several clients....................................... 451 . 450 Response Samples . Plesk Administrator can set domain settings for all domains belonging to a certain Plesk client......................... The settings are as follows:        General domain account information (see page 383) Hosting settings (see page 397) Performance settings (see page 421) Limits (see page 397) on use of Plesk resources Disk usage settings (see page 415) Domain preferences (see page 420) Domain administrator settings (see page 392) Plesk Administrator can change the base domain settings ......................................................... Plesk clients are allowed to manage their own domains only................................... 446 Request Samples ..........................

To see the structure of this node. To see the structure of this node. it is nested within the DomainTypeRequest complex type (domain_input. The hosing node is optional. To see the structure of this node.4. It specifies the limits on use of Plesk resources for the filtered domains.0”> <domain> <set> … </set> </domain> </packet> The set node does not have a separate type. Data type: domainLimits (plesk_domain.xsd). proceed to topic Hosting Settings (see page 397). The prefs node is optional. It specifies hosting settings for the filtered domains. Data type: none.xsd). The gen_setup node is optional. The values node is required.xsd).      .xsd).446 Supported Operations Request Packet Structure A request XML packet that sets a collection of domain settings should include the set operation node: <packet version=”1. proceed to topic Filtering Issues (see page 379). Data type: SetGenSetupType (plesk_domain. proceed to the Limits (see page 397)topic.2. To see the structure of this node. proceed to topic General Account Information (see page 390). It specifies a collection of general domain settings that will be set for the filtered domains. The set node has the following graphics representation:  The filter node is required. It indicates domains to be updated with the specified information.xsd). It specifies a collection of preferences for the filtered domains. Data type: DomainFilterType (domain_input. The limits node is optional. Data type: domainPrefs (plesk_domain. proceed to topic Domain Preferences (see page 420). It contains a collection of settings that will be set for the filtered domains. Data type: domainHostingAgentSet (plesk_domain.xsd). To see the structure of this node.

uk</domain-name> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> .5.4.1. The disk_usage node is optional.0”> <domain> <set> <filter> <id>123</id> <id>124</id> <domain-name>techservice. To see the structure of this node.Supported Operations 447  The user node is optional.uk</domain-name> <domain-name>techknowledge.   Request Samples Setting data for multiple domains under Plesk Administrator The following packet changes GUIDs of all domains. It specifies the amount of disk space allotted for email boxes and mailing lists on the filtered domain(s).xsd).0 only. Data type: domainUserSet (plesk_domain.5. proceed to topic Performance Settings (see page 421).0”> <domain> <set> <filter/> <values> <gen_setup> <guid/> </gen_setup> </values> </set> </domain> </packet> Multiple domains can be specified within one filter either by id. proceed to topic Domain Administrator Settings (see page 392). This node is actual beginning with API RPC 1.2.xsd). It specifies a collection of performance settings for the filtered domains.0.co. Data type: DomainPerformanceType (plesk_domain. Data type: none. To see the structure of this node. To see the structure of this node. It is valid only in API RPC 1. The following packet is invalid as it uses both id and domain_name nodes within one filter: <packet version=”1. <packet version=”1. The performance node is optional.0 and later versions.6. or by domain_name. proceed to topic Disk Space Usage Settings (see page 415).2.co. It specifies domain administrator settings.

co. use different set nodes: <packet version=”1.co.4.2.uk</domain_name> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> To set the same settings for all domains registered in Plesk.0”> <domain> <set> <filter> <id>123</id> <id>124</id> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> <set> <filter> <domain_name>techservice.2.4. the following packet can be used: <packet version=”1.448 Supported Operations To specify some domains by id and others by domain_name.0”> <domain> <set> <filter/> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> .uk</domain_name> <domain_name>techknowledge.

<packet version=”1. Setting data for multiple domains under Plesk client Plesk clients can manage their own domain accounts only. use group filtering (see topic Filtering Issues (see page 379) for details). Thus.2. One more exception is: the following packet sets the data for all domains belonging to the calling Plesk client.6.0”> <domain> <set> <filter/> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> .0. Use different filters (and set operations) instead.0”> <domain> <set> <filter> <owner-login>technolux</owner-login> <owner-login>technologic</owner-login> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> <set> <filter> <owner-id>1342</owner-id> <owner-id>1452</owner-id> </filter> <values> <performance> <bandwidth>-1</bandwidth> </performance> </values> </set> </domain> </packet> You cannot specify clients by login and by ID in one filter.Supported Operations 449 To set the same settings for all domains of a certain Plesk client.4. <packet version=”1. they cannot apply group filtering using nodes owner-id and owner-login. Plesk clients whose domains are requested can be specified within one filter either by client_id or by client_login.

It is supported by API RPC 1. Data type: unsignedInt.450 Supported Operations Since the set packet means the update of domain settings in Plesk database. Can be used to return an error message if the set operation fails. Data type: anySimple.0 and later. If supported. The status node is required. Data type: string. Data type: string. To see the sample packet for a certain setting. It is used to return the error code if the set operation fails. the values node cannot be left empty. proceed to the relevant sub-topic of Domain Settings (on page 383). The errcode node is optional. It can be missing if some error occurs before the validation starts.2. The following packet will cause the error: <packet version=”1. Response Packet Structure The set node of the response packet is structured as follows:  The result node is optional. The errtext node is optional.xsd).4.     .2.0”> <domain> <set> <filter> <id>123</id> </filter> <values/> </set> </domain> </packet> The values node can specify some or all kinds of settings. It returns the execution status of the set operation. The filter-id node is optional. It wraps the result of the requested set operation. Data type: resultFilterType (common. it is always present and used to return the parameter by which the domain was filtered by in the request packet.4. Allowed values: ok | error.

It is missing if the request packet fails before the validation on the server side.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> Notice the difference in these identical packets sent using different versions of API RPC:   versions 1.2”> <domain> <set> <result> <status>ok</status> <id>2435</id> </result> <result> <status>ok</status> <id>2446</id> </result> </set> </domain> </packet> <packet version=”1.g. Response Samples A positive response got from the server after updating the specified domains (e.2 and earlier return the domain identifier in its id node.2. If present. .1.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node). with ID 2435 and ID 2446) looks as follows: <packet version=”1. These two nodes can coincide if the domain was filtered by domain_id. this node identifies the domain whose settings are updated.1. Data type: integer.Supported Operations 451  The id node is optional. versions 1.2.4.4.4.

it indicates the filtering parameter (this time the domain ID) in the filter-id node.0.4.0”> <domain> <set> <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> </result> </set> </domain> </packet> <packet version=”1.1.</errtext> <filter-id>2446</filter-id> </result> </set> </domain> </packet> The left packet is sent via API RPC 1. .1.2”> <domain> <set> <result> <status>ok</status> <id>2435</id> </result> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found.4.4.2 and does not return the domain identifier.4.2.452 Supported Operations A negative response can look as follows: <packet version=”1. The right packet is sent using API RPC 1.2.

..... This list of buttons can be got from Plesk database for the specified domain.. proceed to topic Filtering Issues (see page 379)............ The cform_buttons_list node has the following graphics representation:  The filter node is required.........................................................xsd)............... In this section: Request Packet Structure................. Data type: DomainFilterType (domain_input.. it is nested within the DomainTypeRequest complex type (domain_input.................... 453 Request Samples ......... 455 Response Samples ....................................................................Supported Operations 453 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. 454 Response Packet Structure ...0”> <domain> <cform_buttons_list> … </cform_buttons_list> </domain> </packet> The cform_buttons_list node does not have a separate data type......... This page displays a collection of buttons....... you need to send the cform_buttons_list request packet to Plesk server..... 458 Request Packet Structure A request XML packet getting the list of domain buttons includes the cform_buttons_list operation node: <packet version=”1. It indicates domains whose buttons are requested.......... To see the structure of this node.........2..............................xsd)..........................4..

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

Data type: resultFilterType (common. It can be missing if some error occurs before the validation starts. Response Packet Structure The cform_buttons_list node of the response packet is structured as follows:  The result node is optional. <packet version=”1. . Use different filters (and cform_buttons_list nodes) instead.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.xsd).4. 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. use group filtering (see topic Filtering Issues (see page 379) for details).2.Supported Operations 455 To get buttons of all domains belonging to a certain Plesk client.

It is used to return an error code if the cform_buttons_list operation fails.0 and later. The id node is optional. The button node is optional.   Buttons are described by complex type buttonDataType (plesk_common. It returns the identifier of the button. It is missing if the request packet fails before the validation on the server side. The filter-id node is optional. Data type: buttonDataType (plesk_common. 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 cform_buttons_list operation fails. It is supported by API RPC 1.456 Supported Operations     The status node is required. it is always present and used to return the parameter by which the domain was filtered by in the request packet. If supported.xsd) as follows:  The code node is required. Allowed values: ok | error.4. Data type: string. Data type: string. The errtext node is optional. Returns the identifier of the domain whose buttons are requested. The errcode node is optional. It returns the execution status of the cform_buttons_list operation. Data type: anySimple.xsd). . It returns a collection of parameters that describe the button (see the details below). Data type: unsignedInt. Data type: string.2. Data type: integer.

It indicates whether the button in enabled. Data type: string. Data type: string. The group_name_id node is required. It returns a context help message displayed in the HELP section of the Plesk navigation pane when pointing at the button with a mouse. Data type: text (string. Data type: string. Data type: integer. The tabindex node is optional. The new_window node is optional. It returns the URL referenced by the button. It returns the button‘s tabulation index. Data type: string. It specifies the button type. It specifies the localization key of the group name. white spaces are allowed). The conhelp node is optional. Data type: Boolean. Data type: string. It specifies the location of the button‘s icon. Default value: 0. It specifies the localization key associated with the button. The href node is required. It returns the localized name of the group containing the button. Data type: string. The js_onclick node is optional. The icon_url node is optional.             . Data type: Boolean. The name_id node is required. the button is active and can be used. If true. It returns the JavaScript code executed at the button click. white spaces are allowed). It specifies the localization key of the context help message associated with the button. Allowed values: link_button (a typical link that references some URL) | comm_button (a typical button whose click event calls a related event handler). It contains the localized button name displayed in a home page.Supported Operations 457  The type node is required. The conhelp_id node is optional. Data type: string. The group_name node is required. The enabled node is required. The name node is required. Data type: text (string. It indicates whether a new window should be opened in the browser when the button is clicked. Data type: string.

2.2 and earlier return the domain identifier in its id node.1.1.php3</href> <enabled>true</enabled> <new_window>false</new_window> </button> </result> </cform_buttons_list> </domain> </packet> <packet version=”1.458 Supported Operations Response Samples A positive response with a single button displayed for the specified domain (ID 1324) looks as follows: <packet version=”1.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> <name>Edit</name> <name_id>edit</name_id> <group_name>Tools</group_name> <group_name_id>__tools</group_name_id> <href>/domains/d_ed.4.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. .4.php3</href> <enabled>true</enabled> <new_window>false</new_window> </button> </result> </cform_buttons_list> </domain> </packet> Notice the difference in these identical packets sent using different versions of API RPC:  versions 1.4.

............... 460 Request Samples ............................... In this section: Request Packet Structure.... If the operation fails....................................................... 465 ..........0”> <domain> <cform_buttons_list> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed............</errtext> <filter-id>1324</filter-id> <id>1324</id> </result> </cform_buttons_list> </domain> </packet> Getting Traffic Usage Information The get_traffic is used to retrieve information about the traffic spent by a domain between two dates.................................0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node)...2”> <domain> <cform_buttons_list> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed..............</errtext> <id>1324</id> </result> </cform_buttons_list> </domain> </packet> <packet version=”1...............2.... 460 Response Packet Structure ..................................................................................................1........2............ 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.. These two nodes can coincide if the domain was filtered by domain_id.4..............4.............Supported Operations 459  versions 1. 463 Response Samples .....4. a negative response can look as follows: <packet version=”1............

. the period will be limited by the date of the request execution.2. The get_traffic node has the following graphics representation:  The filter node is required.4.xsd). If the packet is missing this element. Data type: date. To see the structure of this node. It specifies the starting date of the period. The to_date node is optional. Data type: date.xsd). Format: YYYY-MM-DD.460 Supported Operations Request Packet Structure A request XML packet getting traffic information for the specified domains includes the get_traffic operation node: <packet version=”1. It specifies the end date of the period. It specifies domains whose traffic information will be got from Plesk database.0”> <domain> <get_traffic> … </get_traffic> </domain> </packet> The get_traffic node does not have a separate data type. Data type: DomainFilterType (domain_input. it is nested within the DomainTypeRequest complex type (domain_input. The since_date node is optional. Format: YYYY-MM-DD.   If the packet is missing both nodes since_date and to_date. the analyzed days will not be limited below. 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 379). If the packet is missing this node.

2. or by domain_name.Supported Operations 461 Request Samples Getting traffic info under Plesk Administrator Plesk Administrator can get traffic information for all domains available in Plesk.co.co. 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>softlux.4.4.2.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. Domains are specified within one filter either by id.0”> <domain> <get_traffic> <filter> <id>1234</id> <id>1235</id> <domain_name>technolux.uk</domain_name> <domain_name>softlux.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.com</domain_name> </filter> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> .

Plesk clients whose domains are filtered can be specified within one filter either by client_id or by client_login. <packet version=”1.2. send the following packet: <packet version=”1.4.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> <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> You cannot specify clients by login and by ID in one filter.462 Supported Operations To get traffic information for all domains belonging to a certain Plesk client.4. use group filtering (see topic Filtering Issues (see page 379) for details).2.0”> <domain> <get_traffic> <filter/> <since_date>2006-10-01</since_date> </get_traffic> </domain> </packet> . Use different filters (and cform_buttons_list nodes) instead. To get traffic information for all domains available in Plesk.

Data type: integer. The errtext node is optional. It wraps the result of the requested get_traffic operation. It is missing if the request packet fails before the validation on the server side. Data type: anySimple. Returns the identifier of the domain whose traffic is requested. The filter-id node is optional. It contains a collection of traffic data obtained from Plesk server (see below). Is supported by API RPC 1. The id node is optional.2. It is structured as follows: . It returns the execution status of the get_traffic operation. Data type: string. It can be missing if some error occurs before the validation starts. Data type: string. Data type: resultFilterType (common. Data type: unsignedInt.       The traffic node is defined by type trafficType (plesk_domain. Data type: trafficType (plesk_domain.xsd). The traffic node is optional.xsd).4. The errcode node is optional. Allowed values: ok | error. it is always present and used to return the parameter by which the domain was filtered by in the request packet. If supported.0 and later. It is used to return an error code if the get_traffic operation fails. Can be used to return an error message if the get_traffic operation fails.Supported Operations 463 Response Packet Structure The get_traffic node of the response packet is structured as follows:  The result node is optional.xsd). The status node is required.

It shows the outgoing HTTP traffic (in bytes). It specifies the date for which the traffic is shown. Format: YYYY-MM-DD. It shows the incoming traffic (in bytes) got via SMTP protocol. It shows the outgoing POP3/IMAP traffic (in bytes). It shows the incoming traffic (in bytes) got via FTP protocol. Data type: date. Data type: integer. It shows the incoming traffic (in bytes) got via POP3 and IMAP protocols. The pop3_imap_in node is required. The http_in node is required. Data type: integer. It shows the outgoing FTP traffic (in bytes). Data type: integer. Data type: integer. Data type: integer. The pop3_imap_out node is required. Data type: integer. The ftp_out node is required.464 Supported Operations          The date node is required. The ftp_in node is required. The smtp_out node is required. Data type: integer. Data type: integer. . It shows the incoming traffic (in bytes) got via HTTP protocol. It shows the outgoing SMTP traffic (in bytes). The smtp_in node is required. The http_out node is required.

4.Supported Operations 465 Response Samples A positive response that returns the traffic spent by the specified domains can look as shown below. <packet version=”1.1.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> <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> . This packet returns the information about traffic for two dates for two domains.

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> <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> .2.4.466 Supported Operations </traffic> </result> </get_traffic> </domain> </packet> <packet version=”1.

4.2.4.2 and earlier return the domain identifier in its id node.</errtext> <filter-id>1247</filter-id> <id>1247</id> </result> </get_traffic></domain></packet> The right packet is sent using API RPC 1.2.4. These two nodes can coincide if the domain was filtered by domain_id.2.0.Supported Operations <pop3_imap_in>1543512</pop3_imap_in> <pop3_imap_out>15436374</pop3_imap_out> </traffic> </result> </get_traffic> </domain> </packet> 467 Notice the difference in these identical packets sent using different versions of API RPC:   Versions 1. Versions 1. .2”> <domain> <get_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> <filter-id>1234</filter-id> <id>1324</id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.1. it indicates the filtering parameter (this time the domain ID) in the filter-id node.1. a negative response can look as follows: <packet version=”1. If the operation fails.4.4.0 and later return the filtering parameter (the filter-id node) and the domain identifier (the id node).</errtext> <id>1247</id> </result> </get_traffic> </domain> </packet> <packet version=”1.</errtext> <id>1324</id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.0”> <domain> <get_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

......... Data type: integer....................... It identifies the domain whose traffic settings are set....... The set_traffic node has the following graphics representation:     The dom_id node is required........ The date node is required....... It is used to show the outgoing SMTP traffic (in bytes)..xsd)...... 469 Response Packet Structure ............ it is nested within the DomainTypeRequest complex type (domain_input.......... It specifies the incoming traffic (in bytes) got via SMTP protocol.................................................. the set_traffic operation can help add this data to Plesk database................ Data type: integer.... The smtp_out node is required...... 470 Response Samples ............... If this data is gathered using some external statistics means............4...... 471 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..... It specifies the date for which the traffic data is set......... Format: YYYY-MM-DD. The smtp_in node is required..468 Supported Operations Setting Domain Traffic Settings If the traffic usage is calculated on a domain by statistics facilities of Plesk.... In this section: Request Packet Structure.........................2....................... Data type: date.................................. this data is added to Plesk automatically..................... 468 Request Samples .................. ...0”> <domain> <set_traffic> … </set_traffic> </domain> </packet> The set_traffic node does not have a separate type............................ Data type: integer....

2. Data type: integer.2.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. use the following packet: <packet version=”1.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> .Supported Operations 469   The pop3_imap_in node is required. The pop3_imap_out node is required. It specifies the incoming traffic (in bytes) got via POP3 and IMAP protocols.4. use multiple <set_traffic> nodes: <packet version=”1. It is used to show the outgoing POP3/IMAP traffic (in bytes).4. Request Samples To set traffic information for the specified domain. Data type: integer.

    . The id node is optional. Can be used to return an error message if the set_traffic operation fails. The status node is required. It wraps the result of the requested set_traffic operation. Returns the identifier of the domain whose traffic is set.xsd). Data type: string.470 Supported Operations Response Packet Structure The set_traffic node of the response packet is structured as follows:  The result node is optional. It is missing if the request packet fails before the validation on the server side. Data type: string. It returns the execution status of the set_traffic operation. Data type: unsignedInt. The errtext node is optional. It can be missing if some error occurs before the validation starts. Data type: resultType (common. Is used to return an error code when the set_traffic operation fails. Allowed values: ok | error. Data type: integer. The errcode node is optional.

0”> <domain> <set_traffic> <result> <status>ok</status> <id>1234</id> </result> </set_traffic> <set_traffic> <result> <status>ok</status> <id>1247</id> </result> </set_traffic> </domain> </packet> The packet will return the result for every filtered domain within a separate set_traffic node.2.Supported Operations 471 Response Samples After the traffic data is put to Plesk database.4.2.</errtext> <id>1324</id> </result> </set_traffic> </domain> </packet> . If the operation fails.0”> <domain> <set_traffic> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. the response packet will look as follows: <packet version=”1.2. a positive response sent back by Plesk server looks as follows: <packet version=”1.4.4.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. a negative response can look as follows: <packet version=”1.

.............. 475 Request Packet Structure A request XML packet retrieving domain limits descriptors includes the get-permitdescriptor operation node: <packet version=”1...5............... It specifies a filtering rule................... For details on descriptors...... 474 Response Samples ............... refer to the Representation of Object Descriptor (on page 47) section........ 472 Request Samples ............................... or the server-level domain limits descriptor........................................ The get-limit-descriptor node has the following graphical representation:  The filter node is required................... For details on limits of a domain.....................................0.... Request Samples The request packet retrieving limits descriptor for the domain with ID 5 looks as follows: <packet version ="1......................0...0"> <domain> <get-limit-descriptor> <filter> <id>5</id> </filter> </get-limit-descriptor> </domain> </packet> ... In this section: Request Packet Structure....472 Supported Operations Retrieving Descriptor of Limits Use the get-limit-descriptor operation to retrieve descriptor of domain limits........ For info on filters........................ refer to the Filters of Descriptors (on page 47) section................... refer to the Limits (on page 397) section..............5.........................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)............. Data type: domainFilterType (domain_input... 472 Response Packet Structure ........xsd).........

com and MySample.com domains looks as follows: <packet version ="1.0"> <domain> <get-limit-descriptor> <filter> <client_id>3</client_id> </filter> </get-limit-descriptor> </domain> </packet> .0.5.Supported Operations 473 The request packet retrieving limits descriptor for MyDomain.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.0.

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

It specifies the object descriptor. refer to Representation of Object Descriptor (on page 47). Note: This descriptor contains limits extensions.0. Response Samples A positive response from the server can look as follows: <packet version="1.5. Data type: string. For details. refer to the Extension of Limits Descriptor (see page 53) section. For details.Supported Operations 475  The descriptor node is optional.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> <type>int</type> <writable-by>admin</writable-by> <label>limit__max_wu</label> .0"> <domain> <get-limit-descriptor> <result> <status>ok</status> <filter-id>MyDomain.

476 Supported Operations <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> </property> <property> <name>max_maillists</name> .

0. the result is as follows: <packet version="1.Supported Operations <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> 477 If the domain specified in the request packet was not found on the server.com</filter-id> </result> </get-limit-descriptor> </domain> </packet> .5.0"> <domain> <get-limit-descriptor> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>MyDomain.

client_id........478 Supported Operations Retrieving Descriptor of Permissions Use the get-permission-descriptor operation to retrieve descriptor of domain administrator's permissions..... It specifies the domain name............... For details on descriptors.....     The id node is optional.......... 480 Request Packet Structure A request XML packet retrieving descriptor of domain administrator's permissions includes the get-permission-descriptor operation node: <packet version=”1............ Data type: string (UTF-8)........5. Data type: integer........................... It specifies the domain ID.......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............. refer to the Representation of Object Descriptor (on page 47) section............... The domain_name is optional............................ Data type: integer...... In this section: Request Packet Structure........ It specifies the client name............ domain_name and client_login parameters in one filter node......................... refer to the Filters of Descriptors (on page 47) section.......... It specifies the client ID............ Data type: domainFilterType (domain_input..... The client_id node is optional.............. For info on filters................... 479 Response Packet Structure ... Note: You can specify multiple id...... The get-permission-descriptor node has the following graphical representation:  The filter node is required....0... refer to the Permissions (on page 398) section..... The client_login is optional.... 480 Response Samples ..........................xsd)..................... 478 Request Samples . It specifies a filtering rule......... .. Data type: string............. For details on permissions of a domain administrator...............

com domains looks as follows: <packet version ="1.com and MySample.5.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.0"> <client> <get-limit-descriptor> <filter/> </get-limit-descriptor> </client> </packet> .0.5.0.5.0.Supported Operations 479 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> <id>5</id> </filter> </get-permission-descriptor> </domain> </packet> The request packet retrieving permissions descriptor for MyDomain.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.5.0.

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

<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.0.5.5.0"> <domain> <get-permission-descriptor> <result> <status>ok</status> <filter-id>MyDomain..Supported Operations 481 Response Samples A positive response from the server can look as follows: <packet version="1..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> . the result is as follows: <packet version="1.0.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> .

.................0.................... 484 Response Samples . 485 Request Packet Structure A request XML packet retrieving descriptor of hosting settings includes the get-physicalhosting-descriptor operation node: <packet version=”1................. refer to the Hosting Settings (on page 399) section..................... For details on descriptors...... ........ The getphysical-hosting-descriptor node has the following graphical representation:  The filter node is required......................482 Supported Operations Retrieving Descriptor of Hosting Settings Use the get-physical-hosting-descriptor operation to retrieve descriptor of domain hosting settings.. It specifies a filtering rule.........................................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................... 482 Request Samples .............................................. refer to the Representation of Object Descriptor (on page 47) section............. For info on filters.................. For details on hosting settings.xsd)..................................................... Data type: domainFilterType (domain_input......... refer to the Filters of Descriptors (on page 47) section..........................5. In this section: Request Packet Structure. 482 Response Packet Structure ....................

0.com domains looks as follows: <packet version ="1.Supported Operations 483 Request Samples The request packet retrieving descriptor of hosting settings for the domain with ID 5 looks as follows: <packet version ="1.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.0.0.0"> <client> <get-physical-hosting-descriptor> <filter/> </get-physical-hosting-descriptor> </client> </packet> .5.com and MySample.5.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.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.5.

484 Supported Operations Response Packet Structure The get-physical-hosting-descriptor node of the output XML packet is structured as follows: .

  Note: This descriptor contains hosting settings extensions. or client ID depending on a way of descriptor's specification in the request packet. Data type: string. client name.xsd). refer to the Extension of Hosting Settings Descriptor (on page 51) section. The status node is required. Can be used to return the error message if the getphysical-hosting-descriptor operation fails. This node is available in API RPC 1. It wraps the response retrieved from the server. Allowed values: ok | error.0 and later versions. The errcode node is optional. The descriptor node is optional. refer to the Filters of Descriptors (on page 48) section. The errtext node is optional. It is used to return the error code when the get-physicalhosting-descriptor operation fails.5. For info on filters. Data type: integer. Data type: anySimple.0. It specifies the object descriptor. refer to Representation of Object Descriptor (on page 47). Data type: ResultFilterType (plesk_common.Supported Operations 485      The result node is required. It specifies the execution status of the get-physicalhosting-descriptor operation.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> . It is required if the get-physical-hosting-descriptor operation succeeds. The filter-id node is optional. Returns the unique identifier of the domain. Data type: unsignedInt. Data type: string. Data type: string. For details.5.0"> <domain> <get-physical-hosting-descriptor> <result> <status>ok</status> <filter-id>MyDomain. The id node is optional. For details. Returns either domain name.0. domain ID. Response Samples A positive response from the server can look as follows: <packet version="1. It is required if the get-physical-hosting-descriptor operation succeeds.

.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> .486 Supported Operations </enum> <enum> <value>/bin/bash</value> <label>/bin/bash</label> </enum> .5. the result is as follows: <packet version="1. <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..0.

You can also use domain aliases to redirect mail and Java applications from the domain alias to your original domain name. Plesk Administrators can manage all domain aliases registered on Plesk server. domainalias_output.4. Supported operations . Tomcat (Java) redirection means that the Tomcat server set on the primary domain (port 9080) handles requests coming from domain aliases (from port 9080).0.0 and higher Plesk user: Plesk Administrator Description Domain Aliases are alternative names for the domain name.Supported Operations 487 Managing Domain Aliases Operator: <domain_alias> XML Schema: domainalias_input.xsd.5.xsd Plesk version: Plesk 7.6 Win | Unix 8.2. Note: The Tomcat support is provided from the 1.0 and later API RPC version: 1.4.0 version of API RPC.

........................................ In this section: Domain Alias Settings ... 511 Retrieving Information On Manageable Services ................ be sure to introduce the respective changes in the DNS zone of the domain alias..... 491 Creating Domain Aliases ............... or the primary domain ID............. too............................................................................................................. your domain alias will point to that mail server.................. 507 Renaming Domain Aliases .............................. name SET (see page 503) updates the alias settings for the alias specified by ID name............ you should set up domain forwarding......................... If you need to serve several domain names that point to a web site hosted on another server............................................. 492 Retrieving Information On Domain Aliases ............... 503 Deleting Domain Aliases ........................... This means that if your original domain points to an external mail server.............................. 489 Filtering Issues .................................. 497 Updating Domain Aliases Settings ........ to accept mail for the domain alias.................................................. resource records in its DNS zone are copied from the original domain name.........................488 Supported Operations       CREATE (see page 492) creates an alias for the specified domain GET (see page 497) retrieves the alias settings for the alias specified by ID name...................... However................. 514 ......... name DELETE (see page 507) removes the specified alias from the domain RENAME (see page 511) renames the alias related to the specified domain GET-SUPPORTED-SERVICES (see page 514) retrieves the list of domain alias supported services which can be managed on the server Remarks When you set up a domain alias.. Whenever you change mail exchange records in the domain DNS zone..................................... or the primary domain ID.. the external mail server should be configured accordingly..........

These settings can be set on creation of a domain alias.xsd). It has the following graphics representation:  The status node is optional. choose between the following options: (API RPC 1.0. To specify the alias form. it defines the alias form.0 and earlier versions) (API RPC 1. or read from the database. primary domain disabled)  The pref node is optional. Domain alias settings are defined by the settings node and presented by type Settings (plesk_domainalias. This node is used only in Plesk for Unix. It specifies the current status of the domain alias.5. or they can be set for this domain alias later. Data type: byte.0 and later versions) .Supported Operations 489 Domain Alias Settings This section describes settings that can be predefined for a domain alias. If specified.2.4. Allowed values:     0 (alias enabled) 1 (alias disabled) 2 (primary domain disabled) 3 (alias disabled.

0. This node is required in API RPC v.1.5.1. This node is used only in Plesk for Unix. Data type: boolean. It specifies the name (in ASCII) of the primary domain.4.0 (and later).2.0 version of API RPC.490 Supported Operations  The web node is used when you want to redirect web content from a domain alias to your original domain.0. be sure to call operation get-supported-services (see page 514) retrieving from server information on which of them are operable.     The manage-dns node is optional.0 (and earlier) and optional in API RPC v. Data type: string. 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). The name node is required. Data type: boolean. Data type: string. Data type: boolean.4.1. .0. The tomcat node is optional.4. Data type: integer. The full node is used when you want to create both web.xsd) is an extension of the Settings type. It defines if you can manage DNS zone for the domain alias. mail and tomcat aliases.5.0. It contains the following additional nodes:    The domain_id node is required.5. The ascii_name node is optional.0 (and later) Data type: boolean. AliasInfoType (plesk_domainalias.2.1. Note: Before performing any operations on domain alias settings.0 (and earlier) and optional in API RPC v.2. Tomcat redirection is supported from the 1. This node is required in API RPC v. Data type: none.1. The mail node is used when you want to redirect mail from a domain alias to your original domain. It specifies the id of the primary domain. This node is supported starting from API RPC v. It specifies the name (in Unicode) of the primary domain.

When created. It specifies the domain alias by id. the packet needs a special filter section structured as follows: The DomainAliasFilterType (domainalias_input. or primary domain name. it allows you to specify multiple domain aliases within one filter. It specifies the domain alias by name. The domain_id node is optional. a domain alias is given a unique identifier and a unique name. Data type: integer. primary domain id. Data type: integer.0"> <domain_alias> <get> <filter/> </get> </domain_alias></packet> .Supported Operations 491 Filtering Issues This section describes some peculiarities of domain alias filtering. It specifies the domain alias by name 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. which means that all domain aliases are selected. It specifies the domain alias by id of the primary domain.g. Data type: string (Unicode). The name node is optional.     The id node is optional. for the set or get operation). Data type: string (Unicode). name. The request XML filters domain aliases using a special filter section. the filter can be left empty.xsd) allows you to specify a domain alias either by id. to specify a domain alias (e.4.2. a packet that retrieves the information about all domain aliases looks as follows: <packet version="1. In addition. For example. Finally. The domain_name is optional. Note: Use <filter/> to update settings of all domain aliases on the server or delete all domain aliases from the server. Thus.

........... 494 Response Packet Structure ... Alias settings can be set using the set (see page 503) operation... it is enough to specify the domain ID and the domain name.......................... 497 Request Packet Structure A request XML packet creating a new domain alias in Plesk database includes the create operation node: <packet version="1.......................................................................................................................4.............. To create a domain alias.......492 Supported Operations Creating Domain Aliases Only Plesk Administrator can create domain aliases via API RPC................. 492 Request Samples ................. 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................................ use the get-supported-services (see page 514) operation. To get information on which domain alias settings can be set on a particular server............................ 496 Response Samples ................... In this section: Request Packet Structure.................................................0"> <domain_alias > <create> … </create> </domain_alias> </packet> ....2.......

   The domain_id node is required. The manage-dns node is optional. It specifies the name of the primary domain. Its graphical representation is as follows:  The status node is optional. Data type: string. see the Domain Alias Settings (see page 489) section. Data type: string (Unicode). It specifies the name of the primary domain. The name node is required.5. Remarks The ascii-name node is supported by API RPC 1. Data type: none.xsd). It specifies preferences of a domain alias. . The pref node is optional. Data type: integer. Allowed values: ok | error. For more information.4. see the Domain Alias Settings (see page 489) section. It specifies the id of the primary domain. Data type: string (ASCII). For more information.0.2. It specifies the status of a domain alias.0 and later versions.Supported Operations 493 The create node is presented by the AliasInfoType type (plesk_domainalias. It defines if you can manage DNS zone for the domain alias.   Note: This node is supported starting from API RPC v.0. Data type: boolean. The ascii-name node is optional.1.

0"> <domain_alias> <create> <domain_id>12</domain_id> <name>myalias.2. specify the ID of the primary domain (the alias will be linked to) and name of the alias.com</name> </create> </domain_alias> </packet> Creating multiple domain aliases To create two domain aliases with a single packet. <packet version="1.com</name> </create> <create> <domain_id>12</domain_id> <name>MySecondAlias.4.com</name> </create> </domain_alias> </packet> .4.0"> <domain_alias> <create> <domain_id>12</domain_id> <name>MyAlias.494 Supported Operations Request Samples Creating a single domain alias To create a domain alias. include two different create operations: <packet version="1.2.

DisWebMaillAlias is disabled because the primary domain (ID 12) is disabled and has both mail.com</name> </create> </domain_alias> </packet> .4.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.2.0"> <domain_alias> <create> <status>1</status> <domain_id>12</domain_id> <name>DisabledAlias. <packet version="1. The alias settings are as follows:    DisabledAlias is disabled. EnabledWebOnlyAlias is enabled and has only web content redirection. web and tomcat redirection.Supported Operations 495 Alias settings The following packet creates three domain aliases to the domain with ID 12.com</name> </create> <create> <status>2</status> <pref> <full/> </pref> <domain_id>12</domain_id> <name>DisWebMailAlias.

Can be used to return the error message if the create operation fails. The status node is required. Data type: unsignedInt. It wraps the response retrieved from the server. Returns the unique identifier of the domain alias just added to Plesk.5.1. It returns the ID of the domain alias.0. Data type: AliasResultType (domainalias_output. The name node is optional. The errtext node is optional. Allowed values: ok | error. This node is absent starting from API RPC v. Data type: string.0. It specifies the execution status of the create operation.xsd). Data type: string. The errcode node is optional. Data type: integer. It is used to return the error code when the create operation fails.  . Data type: string. it is required if the create operation has succeeded.496 Supported Operations Response Packet Structure The create node of the output XML packet is structured as follows:      The result node is required. The id node is optional. It does not hold any value for this operation.

............501 ......498 Request Samples ...........................2..................</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 In this section: Request Packet Structure ..................................500 Response Samples .............2........Supported Operations 497 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........0"> <domain_alias> <create> <result> <status>ok</status> <id>34</id> </result> </create> </domain_alias> </packet> A negative response can look as follows: <packet version="1.....................498 Response Packet Structure ..........................................................................0"> <domain_alias> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed............................4.......................................................................4...................................

2.0"> <domain_alias > <get> … </get> </domain_alias> </packet> The get node graphical representation is as follows:  The filter node is required. The name node is optional. Data type: integer. The domain_name is optional.xsd).4. It specifies the domain alias by ID of the primary domain.0 and later versions.498 Supported Operations Request Packet Structure A request XML packet retrieving a domain alias settings from Plesk database includes the get operation node: <packet version="1. The domain_id node is optional. It specifies the domain alias by name. It specifies the filtering rule. Data type: string (Unicode).     Note: You can create filtering rules for multiple domain_id and domain_name parameters in API RPC 1. Data type: domainAliasFilterType (domainalias_input.2. Data type: integer. refer to the Filtering Issues (see page 491) section. It specifies the domain alias by id. The id node is optional.4. . Data type: string (Unicode). It specifies the domain alias by name of the primary domain. In the elder versions of API RPC you can use only one domain_id or domain_name in a single filter. For information on filters.

com</name> </filter> </get> </domain_alias> </packet> Retrieving settings of multiple domain aliases This packet retrieves preferences of the domain aliases called MyAlias.com and MySecondAlias. <packet version="1.com</name> <name>MySecondAlias.0"> <domain_alias> <get> <filter> <name>MyAlias.4.4.4.0"> <domain_alias> <get> <filter> <name>MyAlias.4. <packet version="1.Supported Operations 499 Request Samples Retrieving settings of a single domain alias This packet retrieves preferences of the domain alias called MyAlias.com</name> </filter> </get> </domain_alias> </packet> The following packet is wrong because both name and domain_id are used for identification.com.0"> <domain_alias> <get> <filter/> </get> </domain_alias></packet> .com</name> <domain_id>12</domain_id> </filter> </get> </domain_alias> </packet> This packet retrieves preferences of all domain aliases on the server. <packet version="1.2.com. <packet version="1.2.0"> <domain_alias> <get> <filter> <name>MyAlias.2.2.

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

com</name> <info> <prefs> <web>true</web> <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryForThisAlias.com</name> </result> </get> </domain_alias> </packet> .Supported Operations 501 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.4.com</name> <ascii-name>PrimaryForThisAlias.4.0"> <domain_alias> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain alias does not exist</errtext> <name>MyAlias.com).2. the negative response can look as follows: <packet version="1.0"> <domain_alias> <get> <result> <status>ok</status> <id>34</id> <name>MyAlias.2.com</ascii-name> </info> </result> </get> </domain_alias> </packet> If a request packet tried to retrieve settings of the non-existent domain alias (MyAlias.

4.2.com</name> <info> <prefs> <web>false</web> <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryDomain.502 Supported Operations Retrieving settings of multiple domain alias A possible request packet is: <packet version="1.com</domain_name> </filter> </get> </domain_alias> </packet> A possible negative response got from the server is (the domain name does not exist on the server): <packet version="1.4.2.2.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.0"> <domain_alias> <get> <result> <status>ok</status> <id>124</id> <name>MyAlias.com</ascii-name> </info> </result> <result> <status>ok</status> <id>127</id> <name>My2Alias.com</name> <ascii-name>PrimaryDomain.com</name> <info> <prefs> <web>true</web> .0"> <domain_alias> <get> <filter> <domain_name>PrimaryDomain.4.

......Supported Operations <mail>false</mail> <tomcat>false</tomcat> </prefs> <domain_id>3</domain_id> <name>PrimaryDomain............ refer to the Filtering Issues (see page 491) section........................... You can update all settings of a domain alias in bulk or specify some particular settings....................................... Data type: DomainAliasFilterType (domainalias_input.com</ascii-name> </info> </result> </get> </domain_alias> </packet> 503 Updating Domain Aliases Settings The set operation is used to update settings of domain aliases stored in Plesk database..... 505 Response Samples .......................com</name> <ascii-name>PrimaryDomain. 503 Request Samples ...............xsd) ...................................................... use the get-supported-services (see page 514) operation... To get information on which domain alias settings can be updated on a particular server............. In this section: Request Packet Structure...................... 506 Request Packet Structure A request XML packet changing the domain alias settings in the Plesk database includes the set operation node: <packet version="1.................................. For more information visit the Domain Alias Settings (see page 489) section............................. For more information.... 504 Response Packet Structure ..............2.................... </set> </domain_alias> </packet> The set node graphical representation is as follows:  The filter node specifies which domain aliases will be affected........0"> <domain_alias> <set> ................................4..

Data type: Settings (plesk_domainalias.4.0"> <domain_alias> <set> <filter> <domain_name>MyPrimary.com and the primary domain.com.504 Supported Operations  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.0"> <domain_alias> <set> <filter> <name>MyAlias. <packet version="1. Mail and Tomcat references between MyAlias.com</domain_name> </filter> <settings> <pref> <web>1</web> <mail>0</mail> <tomcat>0</tomcat> </pref> </settings> </set> </domain_alias> </packet> . For more information.com</name> </filter> <settings> <pref> <full/> </pref> </settings> </set> </domain_alias> </packet> Updating settings of multiple domain aliases This packet switches off mail redirection from domain aliases to the primary domain MyPrimary. <packet version="1. please refer to the Domain Alias Settings (see page 489) section.2.4.2.

Data type: string.  . Data type: string. Note: In API RPC v. it is required if the alias id was specified in the request packet. Data type: integer.0 and earlier.xsd). It wraps the response retrieved from the server. The errcode node is optional.4. It returns the error code when the set operation fails. The id node is optional.Supported Operations 505 Response Packet Structure The set node of the output XML packet is structured as follows:      The result node is required. response packets contain the name node instead of the filter-id node. It is required if the operation succeeds. It returns the error message if the set operation fails. Allowed values: ok | error. It returns a filtering rule parameter.  The name node is optional. For more information.1. Data type:anySimple. Data type: string. Data type: resultFilterType (common. The filter-id node is optional. The node holds the primary domain name or alias name depending on the name specified in the request packet. It returns the domain alias ID. The status node is required. Data type: unsignedInt.2. Specifies the execution status of the set operation. The errtext node is optional. refer to the Filtering Issues section.

4.2.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: <packet version="1.com</name> </result> </set> </domain_alias> </packet> If a request packet tries to apply settings to a non-existent domain alias (id = 13).2.0"> <domain_alias> <set> <filter> <domain_name>MyPrimary.4.506 Supported Operations 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. a negative response will look as follows: <packet version="1.com</domain_name> </filter> <settings> <pref> <full/> </pref> </settings> </set> </domain_alias> </packet> .2.4.0"> <domain_alias> <set> <result> <status>ok</status> <name>MyAlias.

2.com</name> </result> <result> <status>ok</status> <id>101</id> <name>MyPrimary.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> </set> </domain_alias> </packet> .0"> <domain_alias> <set> <result> <status>ok</status> <id>100</id> <name>MyPrimary.2.Supported Operations 507 A possible negative response from the server looks as follows: <packet version="1.4.4.

................. refer to the Filtering Issues (see page 491) section. 509 Response Packet Structure ................... 511 Request Packet Structure A request XML packet removing the domain aliases from Plesk database includes the delete operation node: <packet version="1........... Data type: DomainAliasFilterType (domainalias_input................. </delete> </domain_alias> </packet> The delete node graphical representation is as follows:  The filter node specifies the filtering rule............0"> <domain_alias> <delete> .......... In this section: Request Packet Structure.................................................................................................. 508 Request Samples ..............................................508 Supported Operations Deleting Domain Aliases Use the delete operation to remove a specified domain alias from Plesk database............................................................. 510 Response Samples ................4......... For information on filters.......................2......xsd) ............

com and My2Primary.0"> <domain_alias> <delete> <filter> <domain_name>MyPrimary.com</domain_name> </filter> </delete> </domain_alias> </packet> This packet removes all domain aliases from all domains on the server. <packet version="1.com.0"> <domain_alias> <delete> <filter/> </delete> </domain_alias> </packet> .2.2.com</name> </filter> </delete> </domain_alias> </packet> Deleting multiple domain aliases This packet deletes all domain aliases from the primary domains MyPrimary.com</domain_name> <domain_name>My2Primary.4.2.4.4. <packet version="1.0"> <domain_alias> <delete> <filter> <name>MyAlias.com alias: <packet version="1.Supported Operations 509 Request Samples Deleting a single domain alias This packet deletes the MyAlias.

2. Can be used to return the error message if the delete operation fails. It returns the error code when the delete operation fails. Allowed values: ok | error.0 and earlier.4. Data type: unsignedInt. It wraps the response retrieved from the server. Data type: string.1. It is present if the operation succeeds. It returns the domain alias ID. The filter-id node is optional. The node returns the domain alias name. The errcode node is optional. Data type: resultFilterType (common. refer to the Filtering Issues section. Data type: integer. it is required if the operation delete succeeds. The status node is required. It specifies the execution status of the delete operation. It returns a filtering rule parameter. Data type:anySimple.xsd). The errtext node is optional.  The id node is optional. For more information.510 Supported Operations Response Packet Structure The delete node of the output XML packet is structured as follows:      The result node is required. Data type: string. response packets contain the name node instead of the filter-id node. Note: In API RPC v. The name node is optional. Data type: string. .

com</name> </result> </delete> </domain_alias> </packet> A negative response from the server can look as follows: <packet version="1.0"> <domain_alias> <delete> <result> <status>error</status> <errcode>1013</errcode> <errtext>Domain does not exist</errtext> <name>MyAlias.4.2.com</name> </result> <result> <status>ok</status> <id>14</id> <name>My2Alias.4.Supported Operations 511 Response Samples Deleting a single domain alias The request packet looks as follows: <packet version="1.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.com</name> </result> </delete> </domain_alias> </packet> .0"> <domain_alias> <delete> <result> <status>ok</status> <id>13</id> <name>MyAlias.4.2.

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

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

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

2.4. showing that all 3 services . looks like: <packet version="1.1.can be enabled/ disabled for domain aliases on the server.can be enabled/ disabled for domain aliases on the server. Note: This operation appears in Plesk XML API v.0"> <domain_alias> <get-supported-services> <result> <status>ok</status> <service>web</service> <service>mail</service> </result> </get-supported-services> </domain_alias> </packet> .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.Web.0"> <domain_alias> <get-supported-services/> </domain_alias> </packet> Response Samples Response from server that runs Plesk for Unix.4.Supported Operations 515 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. showing that only 2 services . Mail and Tomcat . looks like: <packet version="1. Request Sample The following XML packet requests which domain alias services can be managed on the server: <packet version="1.Web and Mail .2. 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.0 and is not supported in previous versions.2.4.4.2.

4. 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 517) section for details.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.0 for UNIX | Plesk 7. . Settings Domain templates are used to fix a definite collection of domain settings and apply these settings to domains created using these domain templates. and other preferences.xsd Plesk version: Plesk 8.1.516 Supported Operations Managing Domain Templates Operator: <domain-template> XML Schema: domain_template. limits. Supported operations   ADD (see page 523) creates a domain template and to add it to the list of domain templates for a certain user. GET (see page 532) gets the information on the specified domain template(s) from the server.6 for Windows and higher API RPC version: 1.

........... 522 Creating Domain Template...............521 .........................................................520 Performance Settings ............................. permissions and hosting settings (on page 397) Preferences (see page 520) Log rotation settings (see page 519) Domain performance settings (see page 521) In this section: Mailing Settings ............... 539 Deleting Domain Template .................... or read from the database...................519 Preferences ......................................................................Supported Operations 517   DEL (see page 549) deletes the specified domain template (or several)............................................................................................. These settings are as follows:      Mailing settings (see page 518) Limits.................................................................. 549 Domain Template Settings This section describes a collection of domain settings that can be predefined in a domain template.............................. 517 Filtering Issues ...................518 Log Rotation Settings..................................................... In this section: Domain Template Settings ............................................ SET (see page 539) sets new settings to the specified domain template.................. 532 Configuring Domain Template Settings ...................................................................................................................................... 523 Getting Information On Domain Templates .......................................... These settings can be set for a domain being created................................................................................................. or they can be set for this domain later.......

Data type: string. This node is presented by type MailPreferences (plesk_mailname. Data type: string. Data type: boolean.xsd).     . Data type: no. If specified. The forward node specifies the email addresses to which undelivered mail should be forwarded. The reject node is used to reject such email messages (they will not be accepted by the mail server). The webmail node is optional.518 Supported Operations Mailing Settings Mailing settings are defined in the domain template by the mail node. choose between the following three options: The bounce node is used to modify the default rejection message. it is used to collect and handle email messages sent to users not registered on the domain. such messages are sent back to the sender with a message: ―this address no longer accepts mail‖. To specify the handling method. By default. It has the following graphics model:  The nonexistent-user node is optional. It specifies whether mail users will be able to read mail through the WebMail application.

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

The log-email node is optional.6. Data type: integer. Data type: string. Note: In API RPC 1. This node is specified by complex type DomainTemplatePreferencesType (domain_templates.5. Supported since protocol version 1. The dns_zone_type node is optional.xsd). It indicates whether other Plesk users have access to this template. The log-compress node is optional. Allowed values: master | slave. The shared node is optional.xsd). Specifies the email address to which the handled log file can be sent.0. The maillists node is optional. Enables/disables log file compression. Data type: Boolean. Specifies the maximal number of handled log files belonging to the domain that can be stored on the server. Data type: Boolean. Specify this option only for domain templates created by Plesk Administrator.520 Supported Operations    The log-max-num-files node is optional. Specifies the type of DNS zone for a domain created using this domain template. Enables/disables the use of mailing lists on a domain created using this domain template. It is structured as follows:    The stat node is optional. Data type: integer.0 and earlier versions. the type of this node is emailType (common. Data type: ZoneType (string). Preferences Domain preferences set in the domain template are defined by the preferences node.  .0. Data type: boolean. Specifies the number of months for which the traffic statistics should be kept for a domain.0.

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. the bandwidth is unlimited.123</ip_address> </gen_setup> <performance> <bandwidth>1000</bandwidth> <max_connections>-1</max_connections> </performance> </add> </domain-template> </packet> .123.2. If set to -1.4.2.123. This node is specified by complex type DomainPerformanceType (plesk_domain. Data type: integer.0”> <domain-template> <add> <name>base_template</name> <gen_setup> <name>newdomain. It restricts the network use by the specified value (Kb/sec) for the domain created using this domain template. If set to -1. It restricts the number of connections by the specified value for the domain created using this domain template.0 and later.Supported Operations 521 Performance Settings Performance settings are defined by the performance node. The max_connections node is optional.  Note: Domain performance settings are supported in domain templates by API RPC 1. This type is structured as follows:  The bandwidth node is optional.com</name> <client_id>1234</client_id> <ip_address>123. the number of connections is unlimited.4.xsd).

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

domain templates are searched in the administrator‘s repository by default.2. which means that all domain templates are selected: <packet version=”1.2. When created by Plesk Administrator for own needs.Supported Operations 523 Finally.4. When created for a certain Plesk client. the filter can be left empty. Use the client-id or client-login node for this purpose: <packet version=”1. Since all operations on domain templates are allowed to Plesk Administrator only.4. you need to identify this client in the request packet. a domain template gets to the administrator‘s template repository. a domain template is added to the template repository of this client.0”> <domain-template> <get> <filter/> </get> </domain-template> </packet> Another important issue is the ownership of domain templates. Domain templates are searched in the template repository of the current user.0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <client-login>tecnhnolux</client-login> </get> </domain-template> </packet> . To filter some domain template that belongs to a certain client.

.................524 Supported Operations Creating Domain Template A domain template can be created by Plesk Administrator for own needs or for a Plesk client.................. 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 a domain administrator home page. 527 Response Packet Structure ......................................... In this section: Request Packet Structure......................... it is enough to specify the template name................................................................................ In addition... 531 Response Samples ......... 525 Request Samples ......... you also need to specify the client ID or client login................... When creating a domain template.............................................. If this domain template is created for Plesk client...... 532 ................ You can specify domain settings when creating a domain template or later (they can be set using the set operation).......................................... A domain template can include them all or just some of them........................

0.xsd).0. It specifies the domain template owner name. Data type: string. Data type: string.   ..0. Its graphical representation is as follows:   The name node is required. Use owner-id node instead..6.0.0.1. The client_id node is optional.0”> <domain-template> <add> … </add> </domain-template> </packet> The add node is presented by type DomainTemplateAddInputType (domain_template.4. Data type: integer. Use ownerlogin node instead. Data type: integer. This node is not supported since protocol version 1.Supported Operations 525 Request Packet Structure A request XML packet adding a new domain template to Plesk database includes the add operation node: <packet version=”1. The client-login node is optional.0. It specifies the domain template owner ID. It specifies the name of the domain template.6.6. The owner-id node is optional. It specifies the ID of the domain template owner. Data type: integer. The node is supported since protocol version 1. This node is not supported since protocol version 1.

Data type: string.xsd). Data type: LogRotationType (domain_template.xsd). Data type: DomainPerformanceType (plesk_domain.0. Data type: DomainTemplatePreferecesType (domain_template. It specifies performance settings for new domains created using this domain template. This feature is supported by API RPC 1. See the structure of this node in the Mailing settings (see page 518) section.  The preferences node is optional. It specifies a collection of email preferences that will be assigned to a new domain created using this template.xsd).xsd). It specifies a collection of limits that will be set for new domains created using this template. Data type: DomainTemplatePHostingPreferences (domain_template.6.2. Specifies physical hosting settings for new domains created using this template.  The performance node is optional. See the structure of this node in the Hosting Settings (on page 397) section.xsd).  The limits node is optional.0 and later.0. The node is supported since protocol version 1. See the structure of this node in the Preferences (see page 520) section. Data type: domainLimits (plesk_domain.4.xsd). It is used to turn on/off rotation of log files related to a domain created using this template. It specifies the login name of the domain template owner. .526 Supported Operations  The owner-login node is optional. See the structure of this node in the Log Rotation Settings (see page 519) section.  The hosting node is optional. See the structure of this node in the Performance Settings (see page 521) section. See the structure of this node in the Limits (on page 397) section.  The log-rotation node is optional.  The mail node is optional. It is used to specify a collection of preferences for new domains created using this template. Data type: MailPreferences (plesk_mailname.

specify this user either by ID. <packet version=”1.6.6. nodes owner-id and ownerlogin are not used: <packet version=”1.0.0”> <domain-template> <add> <name>base_template</name> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> .0.Supported Operations 527 Request Samples Creating domain templates for different Plesk users To create a domain template for a certain Plesk user.0”> <domain-template> <add> <name>base_template</name> <owner-id>12</owner-id> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> Or: <packet version=”1.2. or by login (both are unique in Plesk).4.0”> <domain-template> <add> <name>base_template</name> <owner-login>JDoe</owner-login> <mail> <webmail>true</webmail> </mail> </add> </domain-template> </packet> When creating a domain template for Plesk Administrator.

4.4.co.</bounce> </nonexistent-user> </mail> </add> <add> <name>forward_template</name> <mail> <nonexistent-user> <forward>spam@technolux.2.528 Supported Operations Creating multiple domain templates To create two domain templates with a single packet.uk</forward> </nonexistent-user> </mail> </add> <add> <name>reject_template</name> . include two different add blocks: <packet version=”1.2.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.0”> <domain-template> <add> <name>bounce_template</name> <mail> <webmail>true</webmail> <nonexistent-user> <bounce>Email address does not exist. 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.

allows the storage of up to 30 handled log files related to this domain.2.Supported Operations <mail> <nonexistent-user> <reject/> </nonexistent-user> </mail> </add> </domain-template> </packet> 529 Log rotation To disable log rotation on a domain created using the specified template.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> .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.4.2. use the following packet: <packet version=”1. and removes active log files related to this domain from logging once a week: <packet version=”1.4.

2. <packet version=”1. <packet version=”1.4.4.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.2.530 Supported Operations Preferences The following packet creates a domain template and specifies preferences for domains created on its basis.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> .

xsd). <packet version=”1. . It wraps the response got from the server. Returns the error message if the add operation fails. The errtext node is optional. Data type: integer. Returns the unique identifier of the domain template just added to Plesk. Data type: resultType (common. Data type: string. Returns the error code when the add operation fails.0”> <domain-template> <add> <name>base_template</name> <performance> <bandwidth>1000</bandwidth> <max_connections>20</max_connections> </performance> </add> </domain-template> </packet> Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. Allowed values: ok | error.4. The errcode node is optional. Data type: string.2. It is required if the add operation has succeeded. Data type: unsignedInt. Specifies the execution status of the add operation.Supported Operations 531 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. The id node is optional. The status node is required.

you cannot retrieve only hosting settings.0”> <domain-template> <add> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. . For instance. and so on.2.</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. You cannot request for a definite item of the above list.4. 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.0”> <domain-template> <add> <result> <status>ok</status> <id>2435</id> </result> </add> </domain-template> </packet> A negative response can look as follows: <packet version=”1.4. only preferences.532 Supported Operations Response Samples A positive response got from the server after adding a new domain template can look as follows: <packet version=”1.2.

............... Data type: DomainTemplateFilterType (domain_template...1 and earlier versions and you request info on domain templates owned by a reseller using get................. In this section: Request Packet Structure.............................................. It serves to specify the criteria by which the necessary domain templates will be selected from the database............ Note: If you interact with Plesk 9 through API RPC 1.................. The get operation will return only the settings currently stored in the database................... Plesk will return info on only reseller's personal domain templates excluding those owned by the reseller's clients... 536 Response Samples .5.. Its graphical representation is as follows:  The filter node is required....2...................0”> <domain-template> <get> … </get> </domain-template> </packet> The get node is presented by type DomainTemplateGetInputType (domain_template........2...................Supported Operations 533 All settings are optional and can be missing................... specify artificial client account login name in the filtering rule......................................... 534 Response Packet Structure .............xsd)...... A domain template can even be empty (specified by its ID and name and not containing any other information).......4............xsd)............. ... To retrieve info on domain templates owned by Plesk Administrator... 533 Request Samples ... 538 Request Packet Structure A request XML packet getting information about the specified domain templates includes the get operation node: <packet version=”1............................................................

This node is not supported since protocol version 1.0.0”> <domain-template> <get> <filter> <client_login>admin</client_login> </filter> </get> </domain-template> </packet> Getting domain templates that belong to different Plesk user To get the information about a domain template that belongs to some Plesk client.0. Data type: integer.6.6.2. Data type: integer.0.    Request Samples If you work in Plesk 9 backward compatibility mode.0. It specifies the domain template owner name.534 Supported Operations    The name node is optional. The client_id node is optional. Data type: integer. the following packet will request info on all domain templates owned by Plesk Administrator: <packet version=”1. It specifies the ID of the domain template owner.0. The node is supported since protocol version 1. <packet version=”1. The id node is optional. or by login.5.0..0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <owner-login>JDoe</owner-login> </get> </domain-template> </packet> ..0. The owner-login node is optional. specify Plesk client either by ID. Data type: integer.6. It specifies the login name of the domain template owner. It specifies the unique identifier of domain template to be selected. The node is supported since protocol version 1. The client-login node is optional.0. Data type: string. Use ownerlogin node instead.6. It specifies the domain template owner ID.6. Data type: string. Use owner-id node instead.0. This node is not supported since protocol version 1. The owner-id node is optional. Data type: string. It specifies the names of the domain templates to be selected.

2.2.2.4.4.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.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.Supported Operations 535 The following packet retrieves the same information using Plesk reseller ID: <packet version=”1. all specified either by ID or by the template name.2. use the following packet: <packet version=”1.0”> <domain-template> <get> <filter> <name>base_template</name> </filter> <owner-id>1234</owner-id> </get> </domain-template> </packet> To retrieve information about a domain template that belongs to Plesk Administrator.4.0”> <domain-template> <get> <filter> <name>base_template</name> <id>12</id> </filter> </get> </domain-template> </packet> . <packet version=”1.4.

2.4.536 Supported Operations The following packet gets the information about all domain templates that belong to a definite Plesk client: <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: .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.

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

0.6.0.0”> <domain-template> <get> <filter> <id>11</id> <id>12</id> </filter> <owner-login>tecnhnolux</owner-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.538 Supported Operations Response Samples The request packet sent to Plesk is 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> .6.

..............6... Filtering domain templates is made either by the domain template identifier.................. In this section: Request Packet Structure..........................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.... 541 Response Packet Structure ......................... 540 Request Samples ........ Also....................................................................................................................... or by the domain template name...0............. Proceed to the Filtering Issues (see page 522)topic for details.......... while the quick_template domain template holds the limits and hosting settings............... 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..........</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.......... 547 Response Samples .............................. the same packet can handle domain templates and templates belonging to different Plesk users......... A negative response can look as follows: <packet version=”1......Supported Operations 539 The base_template domain template holds the mailing settings only...... 548 ...............................

. Data type: string.0. Data type: integer.6.      .6.540 Supported Operations Request Packet Structure A request XML packet adjusting domain template settings includes the set operation node: <packet version=”1.0. The client_id node is optional. Its graphical representation is as follows:  The filter node is required.0”> <domain-template> <set> … </set> </domain-template> </packet> The set node is presented by type DomainTemplateSetInputType (domain_template.4. It specifies the unique identifiers of domain templates to be updated. Use ownerlogin node instead. It serves to specify the criteria by which domain templates will be updated in the database. Data type: integer. Data type: integer.xsd). It specifies the domain template owner name. The owner-id node is optional. Data type: DomainTemplateFilterType (domain_template.0. It specifies the names of domain templates to be updated.0. The id node is optional. Use owner-id node instead.0. Data type: string. The name node is optional. This node is not supported since protocol version 1.0. The client-login node is optional.xsd). It specifies the domain template owner ID.2. The node is supported since protocol version 1. This node is not supported since protocol version 1. Data type: integer.6.. It specifies the ID of the domain template owner.

See the structure of this node in the Mailing settings (see page 518) section.xsd). It sets a collection of email preferences that will be updated for the specified domain templates.      Request Samples Update domain templates that belong to different Plesk user To update settings of a domain template that belongs to a Plesk user. The preferences node is optional. Data type: domainLimits complex type (plesk_domain. Sets physical hosting settings for the specified domain templates. The log-rotation node is optional. See the structure of this node in the Preferences (see page 520)section. See the structure of this node in the Hosting settings (on page 397) section.6. Data type: string. The limits node is optional. Data type: MailPreferences complex type (plesk_mailname.xsd).xsd).0. The node is supported since protocol version 1.2.Supported Operations 541   The owner-login node is optional. specify his ID.xsd). This node is supported by API RPC 1.xsd).0. Data type: DomainPerformanceType (plesk_domain.4.0”> <domain-template> <set> <filter> <name>base_template</name> </filter> <owner-login>JDoe</owner-login> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> . Data type: DomainTemplatePhosting (domain_template. It sets a collection of log file rotation settings for the specified domain templates.0. See the structure of this node in the Performance settings (see page 521) section. Data type: LogRotationType complex type (domain_template.0 and later. <packet version=”1.6. It specifies the login name of the domain template owner.xsd). See the structure of this node in the Log rotation settings (see page 519)section. It sets a collection of limits that will be updated for the specified domain templates. The performance node is optional. See the structure of this node in the Limits (on page 397) section. Data type: DomainTemplatePreferecesType complex type (domain_template. Sets domain performance settings to the specified domains. It sets a collection of preferences for the specified domain templates. The hosting node is optional. The mail node is optional. or by login.

both specified by ID.0.0”> <domain-template> <set> <filter> <id>11</id> <id>12</id> </filter> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> .0. do not specify nodes owner-id and owner-login: <packet version=”1.0”> <domain-template> <set> <filter> <name>base_template</name> </filter> <owner-id>1234</owner-id> <mail> <webmail>true</webmail> </mail> </set> </domain-template> </packet> To update settings of a domain template that belongs to Plesk Administrator.542 Supported Operations Another example is: <packet version=”1.6.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.6.6.0. <packet version=”1.

0.0”> <domain-template> <set> <filter/> <mail> <webmail>false</webmail> </mail> </set></domain-template> </packet> .Supported Operations 543 To set different settings for two domain templates.0”> <domain-template> <set> <filter> <id>12</id> </filter> <owner-login>JDoe</owner-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 a Plesk client: <packet version=”1.0. use two different set operations: <packet version=”1.6.6.6.0”> <domain-template> <set> <filter/> <owner-login>JDoe</owner-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.0.

0.</bounce> </nonexistent-user> </mail> </set> <set> <filter> <name>forward_template</name> </filter> <mail> <nonexistent-user> <forward>spam@technolux.co.0”> <domain-template> <set> <filter> <name>bounce_template</name> </filter> <mail> <webmail>true</webmail> <nonexistent-user> <bounce>Email address you specified does not exist.6. The new mailing settings are as follows:  bounce_template allows email users to access the email service of Plesk (the WebMail application) and edit 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.544 Supported Operations Mailing settings The following packet updates mailing settings of three domain templates that belong to Plesk Administrator.uk</forward> </nonexistent-user> </mail> </set> <set> <filter> <name>reject_template</name> </filter> <mail> <nonexistent-user> <reject/> </nonexistent-user> </mail> </set> </domain-template> </packet> .

6.6.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> . allows the storage of up to 30 handled log files related to this domain.0.6. use the following packet: <packet version=”1.Supported Operations 545 Setting limits <packet version=”1.0.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.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. and removes active log files related to this domain from logging once a week: <packet version=”1.0.

546 Supported Operations Preferences The following packet specifies preferences for a domain template: <packet version=”1.0.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> .0.6.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.6. <packet version=”1.

The status node is required.Supported Operations 547 Hosting Here is the sample packet that sets domain performance settings to a domain template under Plesk client permissions. <packet version=”1. Returns the error code. The errcode node is optional. .xsd). In all other cases it holds the identifier of the domain template (if this id was specified in the request packet). If the request packet fails before the execution. Returns the error message. Allowed values: ok | error. this node is missing in the response packet. Data type: string. It wraps the result of the set operation for a single domain template. Data type: integer.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.2. Data type: resultType (common. Specifies the execution status of the set operation. The id node is optional.4. Data type: unsignedInt. Is required if the set operation fails. Data type: string. Can be returned if the set operation fails. The errtext node is optional.

4. Response Samples A request packet sent to Plesk server can look as follows: <packet version=”1.4.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. In all other cases it holds the name of the domain template (if this name was specified in the request packet).0”> <domain-template> <set> <result> <status>ok</status> <id>11</id> </result> <result> <status>ok</status> <id>12</id> </result> </set> </domain-template> </packet> . Data type: string. If the request packet fails before the execution. A positive response is sent back if the requested operation succeeds: <packet version=”1.2. this node is missing in the response packet.2.548 Supported Operations  The name node is optional.

........................Supported Operations 549 A negative response is returned if any domain template failed to be updated: <packet version=”1............4. A domain template can be deleted Plesk Administrator only............... 551 Response Packet Structure ..................0”> <domain-template> <set> <result> <status>ok</status> <id>11</id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed............... 554 Request Packet Structure A request XML packet deleting domain templates from Plesk database includes the del operation node: <packet version=”1..............0”> <domain-template> <del> … </del> </domain-template> </packet> ............................................................................... 549 Request Samples ................ In this section: Request Packet Structure..2........................................4.............................................. 553 Response Samples ..................</errtext> <id>12</id> </result> </set> </domain-template> </packet> Deleting Domain Template The del operation is used to remove domain templates................................................2........

Data type: string. Data type: integer. see the Filtering Issues section (see page 522). The node is supported since protocol version 1.0.6. For details on the criteria. Data type: integer. Data type: integer.550 Supported Operations The del node is presented by type DomainTemplateAddInputType (domain_template.0. It specifies the ID of the domain template owner..0.0. Data type: DomainTemplateFilterType (domain_template. The owner-id node is optional.0. The client_id node is optional. It specifies the domain template owner name. It specifies the login name of the domain template owner.0. Use ownerlogin node instead. The node is supported since protocol version 1. Use owner-id node instead.6.0.xsd). Its graphical representation is as follows:  The filter node is required. The client-login node is optional.     .0.6.6. The owner-login node is optional. This node is not supported since protocol version 1. It specifies the domain template owner ID. Data type: string.xsd). This node is not supported since protocol version 1. It serves to specify the criteria by which the necessary domain templates will be deleted from the database.

do not specify nodes owner-id and owner-login: <packet version=”1.6.0”> <domain-template> <del> <filter> <name>base_template</name> </filter> <owner-id>1234</owner-id> </del> </domain-template> </packet> To delete a domain template that belongs to Plesk Administrator. or login.0.6.0.0”> <domain-template> <del> <filter> <name>base_template</name> </filter> <owner-login>JDoe</owner-login> </del> </domain-template> </packet> The following packet specifies a Plesk user by ID: <packet version=”1. specify the user ID.0”> <domain-template> <del> <filter> <name>base_template</name> </filter> </del> </domain-template> </packet> .6.Supported Operations 551 Request Samples Deleting domain templates that belong to different Plesk user To delete a domain template that belongs to a certain Plesk user. <packet version=”1.0.

use a separate del operation for each: <packet version=”1.0”> <domain-template> <del> <filter> <name>base_template</name> <name>quick_template</name> </filter> </del> <del> <filter> <id>52</id> <id>53</id> </filter> <owner-login>JDoe</owner-login> </del> <del> <filter> <id>66</id> <id>67</id> </filter> <owner-id>12134</owner-id> </del> </domain-template> </packet> The following packet deletes all domain templates belonging to the specified Plesk user: <packet version=”1.0.552 Supported Operations Deleting multiple domain templates A single filter can specify multiple template instances for deletion.0”> <domain-template> <del> <filter/> <owner-login>JDoe</owner-login> </del> </domain-template> </packet> . all defined either by ID or by the template name: <packet version=”1.6.6.6.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.0.0.

Allowed values: ok | error. this node is missing in the response packet. Data type: string. Data type: string. If the request packet fails before the execution.0.Supported Operations 553 The following packet deletes all domain templates that belong to Plesk Administrator: <packet version=”1. It wraps the result of the del operation for a single domain template. Specifies the execution status of the del operation. The errtext node is optional.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. Data type: integer.6. The errcode node is optional. Returns the error code.xsd).  . Data type: unsignedInt. In all other cases it holds the identifier of the domain template (if this ID was specified in the request packet). In all other cases it holds the name of the domain template (if this name was specified in the request packet). Returns the error message. Data type: resultType (common. this node is missing in the response packet. The id node is optional. Is required if the del operation fails. Data type: string. The status node is required. The name node is optional. If the request packet fails before the execution.

A positive response got from Plesk server can look as follows: <packet version=”1.0.</errtext> </result> </del> </domain-template> </packet> .6.0.554 Supported Operations Response Samples A request packet that orders a del operation is 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.6.0”> <domain-template> <del> <filter> <id>11</id> <id>12</id> </filter> <owner-login>JDoe</owner-login> </del> </domain-template> </packet> This packet deletes two domain templates specified by ID.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.6.0.

It is always created in Plesk during creating new web user. which gives access to the whole domain directory.Supported Operations 555 Managing FTP Accounts Operator: <ftp-user> XML Schema: ftpuser.1 for Windows API RPC version: 1.to access particular domain directory with particular rights. Plesk client Description Generally speaking. Default FTP accounts are the following:   Domain user's account (see page 409). Plesk Administrators can manage FTP accounts on all domains. Web user's account (see page 1285). It is created if the 'Create a separate FTP user account for this subdomain' option was defined while creating a subdomain. allowing users . It is always created in Plesk during creating new domain account. They bring flexibility to managing FTP access to domains. which gives access to subdomain directory located in parent domain directory.4. Plesk supports two types of FTP accounts: default and additional.  Additional FTP accounts are FTP accounts that can be created and used in addition to default ones.xsd Plesk version: Plesk 8. subdomain and web user .0 Plesk user: Plesk Administrator. The ftp-user operator affects only additional FTP accounts. which gives access to web user's directory located in domain directory. Supported operations .2.other than domain. Subdomain user's account. accounts of the 'default' type are managed with the domain (see page 377) and webuser (see page 1284) operators. 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 74).

..................................... It specifies if the FTP user has read permissions for his home directory (i................................................................... 559 .............................................................................................................. It is structured as follows:  The read node is optional................................... list folders and files and download files located in it)................ The write node is optional............. delete and append files)............560 Retrieving Information On FTP Accounts ..........................556 Creating FTP Accounts .................. upload............................... Data type: boolean............................................................xsd)...556 Supported Operations     ADD (see page 560) creates FTP account on a domain specified by its name or ID SET (see page 575) changes properties of a specified FTP account DEL (see page 582) deletes FTP account from a specified domain GET (see page 568) retrieves information on properties of specified FTP accounts on particular domains In this section: FTP Account Permissions ...............e......575 Deleting FTP Accounts ............................... create and delete folders.............................. Data type: boolean..............................................  Filtering Issues Filtering is the way the request packets pick out FTP accounts to which the requested operation will be applied............ 557 Filtering in Responses .. It specifies if the FTP user has write permissions for his home directory (i........................582 FTP Account Permissions FTP account permissions are presented by type FtpUserPermissions (ftpuser.........556 Filtering Issues....................e.......... In this section: Filtering in Requests.....................568 Changing FTP Account Settings .........................

This data type is structured as follows:     The id node is required. The name node is required. It specifies the name of FTP account. The domain-id node is required.2. Data type: integer. Individual filtering is allowed to Plesk Administrator.  Individual filtering The following packet requests information on properties of three FTP accounts specified by their ID: <packet version=”1. Data type: string. It specifies the unique identifier of the domain on which the FTP account exists.0”> <ftp-user> <get> <filter> <id>65</id> <id>66</id> <id>67</id> </filter> </get> </ftp-user> </packet> .Supported Operations 557 Filtering in Requests The filter node is presented by the FtpUserFilterType complex type (ftpuser. Data type: string. It specifies the name of the domain (in Unicode) on which the FTP account exists. Nodes domain-id and domain-name serve to filter all FTP accounts on a certain domain (or several) at one stroke.4. The filter allows two kinds of filtering:  Nodes id and name serve to filter one to many FTP accounts individually. It specifies the FTP account ID in Plesk database. This kind of filtering is allowed to Plesk Administrator. and Plesk client (on their own domains).xsd). The domain-name node is required. Plesk client (on their own domains) and Plesk Domain Administrators (on their own domain). Data type: integer.

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.558 Supported Operations The following packet is identical except it specifies accounts by their names: <packet version=”1.0”> <ftp-user> <del> <filter> <domain-name>doe1.com</domain-name> </filter> </del> </ftp-user> </packet> .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.2.0”> <ftp-user> <get> <filter> <name>willy</name> <id>66</id> <name>dilly</name> </filter> </get> </ftp-user> </packet> Bulk filtering The following packet deletes all FTP accounts existing on domains specified by ID: <packet version=”1.2.com</domain-name> <domain-name>doe2.4.4.4.2.2.4.

on his domain.2.com</domain-name> </filter> </del> </ftp-user> </packet> The following packet sent by Plesk Administrator deletes all FTP accounts existing in Plesk. set) uses filters. If sent by Plesk client.0”> <ftp-user> <del> <filter/> </del> </ftp-user> </packet> Filtering in Responses If an operation in a request packet (del. If the filter node is left blank (<filter/>). It returns the filtering rule.0”> <ftp-user> <del> <filter> <domain-id>638</domain-id> <domain-name>doe2.2. it deletes all FTP accounts on all domains of this Client. get. if by Plesk Domain Administrator.4. Note: The filter-id node appears in API RPC 1. <packet version=”1. Data type: anySimple. If one of the following values was set as a filter rule. the filter-id parameter will hold the ID of the object. The node value can be integer (domain or FTP account ID) or a string (domain or FTP account name).4. .4. The blank filter means that all objects are matched by this rule.0.2. 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.Supported Operations 559 The following packet is invalid as it uses both the domain-id and the domain-name nodes within one filter: <packet version=”1. the filter-id node is nested in a response packet. Earlier versions of the protocol do not support this node (it is optional for them).

............. In this section: Request Packet Structure........................... 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 74)............................................................ 560 Request Samples ...........................2........................................................................... 566 Request Packet Structure A request XML packet creating FTP account on a domain includes the add operation node: <packet version=”1.............................560 Supported Operations Creating FTP Accounts To create an FTP account on a domain............................. 565 Response Samples .......4........ 563 Response Packet Structure . or/and by client limit (see page 71) of the same name.... 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 397).............................................0”> <ftp-user> <add> … </add> </ftp-user> </packet> ......................... use the add operation.....

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

Do not include to your packets lines like <home>/Global_Upload</home> <create-non-existent>true</create-non-existent> 4. If you want FTP account created with request packet to have a default home directory. use the required number of add nodes in the packet. To create multiple FTP accounts. To create FTP account with unlimited quota. meaning that two FTP accounts with the same name cannot be crated. With one add operation. even if you want to crate them on different domains. . 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. specify value "-1" in the quota node: <quota>-1</quota> 5. FTP account name must be unique in Plesk. you can create as many different FTP accounts on different domains as you want. The default home directory for any new additional FTP account is the domain root directory (namely. 6. it is impossible to make some /Global_Upload folder a home directory for an account. For example: <home>/httpdocs/billy/pub</home> 3. Therefore. include an empty home node to your request: <home/> If you want to specify account home directory other than default. 2.562 Supported Operations Remarks 1. starting with root domain directory. With one packet. in the home node specify a full path to desired directory.

The FTP account created with this packet will have name and login ftpuser2 and password GeNehvs570. <packet version="1.4.2. with only required settings specified.net</domain-name> </add> </ftp-user> </packet> . <packet version="1. The FTP account created with this packet will have name and login ftpuser1 and password jdnHHbe6Gc. 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. with unspecified permissions.Supported Operations 563 Request Samples Creating single FTP accounts This packet creates FTP account. on domain doe.4. 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>ftpuser2</name> <password>GeNehvs570</password> <home>/httpdocs/Pub</home> <create-non-existent>true</create-non-existent> <domain-name>doe. User of this account will have access to the domain directory httpdocs.0"> <ftp-user> <add> <name>ftpuser1</name> <password>jdnHHbe6Gc</password> <home/> <domain-id>48</domain-id> </add> </ftp-user> </packet> This packet creates FTP account. 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. and changing the structure of domain root is not allowed by Plesk.org.0"> <ftp-user> <add> <name>dwarf</name> <password>Kjrnc7HHsn</password> <home>/dwarfyplace</home> <create-non-existent>true</create-non-existent> <domain-name>reddwarf.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. with only required settings specified. <packet version="1.4.2. on domain with ID "48".

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.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. Total size of files that this FTP user is allowed to upload will not be limited.com.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> Creating multiple FTP accounts This packet creates three FTP accounts on domain example.564 Supported Operations This packet creates FTP account. with the full set of settings specified. The account created with this packet will have name and login ftpuser3 and password lkAshr66v. The third user created with the packet will have only read permission on accessing the same directory. Total size of files that the FTP users are allowed to upload will be limited to 100 Mbytes. on domain with ID 50.4.com</domain-name> </add> <add> .4. <packet version="1. <packet version="1.2. User of this account will have read and write permissions on accessing directory Incoming located in domain folder/httpdocs.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.2.

It returns the unique identifier of the FTP account created with the add operation. The errcode node is optional. The errtext node is optional.com</domain-name> </add> </ftp-user> </packet> 565 Response Packet Structure The add node of the output XML packet is structured as follows:      The result node is required. Is used to return the error code when the add operation fails. Specifies the execution status of the add operation.xsd). Data type: string. Is used to return the error message if the add operation fails. Data type: string. Data type: FtpUserSimpleResultType (ftpuser. .Supported Operations <name>photo3</name> <password>J7chhend</password> <home>/private/photoshare/Incoming</home> <permissions> <read>true</read> <write>false</write> </permissions> <domain-name>example. It wraps the response received from the server. Data type: unsignedInt. Allowed values: ok | error. Data type: integer. The status node is required. The id node is required if the operation succeeds.

2.2. <packet version="1. 8 and 9 were assigned. to which IDs 7.0"> <ftp-user> <add> <result> <status>ok</status> <id>5</id> </result> </add> </ftp-user> </packet> This packet is received after successful creation of three FTP accounts.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> . <packet version="1.4.4.566 Supported Operations Response Samples Positive responses This packet is received after successful creation of FTP account to which ID 5 was assigned.

4.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> . <packet version="1.2.4. and no create-non-existent node is included to the request.2.2.Supported Operations 567 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.4.0"> <ftp-user> <add> <result> <status>error</status> <errcode>1019</errcode> <errtext>Invalid path specified</errtext> </result> </add> </ftp-user> </packet> 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.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. which is prohibited by Plesk. <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.............................. The node has the following graphical representation:  The filter node is required................................ It indicates FTP accounts which settings are to be retrieved with the request packet........ In this section: Request Packet Structure.........................2... 573 Request Packet Structure A request XML packet retrieving information on FTP account settings includes the get operation node: <packet version=”1... 571 Response Samples ....................4. .................................. 568 Request Samples ...................568 Supported Operations 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. Data type: FtpUserFilterType (ftpuser... refer to Filtering Issues (see page 557)..........0”> <ftp-user> <get> … </get> </ftp-user> </packet> The get node is presented by the FtpUserGetInputType complex type (ftpuser.....xsd).....xsd)......................................................................... 569 Response Packet Structure .................................................................... For information on this node structure...........

domain IDs.0"> <ftp-user> <get> <filter> <name>ftpuser1</name> </filter> </get> </ftp-user> </packet> 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. account names. <packet version=”1.0"> <ftp-user> <get> <filter> <id>16</id> </filter> </get> </ftp-user> </packet> This packet retrieves information on FTP account with name ftpuser1.2.4.0”> <ftp-user> <get> <filter> <name>some-ftp</name> <id>34</id> </filter> </get> </ftp-user> </packet> .2.Supported Operations 569 Remarks Within one get operation you can retrieve information on FTP accounts using only one filtering rule: account IDs. or domain names. <packet version="1.4. you can always use several different filtering rules within one packet by including to it several get nodes.2. However. <packet version="1. Request Samples Retrieving information on a single FTP account This packet retrieves information on FTP account with ID 16.4.

2.com</domain-name> <domain-name>two.example.4.4. <packet version=”1.0"> <ftp-user> <get> <filter/> </get> </ftp-user> </packet> .4.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. or on all domains belonging to a Plesk client whose credentials are specified in the HTTP headers.example.2.example. <packet version="1.com</domain-name> </filter> </get> </ftp-user> </packet> 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.0”> <ftp-user> <get> <filter> <domain-name>one. <packet version=”1. and on all FTP accounts existing on domain with ID 34.2.com and two.example.570 Supported Operations This packet retrieves information on FTP accounts with names photo1 and photo3.com.

The errtext node is optional. The status node is required.Supported Operations 571 Response Packet Structure The get 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 get operation fails. Data type: FtpUserGetResultType (ftpuser. Data type: integer. Data type: anySimple. Allowed values: ok | error. Data type: string. It is required if the get operation succeeds. The id node is optional.xsd). The filter-id node is optional. refer to the Filtering Issues (see page 559) section. It specifies the execution status of the get operation. Data type: result_status. The errcode node is optional. It wraps the response received from the server. It returns the filtering rule.  . It is required if the get operation succeeds. Data type: unsignedInt. It returns the unique identifier of the FTP account which settings are retrieved in the response packet. It is used to return the error code when the get operation fails. For more information.

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. It specifies the name under which the FTP account is known in Plesk. i.  The permissions node is optional. For more information.e. Data type: integer.  The quota node is optional. and the account login. . the directory access to which is granted for the account user.572 Supported Operations  The name node is optional.  The home node is optional. Data type: string. It specifies the ID of the domain on which the FTP account exists. Data type: integer. home. Data type: FtpUserPermissions. It is required if the get operation succeeds. It specifies the FTP account permissions for home directory. It is required if the get operation succeeds. permissions and domain-id nodes. It is required if the get operation succeeds. It specifies the home directory of the FTP account. The domain-id node is optional.  Remarks In case when a domain was specified as filtering rule in a request packet. It is required if the get operation succeeds. It is required if the get operation succeeds. response packet does not contain the name. refer to section FTP Account Permissions (see page 556). and there are no FTP accounts existing on that domain. quota.. Data type: string.

refer to the Creating FTP Accounts (see page 560) section.4. The last get node in this response contains only status and filter-id nodes.4. <packet version="1. For details on adding accounts. <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> .Supported Operations 573 Response Samples Positive responses This packet retrieved information on FTP account created with default home directory and only required settings specified within the node.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.2.2. and information on FTP accounts existing on a domain with ID 34. which means that no FTP accounts exist on the specified domain.

4. <packet version="1. <packet version="1.ru</filter-id> </result> </get> </ftp-user> </packet> .2.0"> <ftp-user> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Permission denied.4.</errtext> <filter-id>ivanov.574 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> 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>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.2.

...4............... You can change settings of particular FTP accounts.....................................................2....................................................... depending on what Plesk user credentials are specified in HTML headers of request packet......................................... In this section: Request Packet Structure..... 575 Request Samples .. 577 Response Packet Structure .................................. or of all FTP accounts existing on particular domains or in the whole Plesk database........... </set> </ftp-user> </packet> .............. 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 74)....................................... 580 Response Samples ..........................................Supported Operations 575 Changing FTP Account Settings The set operation is used to change settings of additional FTP accounts existing in Plesk database...................................0"> <ftp-user> <set> .. 581 Request Packet Structure A request XML packet changing FTP account settings in the Plesk database includes the set operation node: <packet version="1.......

Data type: FtpUserSetType (ftpuser.xsd).576 Supported Operations The set node is presented with the FtpUserSetInputType complex type (ftpuser. the directory access to which is granted for the account user. It specifies if the new home directory should be created or not. its graphical representation is as follows:  The filter node is required. Data type: FtpUserFilterType (ftpuser. Data type: string. refer to Filtering Issues (see page 557).        . For information on this node structure. The values node is required.xsd). The name node is optional.e. Data type: boolean. and the new account login. Data type: string. It specifies the new name under which the FTP account will be known in Plesk. It specifies the new home directory of the account. It indicates FTP accounts which settings are to be updated with the information specified in values node. The home node is optional. It specifies the new FTP account password. i. It specifies the FTP account permissions for home directory. The create-non-existent node is optional. The permissions node is optional. refer to section FTP Account Permissions (see page 556). Data type: FtpUserPermissions. It wraps a collection of settings that will be applied to the accounts specified with filter node. The quota node is optional.. This node with value true is required if new home directory defined with the home node does not exist. The password node is optional.xsd). Data type: string. For more information. Data type: integer. 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.

it is impossible to make some /Global_Upload folder a home directory for an account. use the required number of add nodes in the packet. 2. To change FTP account quota to unlimited. specify value "-1" in the quota node: <quota>-1</quota> 4. which is the domain root directory. then home directory for FTP account will be set to default one. Creating new folders in domain root directory is prohibited by Plesk. Do not include to your packets lines like <home>/Global_Upload</home> <create-non-existent>true</create-non-existent> 3. With one packet. Request Samples Changing settings of a single FTP account This packet sets up new password for FTP account with name "ftpuser2". If the home node is left blank (<home/>). <packet version="1.2. To do so.4. Therefore. The home node should contain a full path to FTP account home directory starting with root domain directory.Supported Operations 577 Remarks 1.0"> <ftp-user> <set> <filter> <name>ftpuser2</name> </filter> <values> <password>jkRR67hVBB</password> </values> </set> </ftp-user> </packet> . you can change settings of as many different FTP accounts with different filtering rules as you want. For example: /httpdocs/billy/pub.

2. <packet version="1.2.0"> <ftp-user> <set> <filter> <domain-id>85</domain-id> </filter> <values> <name>ftp-doe1</name> </values> </set> </ftp-user> </packet> This packet sets 10-Mbytes quota for all FTP accounts existing on domain example. <packet version="1.2.4.578 Supported Operations This packet updates settings of FTP account with ID 46: It creates new account home directory /httpdocs/Pub and allows read and write permissions. <packet version="1.0"> <ftp-user> <set> <filter> <domain-name>example.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.4.com</domain-name> </filter> <values> <quota>10485760</quota> </values> </set> </ftp-user> </packet> .4.com.

<packet version="1.2.4.Supported Operations 579 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.0"> <ftp-user> <set> <filter/> <values> <permissions> <read>true</read> <write>false</write> </permissions> </values> </set> </ftp-user> </packet> .

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

<packet version="1.2. <packet version="1.2.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.com.Supported Operations 581 Response Samples Positive responses This packet has been received after successful changing settings of FTP account called ftpuser2.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. <packet version="1.4.com</filter-id> <id>16</id> </result> <result> <status>ok</status> <filter-id>example.4.2.0"> <ftp-user> <set> <result> <status>ok</status> <filter-id>example.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> .

...................582 Supported Operations Such packet is received if the request packet intended to set the same new name for all FTP accounts existing on one domain.. for deleting all FTP accounts existing on particular domains.............. 583 Request Samples .. In this section: Request Packet Structure......................... or for deleting all FTP accounts existing on all domains you can manage...2.......... in turn.... also defined by name or ID....................... 585 Response Samples .................................... Plesk Administrator deletes all additional FTP accounts created on the whole Plesk server..........</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............................... In the last case.......... <packet version="1............ 583 Response Packet Structure ..................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..............................4.......... You can use this operation for deleting particular FTP accounts defined by name or ID.... the following result nodes contain the same error 1007..................... Plesk client.................. The first result node contains info on successful renaming of FTP account with ID 316..</errtext> <filter-id>87</filter-id> <id>317</id> </result> <result> <status>error</status> <errcode>1007</errcode> <errtext>User ftp-doe7 already exists..... 586 ....................................... deletes all additional FTP accounts created on his domains.................

0”> <ftp-user> <del> … </del> </ftp-user> </packet> The del node is presented by the FtpUserDelInputType complex type (ftpuser. To do so.2. use the required number of del nodes in the packet. Request Samples Deleting single FTP account This packet deletes FTP account with name photo4.xsd).xsd). Data type: FtpUserFilterType (ftpuser. The node has the following graphical representation:  The filter node is required.Supported Operations 583 Request Packet Structure A request XML packet deleting FTP account includes the del operation node: <packet version=”1. <packet version="1.4. For information on this node structure. you can delete as many different FTP accounts with different filtering rules as you want. Remarks With one packet.0"> <ftp-user> <del> <filter> <name>photo4</name> </filter> </del> </ftp-user> </packet> .4.2. refer to Filtering Issues (see page 557). It indicates which FTP accounts are to be deleted with the request packet.

0"> <ftp-user> <del> <filter/> </del> </ftp-user> </packet> .0"> <ftp-user> <del> <filter> <id>44</id> </filter> </del> </ftp-user> </packet> Deleting multiple FTP accounts This packet deletes FTP accounts with names ftpuser2.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.2. <packet version="1.4.0"> <ftp-user> <del> <filter> <domain-name>example.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.4.2.4.2. <packet version="1.2. <packet version="1. photo6.com.4.584 Supported Operations This packet deletes FTP account with ID 44. <packet version="1.

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

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.com: These were FTP accounts with IDs 28 and 29.0"> <ftp-user> <del> <result> <status>ok</status> <filter-id>doe3.586 Supported Operations Response Samples Positive responses This packet has been received after successful deletion of FTP account called photo4.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.4. <packet version="1.com</filter-id> </result> </del> </ftp-user> </packet> .0"> <ftp-user> <del> <result> <status>ok</status> <filter-id>example.com.2. <packet version="1. which had ID 15. In this case it is domain example.2. <packet version="1.com</filter-id> <id>28</id> </result> <result> <status>ok</status> <filter-id>doe3.2.4.4.

2. Supported operations .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.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. SSL protection with authentic digital certificates and Anonymous FTP services are available only to domains hosted on exclusive IP addresses. Exclusive IP address can be assigned to a single customer. In Plesk.4.Supported Operations 587 Negative responses Negative response received from server can look as follows: <packet version="1. IP addresses can be shared or exclusive. while shared IP address can be shared among several customer accounts. ip_output.xsd.

............................. specifying a netmask and server network interface GET (see page 592) retrieves the list of IP addresses available on the server SET (see page 595) updates properties for IP addresses available on the server DEL (see page 600) removes an IP address from Plesk server In this section: Adding IP Address.............................................. 590 Response Samples ................................................ 591 Request Packet Structure A request XML packet adding IP address to Plesk server includes the add operation node: <packet version="1.. 589 Response Packet Structure ....................... 592 Changing Type ................................................................................................................................................................................................................................... In this section: Request Packet Structure...... 595 Removing IP..................... the attempt to add it to Plesk database will result in error........................................ 600 Adding IP Address Use the add operation to add IP address to Plesk server........... Note: In Plesk powered by Virtuozzo........0"> <ip> <add> … </add> </ip> </packet> ..................................................................588 Supported Operations     ADD (see page 588) adds an IP address to Plesk server as shared or exclusive................................ 588 Retrieving IP addresses .............2......................................................................................... 588 Request Samples ............... if the specified IP is not in VPS (Virtual Private Server) pool...................4.....................................

<add> … </add> </ip> Request Samples Adding a single IP address This packet adds a single shared IP address to Plesk server. It specifies the network interface name. It specifies the IP address you want to add to Plesk database.4.0"> <ip> <add> <ip_address>192.. It specifies the type of IP address. Data type: string. Allowed values: shared | exclusive.2. <packet version ="1. The netmask node is required.255.0</netmask> <type>shared</type> <interface>Network Connection</interface> </add> </ip> </packet> . Data type: ip_address (common.255.18</ip_address> <netmask>255.2.Supported Operations 589 Graphical representation of the add node is as follows:     The ip_address node is required. Add as many add operations as the number of IPs you want to add. Data type: string. <ip> <add> … </add> . The interface node is required. Remarks You can add multiple IP addresses in a single packet.. It specifies the netmask of the network. The type node is required.xsd).xsd).0. Data type: ip_address (common.

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

2.2.2.0.2.4.4.2.255.4.0"> <ip> <add> <result> <status>ok</status> <ip_address>192. <packet version ="1.0</netmask> <type>shared</type> <interface>Network Connection</interface> </add> </ip> </packet> The positive response from the server looks as follows: <packet version ="1.0"> <ip> <add> <result> <status>error</status> <errcode>1013</errcode> <errtext>IP address was already added on the server</errtext> </result> </add> </ip> </packet> .255.18</ip_address> </result> </add> </ip> </packet> If the IP address is already in Plesk database. the response is as follows: <packet version ="1.18</ip_address> <netmask>255.0"> <ip> <add> <ip_address>192.Supported Operations 591 Response Samples Adding a single IP address This request packet adds a single shared IP address to Plesk server.0.

4.0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> <add> <ip_address>192.2.16</ip_address> <netmask>255.255.17</ip_address> <netmask>255.2.17</ip_address> </result> </add> <add> <result> <status>ok</status> <ip_address>192.255.0"> <ip> <add> <result> <status>ok</status> <ip_address>192.0.0"> <ip> <add> <ip_address>192.2.255.0.0.2.16</ip_address> </result> </add> </ip> </packet> .0.0</netmask> <type>exclusive</type> <interface>Network Connection</interface> </add> </ip> </packet> A possible response from the server can look as follows: <packet version ="1.255.4. <packet version ="1.2.2.592 Supported Operations Adding multiple IP addresses This request packet adds two exclusive IP addresses to Plesk server.

..................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..................4.................................................. In this section: Request Packet ..2...................................2.... 593 Response Samples ............................................Supported Operations 593 Retrieving IP addresses Use the get operation to retrieve all IP addresses from Plesk server database............................................................... 595 Request Packet A request XML packet retrieving IP addresses from Plesk database includes the get operation node: <packet version="1..... 593 Response Packet Structure ......................4..0"> <ip> <get/> </ip> </packet> ............

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

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

....................... 598 Response Packet Structure ........................................................ In this section: Request Packet Structure......................................................................... Note: You cannot change type of IP address from shared to exclusive if it is assigned to two or more clients.............................................................................................................................. 597 Request Samples ................................. 599 .....................596 Supported Operations Changing Type Use the set operation to change IP address type... 598 Response Samples ..............

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

1 IP address to exclusive.0.2. . <packet version="1.2. <packet version="1.0. Data type: resultType (common.10 and 192.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. It wraps the response retrieved from the server.0"> <ip> <set> <filter> <ip_address>192.0"> <ip> <set> <filter> <ip_address>192.0.2.0.4.2.0.12 IP addresses to exclusive.xsd).2.1</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> Changing type of multiple IP addresses This packet changes the type of 192.2.2.4.598 Supported Operations Request Samples Changing type of a single IP address This packet changes the type of 192.10</ip_address> <ip_address>192.0.

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

..... <packet version="1..2...........2........4......................2................................... In this section: Request Packet Structure...........2..0........................... 603 ....................0.. You also cannot remove the IP address if one or more domains are hosted on this IP or forwarded from this IP.......12</ip_address> </result> </set> </ip> </packet> Removing IP Use the del operation to remove the IP address from Plesk database...................... You cannot remove the IP of the computer (defined by network configuration).......4..................... the response from the server looks as follows: <packet version="1.10 and 192.......10</ip_address> </result> <result> <status>error</status> <errcode>1013</errcode> <errcode>ip does not exist.. 601 Request Samples .....0.0.. Note: You cannot remove an IP address from IP pool of a reseller who shares this IP with Plesk clients................... 602 Response Samples .... where Plesk server is located.....................12</ip_address> </filter> <type>exclusive</type> </set> </ip> </packet> If the second IP address was not found.....2...2............... 601 Response Packet Structure .................0....................0"> <ip> <set> <filter> <ip_address>192.12 IP addresses to exclusive..2...........600 Supported Operations Changing type of multiple IP addresses This packet changes the type of 192.......10</ip_address> <ip_address>192..........</errcode> <ip_address>192....2......0"> <ip> <set> <result> <status>ok</status> <ip_address>192.........0.....

2. Remarks You can remove multiple IP addresses in a single packet. <packet version="1.2.4. The ip_address node is required.0.</ip_address> </filter> Request Samples Removing a single IP address This packet removers 192. Add as many ip_address operations as the number of IP addresses you want to remove. <ip_address>...1 IP address from Plesk database.xsd).1</ip_address> </filter> </del> </ip> </packet> .</ip_address> . Specifies the IP address in Plesk database. Data type: ipFilterType (ip_input..0...2.2. <filter> <ip_address>.0"> <ip> <del> … </del> </ip> </packet> The del node graphical representation is as follows:   The filter node is required.0"> <ip> <del> <filter> <ip_address>192..4.Supported Operations 601 Request Packet Structure A request XML packet removing the IP address from Plesk database includes the del operation node: <packet version="1.xsd). Data type: ip_address (common. Specifies the filtering rule.

It wraps the response retrieved from the server. . Is returns the error code if the del operation fails.602 Supported Operations Removing multiple IP addresses This packet removes 192.10 and 192. Data type: string.2.10</ip_address> <ip_address>192.12 IP addresses.4.0"> <ip> <del> <filter> <ip_address>192. It returns the error message if the del operation fails.0.2.2. Data type: resultType (common. It returns the removed IP address. Data type: integer.2.xsd).0. Data type: ip_address (common. The status node is required.0.12</ip_address> </filter> </del> </ip> </packet> Response Packet Structure The del node of the output XML packet is structured as follows:      The result node is required.0.2. The errtext node is optional. Data type: string. Allowed values: ok | error. <packet version="1. It specifies the execution status of the del operation.xsd). The errcode node is optional. The id_address node is optional.

2.4.0"> <ip> <del> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192.4.2.2.0"> <ip> <del> <filter> <ip_address>192.1</ip_address> </result> </del> </ip> </packet> .0"> <ip> <del> <result> <status>ok</status> <ip_address>192. the response from the server looks as follows: <packet version="1.0.1 is used for hosting or forwarding.2.2.4.2. or this IP is used by hosting or forwarding services.0. <packet version="1.1 IP address from Plesk database.Supported Operations 603 Response Samples Removing a single IP address This request packet removers 192.2.1</ip_address> </filter> </del> </ip> </packet> If it was Plesk server IP address.0. </errtext> </result> </del> </ip> </packet> The positive response from the server looks as follows: <packet version="1.0.

0.2 IP addresses.4.0.2.2 is used for hosting or forwarding.2.1</ip_address> <ip_address>192. </errtext> </result> </del> </ip> </packet> . <packet version="1.0"> <ip> <del> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192.0"> <ip> <del> <filter> <ip_address>192.0.0.2.2.4. </errtext> </result> <result> <status>error</status> <errcode>1002</errcode> <errtext>Error: IP address 192.1 is used for hosting or forwarding.0.2.2.2.2.0.604 Supported Operations Removing multiple IP addresses This request packet removes 192.2</ip_address> </filter> </del> </ip> </packet> A possible response from the server can look as follows: <packet version="1.1 and 192.

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

606

Supported Operations

In this section:
LP Names ......................................................................................................... 606 Filtering Issues .................................................................................................. 606 Retrieving List of LP's ........................................................................................ 607 Installing LP....................................................................................................... 613 Retrieving Localized Messages ......................................................................... 617 Removing LP..................................................................................................... 621 Enabling LP ....................................................................................................... 627 Disabling LP ...................................................................................................... 632 Locale Codes .................................................................................................... 637

LP Names
Plesk locale and language pack names follow the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>", 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. For example, U.S. English locale is named "enUS". To see list of locale names supported by Plesk, refer to the Appendix. Locale Code. (on page 637) section.

Filtering Issues
Filtering is the way the request XML packet indicates the object (a LP or several) to which the operation will be applied. The request XML packet filters LPs using a special filter node. Parameters, nested in the filter node are called filtering rule. 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.

In this section:
Filter for Language Packs.................................................................................. 606 filter-id ............................................................................................................... 607

Supported Operations

607

Filter for Language Packs
The filter for this operator is presented by type LocaleFilterType (locale.xsd) and structured as follows:

The id node is optional. It specifies name of a LP. For details on LP names, refer to the LP Names (on page 606) section. Data type: string.

Remarks The filter node can be left blank (<filter/>). In this case all LP's on the server will be matched. A single filter can specify multiple LP names. 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>

filter-id

If an operation in a request packet uses filters, the filter-id node is nested in a response packet. It returns the filtering rule parameter. If LP name was set as a filter rule parameter, it is returned in the filter-id node of the response packet. It is done to trace the request parameters in case of error. Data type: anySimple.

608

Supported Operations

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

In this section:
Request Packet Structure ..................................................................................608 Request Samples ..............................................................................................609 Response Packet Structure ...............................................................................610 Response Samples ............................................................................................612

Request Packet Structure
A request XML packet retrieving info on LP's includes the get operation node:
<packet version="1.5.0.0"> <locale> <get> … </get> </locale> </packet>

The get node is presented by type LocaleGetInput (locale.xsd), and its graphical representation is as follows:

The filter node is required. Specifies the filtering rule. For more information, refer to the Filtering Issues (on page 606) section. Data type: LocaleFilter (locale.xsd).

Supported Operations

609

Request Samples
Retrieving info on a single LP The following request packet retrieves info on US English LP:
<packet version="1.5.0.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.5.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>

610

Supported Operations

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. It wraps the response retrieved from the server. Data type: extension of type LocaleResultType (locale.xsd). The status node is required. It specifies the execution status of the get operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It returns the error code if the get operation fails. Data type: unsignedInt. The errtext node is optional. It returns the error message if the get operation fails. Data type: string. The filter-id node is optional. It returns a filtering rule parameter if the operation fails. For more information, refer to the Filtering Issues (on page 643) section. Data type:anySimpleType. The id node is optional. It holds name of the language pack matched by the filtering rule if the operation fails. Data type: string. The message node is optional. It does not return any value for this operation. Data type: string.

 

Note: In API RPC v.1.5.1.0 and later versions, the node is absent if the response packets.  The info node is optional. It specifies LP settings. Data type: LocaleInfo (locale.xsd). If the info node is present in the response packet, the following nodes are required:

Supported Operations

611

    

The id node specifies the LP name. For details on language pack names, refer to the LP Names (on page 606) section. Data type: string. The lang node specifies the LP language. Data type: string. The country node specifies countries where this language is native. Data type: string. The used node specifies the number of users at all levels that use this language in their interface. Data type: integer. The enabled node specifies if this LP is available for users. Data type: boolean.

Remarks In API RPC v.1.5.0.0, the result node also contains the message node.

The message node is optional. It does not return any value for this operation. Data type: string.

612

Supported Operations

Response Samples
Retrieving info on a single LP The following request packet retrieves info on US English LP:
<packet version="1.5.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.5.0.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>

If the LP was not found, the response from the server looks as follows:
<packet version="1.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>

Supported Operations

613

Retrieving info on multiple LP's The following request packet retrieves info on US English and Russian LP's:
<packet version="1.5.0.0"> <locale> <get> <filter> <id>en-US</id> <id>ru-RU</id> </filter> </get> </locale> </packet>

If US English LP was found, and Russian LP was not found on the server, the response is as follows:
<packet version="1.5.0.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>

614

Supported Operations

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.

In this section:
Request Packet Structure.................................................................................. 614 Request Samples .............................................................................................. 614 Response Packet Structure ............................................................................... 615 Response Samples ........................................................................................... 616

Request Packet Structure
A request XML packet installing LP includes the install operation node:
<packet version="1.5.0.0"> <locale> <install> … </install> </locale> </packet>

The install node is presented by type LocaleInstallInput (locale.xsd), and its graphical representation is as follows:

The filename node is required. Specifies the LP package full name. This file should reside on the server. You can use the upload operator to upload files to the server. Data type: string.

Request Samples
The following request packet installs US English LP to the server:
<packet version="1.5.0.0"> <locale> <install> <filename>./tmp/en-RU.rpm</filename> </install> </locale> </packet>

Supported Operations

615

Response Packet Structure
The install node of the output XML packet is presented by type LocalInstallOutput (locale.xsd) and structured as follows:

The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd). The status node is required. It specifies the execution status of the install operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It returns the error code if the install operation fails. Data type: unsignedInt. The errtext node is optional. It returns the error message if the install operation fails. Data type: string.

616

Supported Operations

Response Samples
The following request packet installs US English LP to the server:
<packet version="1.5.0.0"> <locale> <install> <filename>./tmp/en-RU.rpm</filename> </install> </locale> </packet>

The positive response from the server looks as follows:
<packet version="1.5.0.0"> <locale> <install> <result> <status>ok</status> </result> </install> </locale> </packet>

If the file was not found on the server, the response from the server looks as follows:
<packet version="1.5.0.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, the response is as follows:
<packet version="1.5.0.0"> <locale> <install> <result> <status>error</status> <errcode>1017</errcode> <errtext>Feature not supported by Plesk API-RPC</errtext> </result> </install> </locale> </packet>

Supported Operations

617

Retrieving Localized Messages
Resource files of LP are associative arrays, structured like key => value. One key can be equal to different values depending on a locale name. For instance, 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. To retrieve a key value for a specified locale, use the get-message operation.

In this section:
Request Packet Structure.................................................................................. 617 Request Samples .............................................................................................. 618 Response Packet Structure ............................................................................... 619 Response Samples ........................................................................................... 620

Request Packet Structure
A request XML packet retrieving localized messages includes the get-message operation node:
<packet version="1.5.0.0"> <get-message> <install> … </install> </get-message> </packet>

The get-message node is presented by type LocaleGetMessageInput (locale.xsd), and its graphical representation is as follows:

The filter node is required. Specifies the filtering rule. For more information, refer to the Filtering Issues (on page 606) section. Data type: LocaleGetMessageFilter (locale.xsd). The key node is required. It specifies the key name. Data type: string. The id node is required. It specifies the language pack name. For details, refer to the LP Names (on page 606) section. Data type: string.

 

618

Supported Operations

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.5.0.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.5.0.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>

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.0.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>

Supported Operations

619

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

    

The result node is required. It wraps the response retrieved from the server. Data type: LocaleMessageResultType (locale.xsd). The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It returns the error code if the operation fails. Data type: unsignedInt. The errtext node is optional. It returns the error message if the operation fails. Data type: string. The filter-id node is optional. It returns a filtering rule parameter. For more information, refer to the Filtering Issues (on page 643) section. Data type: anySimple. The id node is optional. It holds name of the language pack matched by the filtering rule. Data type: string. The message node is optional. It holds value of the key received from the request packet. Data type: string.

 

620

Supported Operations

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.5.0.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.5.0.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>

If the key was not found, the response is as follows:
<packet version="1.5.0.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>

Supported Operations

621

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.5.0.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.5.0.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>

622

Supported Operations

Removing LP
The remove operation is used to remove a specified language pack from the server. Note: You cannot remove the default language pack.

In this section:
Request Packet Structure.................................................................................. 622 Request Samples .............................................................................................. 623 Response Packet Structure ............................................................................... 624 Response Samples ........................................................................................... 625

Request Packet Structure
A request XML packet removing LP's includes the remove operation node:
<packet version="1.5.0.0"> <locale> <remove> … </remove> </locale> </packet>

The remove node is presented by type LocaleRemoveInput (locale.xsd), and its graphical representation is as follows:

The filter node is required. Specifies the filtering rule. For more information, refer to the Filtering Issues (on page 606) section. Data type: LocaleFilter (locale.xsd).

Supported Operations

623

Request Samples
Removing a single LP

The following request packet removes French LP:
<packet version="1.5.0.0"> <locale> <remove> <filter> <id>fr-FR</id> </filter> </remove> </locale> </packet>

Removing multiple LP's The following request packet removes German and French LP's:
<packet version="1.5.0.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.5.0.0"> <locale> <remove> <filter/> </remove> </locale> </packet>

624

Supported Operations

Response Packet Structure
The remove node of the output XML packet is presented by type LocaleRemoveOutput (locale.xsd) and structured as follows:

    

The result node is required. It wraps the response retrieved from the server. Data type: LocaleResultType (locale.xsd). The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It returns the error code if the operation fails. Data type: unsignedInt. The errtext node is optional. It returns the error message if the operation fails. Data type: string. The filter-id node is optional. It returns a filtering rule parameter. For more information, refer to the Filtering Issues (on page 643) section. Data type: anySimple. The id node is optional. It holds name of the language pack matched by the filtering rule. Data type: string.

Supported Operations

625

Remarks In API RPC v.1.5.0.0, the result node also contains the message node.

The message node is optional. It does not return any value for this operation. Data type: string.

Response Samples
Removing a single LP The following request packet removes French LP:
<packet version="1.5.0.0"> <locale> <remove> <filter> <id>fr-FR</id> </filter> </remove> </locale> </packet>

The positive response from the server looks as follows:
<packet version="1.5.0.0"> <locale> <remove> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </remove> </locale> </packet>

626

Supported Operations

If the LP was not found, the response from the server looks as follows:
<packet version="1.5.0.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>

Removing multiple LP's The following request packet removes US English and Russian LP's:
<packet version="1.5.0.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.0.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>

Supported Operations

627

Enabling LP
The enable operation is used to enable LP on the server.

In this section:
Request Packet Structure.................................................................................. 627 Request Samples .............................................................................................. 628 Response Packet Structure ............................................................................... 629 Response Samples ........................................................................................... 630

Request Packet Structure
A request XML packet enabling LP's includes the enable operation node:
<packet version="1.5.0.0"> <locale> <enable> … </enable> </locale> </packet>

The enable node is presented by type LocaleEnableInput (locale.xsd), and its graphical representation is as follows:

The filter node is required. Specifies the filtering rule. For more information, refer to the Filtering Issues (on page 606) section. Data type: LocaleFilter (locale.xsd).

628

Supported Operations

Request Samples
Enabling a single LP The following request packet enables French LP:
<packet version="1.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.0.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.5.0.0"> <locale> <enable> <filter/> </enable> </locale> </packet>

Supported Operations

629

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. It wraps the response retrieved from the server. Data type: LocaleResultType (locale.xsd). The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error. The errcode node is optional. It returns the error code if the operation fails. Data type: unsignedInt. The errtext node is optional. It returns the error message if the operation fails. Data type: string. The filter-id node is optional. It returns a filtering rule parameter. For more information, refer to the Filtering Issues (on page 643) section. Data type: anySimple. The id node is optional. It holds name of the language pack matched by the filtering rule. Data type: string.

630

Supported Operations

Remarks In API RPC v.1.5.0.0, the result node also contains the message node.

The message node is optional. It does not return any value for this operation. Data type: string.

Response Samples
Enabling a single LP The following request packet enables French LP:
<packet version="1.5.0.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.0"> <locale> <enable> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </enable> </locale> </packet>

Supported Operations

631

If the LP was not found, the response from the server looks as follows:
<packet version="1.5.0.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.5.0.0"> <locale> <enable> <filter> <id>fr-FR</id> <id>ru-RU</id> </filter> </enable> </locale> </packet>

A possible response from the server can look as follows:
<packet version="1.5.0.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>

632

Supported Operations

Disabling LP
The disable operation is used to enable LP on the server. Note: You cannot disable the default language pack.

In this section:
Request Packet Structure.................................................................................. 632 Request Samples .............................................................................................. 633 Response Packet Structure ............................................................................... 634 Response Samples ........................................................................................... 635

Request Packet Structure
A request XML packet disabling LP's includes the disable operation node:
<packet version="1.5.0.0"> <locale> <disable> … </disable> </locale> </packet>

The disable node is presented by type LocaleDisableInput (locale.xsd), and its graphical representation is as follows:

The filter node is required. Specifies the filtering rule. For more information, refer to the Filtering Issues (on page 606) section. Data type: LocaleFilter (locale.xsd).

Supported Operations

633

Request Samples
Disabling a single LP The following request packet disables French LP:
<packet version="1.5.0.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.5.0.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.0"> <locale> <disable> <filter/> </disable> </locale> </packet>

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

 The message node is optional.0.1.0"> <locale> <disable> <filter> <id>fr-FR</id> </filter> </disable> </locale> </packet> The positive response from the server looks as follows: <packet version="1.5. It does not return any value for this operation. Response Samples Disabling a single LP The following request packet disables French LP: <packet version="1. Data type: string.0.0"> <locale> <disable> <result> <status>ok</status> <filter-id>fr-FR</filter-id> <id>fr-FR</id> </result> </disable> </locale> </packet> .5.0.5. the result node also contains the message node.0.Supported Operations 635 Remarks In API RPC v.

the response from the server looks as follows: <packet version="1.0.5.5.5.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> .636 Supported Operations If the LP was not found.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.0"> <locale> <disable> <filter> <id>fr-FR</id> <id>ru-RU</id> </filter> </disable> </locale> </packet> A possible response from the server can look as follows: <packet version="1.0.

Country/Region Icelandic Icelandic .Malaysia Marathi Marathi .Indonesia Italian Italian .Mongolia Norwegian Norwegian (Bokmål) .Korea Kyrgyz Kyrgyz .Switzerland Japanese Japanese .Yemen Armenian Armenian .Kyrgyzstan Latvian Latvian .Kazakhstan Korean Korean .Italy Italian .Albania Arabic Arabic .Iceland Indonesian Indonesian .India Mongolian Mongolian .Japan Kannada Kannada .Belarus Bulgarian Bulgarian .Algeria Arabic – Bahrain Arabic – Egypt Arabic – Iraq Arabic – Jordan Arabic – Kuwait Arabic – Lebanon Arabic – Libya Arabic .South Africa Albanian Albanian .Syria Arabic .Supported Operations 637 Locale Codes Language Country/Region Afrikaans Afrikaans .Brunei Malay .Armenia Azeri Azeri .Qatar Arabic .India Kazakh Kazakh .Bulgaria Catalan Code af af-ZA 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 ar-YE hy hy-AM az az-AZ eu eu-ES be be-BY bg bg-BG ca Language .Morocco Arabic .Latvia Lithuanian Lithuanian .Saudi Arabia Arabic .Oman Arabic .Lithuania Macedonian Macedonian .Basque Belarusian Belarusian .United Arab Emirates Arabic .Azerbaijan Basque Basque .Tunisia Arabic .Former Yugoslav Republic of Macedonia Malay Malay .Norway 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 lt-LT mk mk-MK ms ms-BN ms-MY mr mr-IN mn mn-MN no nb-NO .

Trinidad and Tobago English .Panama Code nn-NO pl pl-PL pt pt-BR pt-PT pa pa-IN ro ro-RO ru ru-RU sa 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 .Russia Sanskrit Sanskrit .Slovenia Spanish Spanish .United States English .South Africa English .Faroe Islands Code ca-ES zh zh-HK zh-MO zh-CN zh-SG zh-TW hr hr-HR cs cs-CZ da da-DK 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 en-US en-ZW et et-EE fo fo-FO Language .Mexico Spanish .Philippines English .Australia English .Croatia Czech Czech .Guatemala Spanish .Macao SAR Chinese .Caribbean English .Colombia Spanish .Chile Spanish .Spain Chinese Chinese .Costa Rica Spanish .Belgium Dutch .Country/Region Norwegian (Nynorsk) .Singapore Chinese .Estonia Faroese Faroese .Bolivia Spanish .Belize English .Norway Polish Polish .Poland Portuguese Portuguese .Slovakia Slovenian Slovenian .Nicaragua Spanish .The Netherlands English English .Ecuador Spanish .Taiwan (Traditional Chinese) Croatian Croatian .China (Simplified Chinese) Chinese .India Romanian Romanian .India Serbian Serbian .Czech Republic Danish Danish .New Zealand English .Brazil Portuguese .Argentina Spanish .Zimbabwe Estonian Estonian .Serbia Slovak Slovak .Honduras Spanish .Romania Russian Russian .Portugal Punjabi Punjabi .Ireland English .638 Supported Operations Language Country/Region Catalan .El Salvador Spanish .Hong Kong SAR Chinese .Canada English .United Kingdom English .Dominican Republic Spanish .Denmark Dutch Dutch .Jamaica English .

Luxembourg German .Germany German .Georgia German German .Uzbekistan Vietnamese Vietnamese .Luxembourg French .Belgium French .Country/Region Spanish .Thailand Turkish Turkish .Kenya Swedish Swedish .Finland Swedish .Turkey Ukrainian Ukrainian .Russia Telugu Telugu .Monaco French .Supported Operations 639 Language Country/Region Farsi Farsi .Sweden Tamil Tamil .Pakistan Uzbek Uzbek .Liechtenstein German .Peru Spanish .Iran Finnish Finnish .India Tatar Tatar .Galician Georgian Georgian .Finland French French .Ukraine Urdu Urdu .Venezuela Swahili Swahili .Switzerland Galician Galician .Switzerland Greek Greek .India Hungarian Hungarian .India Hebrew Hebrew .India Thai Thai .Uruguay Spanish .Austria German .Israel Hindi Hindi .Hungary Code fa fa-IR fi fi-FI fr fr-BE fr-CA fr-FR fr-LU fr-MC fr-CH gl gl-ES ka ka-GE de de-AT de-DE de-LI de-LU de-CH el el-GR gu gu-IN he he-IL hi hi-IN hu hu-HU Language .Greece Gujarati Gujarati .Vietnam Code es-PY es-PE es-PR es-ES es-UY es-VE 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 .Paraguay Spanish .Spain Spanish .Canada French .France French .Puerto Rico Spanish .

..... In other words...... These log files are analyzed by the statistical utilities running on the server.. 641 Filtering Issues ......... In this section: Log Rotation Settings ...........1.................................................. Plesk client Description All connections to a domain and errors on the domain are registered in domain log files...................................................5......................... 650 Enabling Log Rotation Service .....1 API RPC version: 1...................... 661 Checking Status of Log Rotation Service ............................................. 667 .........640 Supported Operations Managing Log Rotation on Domain Operator: <log-rotation> XML Schema: logrotation......xsd Plesk version: 8... 642 Changing Log Rotation Settings ...............................................0. 644 Retrieving Log Rotation Settings ...................................................... logrotation represents Log Rotation service in Plesk.................................................. 656 Disabling Log Rotation Service ................0 Plesk user: Plesk Administrator............................................................................................................................... The log-rotation operator is used to manage raw and processed log files...

xsd). The graphical representation of the type is as follows:  The log-rotation node is required.Supported Operations 641 Supported operations      SET (on page 644) changes Log Rotation settings. Data type: integer. GET (on page 650) retrieves Log Rotation settings. . It specifies maximum size of a log file in bytes. Data type: LogRotationConditionType (logrotation. ENABLE (on page 656) enables Log Rotation service on a domain DISABLE (on page 661) disables Log Rotation service on a domain GET-STATUS (on page 667) retrieves status of Log Rotation service Log Rotation Settings The settings are defined by type LogRotationSettingsType (logrotation.xsd)  The log-bysize node is required. specifies log limits. On achieving a limit the log file is removed and new log file is started.

........ It specifies how many processed by statistical utilities log files are stored on the server. The request XML packet filters web user accounts using a special <filter> node.. The log-email node is optional... It specifies interval of logging... nested in the filter node are called filtering rule.................................... Data type: string......0................5.....xsd)............................0 and earlier versions......... Parameters............. The log-compress node is optional.... Allowed values: Daily | Weekly | Monthly The log-max-num-files node is optional............. 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..................... Data type: string. It specifies if log files are compressed............ It specifies e-mail address on which processed log files will be sent........ the type of this node is emailType (common. 643 .. Data type: integer............ A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node.... Data type: boolean..... A single operation can use only parameters of the same type in the filtering rule. 643 filter-id ..642 Supported Operations     The log-bytime node is required..... In this section: Log Rotation Filter ..... Note: In API RPC 1...

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

.....0......... and its graphical representation is as follows: ... If one of the following values was set as a filter rule parameter..... the filter-id node is nested in a response packet............ it is returned in the filter-id node of the response packet..........................     Domain ID Domain name Client ID Client login name It is done to trace request parameters in case of error............... 647 Response Samples .... 648 Request Packet Structure A request XML packet changing Log Rotation settings includes the set operation node: <packet version="1................... Data type: anySimple............................................................................................................644 Supported Operations filter-id If an operation in a request packet uses filters..............................xsd).......... Changing Log Rotation Settings The set operation is used to change settings of Log Rotation..........0"> <log-rotation> <set> … </set> </log-rotation> </packet> The set node is presented by type LogRotationSetInput (logrotation....5....................... It returns the filtering rule parameter...................................................... 645 Response Packet Structure .......... In this section: Request Packet Structure. 644 Request Samples ............

xsd). refer to the Log Rotation Settings (on page 641) section. Specifies the filtering rule. refer to the Filtering Issues (on page 642) section.5..0.Supported Operations 645  The filter node is required. The settings node is required.0"> <log-rotation> <set> … </set> . For details. Data type: LogRotationSettingsType (logrotation.  Remarks You can use different filtering rules in a single packet. Add as many set operations as the number of different filtering rules.com: <packet version="1.0"> <log-rotation> <set> <filter> <domain-name>example.0. <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. Data type: logRotationFilterType (logrotation.xsd)..5. It specifies Log Rotation settings.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> . For more information.

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.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> .0.5.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> The following request packet changes Log Rotation settings of domain example.0.646 Supported Operations 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.com and the domain with ID 6: <packet version="1.5.

Data type: string. It returns a filtering rule parameter. Data type: string. The errcode node is optional. It wraps the response retrieved from the server. The status node is required. Allowed values: ok | error. Data type: anySimple. It specifies the execution status of the set operation.xsd) and structured as follows:      The result node is required. Data type: resultFilterType (common. For more information. The filter-id node is required. It returns the error message if the set operation fails.0. The errtext node is optional. It returns the error code if the set operation fails. .xsd). Data type: unsignedInt.0"> <log-rotation> <set> <filter/> <settings> <log-condition> <log-bysize>2073741824</log-bysize> </log-condition> </settings> </set> </log-rotation> </packet> Response Packet Structure The set node of the output XML packet is presented by type LogRotationSetOutput (logrotation. refer to the Filtering Issues (on page 643) section.Supported Operations 647 The following request packet changes Log Rotation settings of all domains available for a packet sender: <packet version="1.5.

0"> <log-rotation> <set> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.com</filter-id> </result> </set> </log-rotation> </packet> . Response Samples Changing settings of a single domain The following request packet changes Log Rotation settings of domain example. Data type: integer. the response from the server looks as follows: <packet version="1.0.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. If the set operation succeeds. it holds the ID of the domain matched by the filtering rule.0"> <log-rotation> <set> <result> <status>ok</status> <filter-id>example.com: <packet version="1.com</filter-id> <id>33</id> </result> </set> </log-rotation> </packet> If the domain was not found.648 Supported Operations  The id node is optional.5.5.0.5.0"> <log-rotation> <set> <filter> <domain-name>example.

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.Supported Operations 649 If a packet sender has no rights to manage physical hosting. the response looks as follows: <packet version="1.com</filter-id> </result> </get> </log-rotation> </packet> If the domain is not hosted physically.5.0.5.5.0. the response from the server looks as follows: <packet version="1.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1034</errcode> <errtext>The domain is not hosted physically</errtext> <filter-id>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> .0"> <log-rotation> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Access denied</errtext> <filter-id>example.0.

..5........................................................................................................ 651 Request Samples ........ 652 Response Packet Structure ........0..................................................................................... In this section: Request Packet Structure....................................... 654 ................................................................. 653 Response Samples .....................650 Supported Operations 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.......

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

0.com and the domain with ID 6: <packet version="1.0"> <log-rotation> <get> <filter> <domain-name>example.0"> <log-rotation> <get> <filter/> </get> </log-rotation> </packet> .com</domain-name> </filter> </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"> <log-rotation> <get> <filter> <domain-id>6</domain-id> </filter> </get> <get> <filter> <domain-name>example.5.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"> <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.0.0.com: <packet version="1.5.5.0.652 Supported Operations Request Samples Retrieving settings of a single domain The following request packet retrieves Log Rotation settings of domain example.

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

654 Supported Operations Response Samples Retrieving settings of a single domain The following request packet retrieves Log Rotation settings of domain example.0"> <log-rotation> <get> <result> <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.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"> <log-rotation> <get> <filter> <domain-name>example.0.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.com: <packet version="1.5.com</filter-id> </result> </get> </log-rotation> </packet> .5. the response from the server looks as follows: <packet version="1.

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.0.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> .5.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.0.5.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1034</errcode> <errtext>The domain is not hosted physically</errtext> <filter-id>example.com</filter-id> </result> </get> </log-rotation> </packet> If the domain is not hosted physically. the response looks as follows: <packet version="1.Supported Operations 655 If a packet sender has no rights to manage physical hosting.5.0"> <log-rotation> <get> <result> <status>error</status> <errcode>1006</errcode> <errtext>Access denied</errtext> <filter-id>example. the response from the server looks as follows: <packet version="1.5.0.0.

................................................................................................... In this section: Request Packet Structure...................................................... 659 Response Samples ....................................... 660 Request Packet Structure A request XML packet enabling Log Rotation service includes the enable operation node: <packet version="1............................... 656 Request Samples ..................656 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> Enabling Log Rotation Service Use the enable operation to enable Log Rotation service on domains..................0"> <log-rotation> <enable> … </enable> </log-rotation> </packet> ....................5............................................................... 657 Response Packet Structure .....0....

<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. For more information.xsd). Data type: logRotationFilterType (logrotation. Remarks You can use different filtering rules in a single packet.Supported Operations 657 The enable node is presented by type LogRotationEnableInput (logrotation. refer to the Filtering Issues (on page 642) section. Specifies the filtering rule.5. <packet version="1.0.. and its graphical representation is as follows:  The filter node is required.0"> <log-rotation> <enable> <filter> <domain-name>example.5..com: <packet version="1.com</domain-name> </filter> </enable> </log-rotation> </packet> .0.xsd).0"> <log-rotation> <enable> … </enable> . Add as many enable operations as the number of different filtering rules.

0.5.5.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.0"> <log-rotation> <enable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </enable> </log-rotation> </packet> The following request packet enables Log Rotation service on domain example.658 Supported Operations Enabling Log Rotation service on multiple domain The following request packet enables Log Rotation service on domains used by the clients with ID 5 and ID 8: <packet version="1.0"> <log-rotation> <enable> <filter/> </enable> </log-rotation> </packet> .0"> <log-rotation> <enable> <filter> <domain-id>6</domain-id> </filter> </enable> <enable> <filter> <domain-name>example.0.com and the domain with ID 6: <packet version="1.0.5.

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

com: <packet version="1.0.com</filter-id> <id>33</id> </result> </enable> </log-rotation> </packet> If the domain was not found.0.0"> <log-rotation> <enable> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.0"> <log-rotation> <enable> <result> <status>ok</status> <filter-id>example.0.5.com</domain-name> </filter> </enable> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1. the response from the server looks as follows: <packet version="1.5.0"> <log-rotation> <enable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </enable> </log-rotation></packet> .5.5.com</filter-id> </result> </enable> </log-rotation> </packet> 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.0"> <log-rotation> <enable> <filter> <domain-name>example.0.660 Supported Operations Response Samples Enabling Log Rotation service on a single domain The following request packet enables Log Rotation service on domain example.

5.Supported Operations 661 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.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> .

............................................................. 665 Response Samples .............................. In this section: Request Packet Structure........ 666 .................................. 664 Response Packet Structure ................................................................ 663 Request Samples ..........................................................................................................662 Supported Operations Disabling Log Rotation Service Use the disable operation to disable Log Rotation service on domains.............................................

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

5.com: <packet version="1.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.5.0.664 Supported Operations Request Samples Disabling Log Rotation service on a single domain The following request packet disables Log Rotation service on domain example.5.0"> <log-rotation> <disable> <filter> <domain-name>example.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.com and the domain with ID 6: <packet version="1.0.0"> <log-rotation> <disable> <filter> <domain-id>6</domain-id> </filter> </disable> <disable> <filter> <domain-name>example.0"> <log-rotation> <disable> <filter/> </disable> </log-rotation> </packet> .0.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.0.

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

666 Supported Operations Response Samples Disabling Log Rotation service on a single domain The following request packet disables Log Rotation service on domain example. the response from the server looks as follows: <packet version="1.0"> <log-rotation> <disable> <filter> <domain-name>example.0"> <log-rotation> <disable> <filter> <client-id>5</client-id> <client-id>8</client-id> </filter> </disable> </log-rotation> </packet> .com</domain-name> </filter> </disable> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0.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.0.5.com</filter-id> <id>33</id> </result> </disable> </log-rotation> </packet> If the domain was not found.0.0.0"> <log-rotation> <disable> <result> <status>ok</status> <filter-id>example.5.5.com: <packet version="1.0"> <log-rotation> <disable> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.5.

.....Supported Operations 667 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..............5............................................................................ 668 Request Samples ...... In this section: Request Packet Structure.............................. 671 ................................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..................................................................................................... 669 Response Packet Structure ............................................................. 670 Response Samples ......0....................

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

0"> <log-rotation> <get-status> <filter/> </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> The following request packet retrieves status of Log Rotation service on domain example.0.0.Supported Operations 669 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.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.com: <packet version="1.5.5.0.0"> <log-rotation> <get-status> <filter> <domain-id>6</domain-id> </filter> </get-status> <get-status> <filter> <domain-name>example.5.0"> <log-rotation> <get-status> <filter> <domain-name>example.com and the domain with ID 6: <packet version="1.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.0.

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

the response from the server looks as follows: <packet version="1.com</filter-id> <id>33</id> </result> </get-status> </log-rotation> </packet> If the domain was not found.com</domain-name> </filter> </get-status> </log-rotation> </packet> A positive response from the server can look as follows: <packet version="1.0.0.0"> <log-rotation> <get-status> <result> <status>error</status> <errcode>1013</errcode> <errtext>domain does not exist</errtext> <filter-id>example.0.com: <packet version="1.Supported Operations 671 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.5.0"> <log-rotation> <get-status> <result> <status>ok</status> <filter-id>example.0"> <log-rotation> <get-status> <filter> <domain-name>example.com</filter-id> </result> </get-status> </log-rotation> </packet> .5.5.

0.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.5.672 Supported Operations 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.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> .5.

redirects. Creating Plesk mail user is equivalent to creating a special mail account on the specified domain. refer to the Mail Service Settings (see page 675) and Mail User Account Settings (see page 677) sections.xsd. Mail user settings specify the following:           Mail name and password.xsd. These settings also specify the mail service behaviour when an incoming message is addressed to a non-existent user.4 for UNIX and later | Plesk 8.5. files. 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. This operation is allowed to Plesk Administrator and Plesk client. mail aliases Mail user access to his mail account through Plesk GUI 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. Mail user is the less privileged Plesk user. plesk_mailname.5.3. All objects created within the mail account (autoresponders. etc. Mail account presents a collection of settings and lists of various objects.Supported Operations 673 Managing Mail on Domain Level Operator: <mail> XML Schema: mail_input. mail_output.xsd Plesk version: Plesk 7.) share the disk space of the domain that owns this mail account.0 and higher Plesk user: Plesk Administrator. 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. The mail service settings specify whether the Webmail application is turned on for a particular domain. .

674 Supported Operations Supported operations   CREATE (see page 691) creates a mail account on a specified domain and sets a collection of settings for it UPDATE (see page 695) serves to update mail account settings. and automatic reply messages set for the mail account GET_INFO (see page 703) serves to retrieve various information about the specified mail accounts from Plesk database REMOVE (see page 708) removes the specified mail account and all its settings from Plesk database ENABLE (see page 712) turns on the mail service on the specified domain DISABLE (see page 712) turns off the mail service on the specified domain SET_PREFS (see page 717) sets mail service preferences for the specified domains GET_PREFS (see page 721) gets mail service preferences set for the specified domains RENAME (see page 725) renames the specified mail box        . It is specially designed to operate lists of mail group members. repository files.

.. 677 Filtering Issues ....................... Data type: string......................................1.. 703 Deleting Mail Accounts ...... Data type: Boolean..... 712 Setting Mail Service Preferences....................................Supported Operations 675 In this section: Mail Service Preferences................................................................................................................................. Data type: string................................. The reject node is used to reject such mail messages (they will not be accepted by the mail server)............................ The webmail node is optional............................ (Available since API RPC version 1.............. 690 Creating Mail Accounts ...................................................................................2.......................5..................... 725 Mail Service Preferences Mail service settings are defined in the MailPreferences complex type (plesk_mailname...................................... The bounce node is used to modify the default rejection message.................... 675 Mail Account Settings ....................................... By default..................... the node specifies whether the spam protection is turned on on the domain..... 691 Modifying Mail Account Settings ................. Data type: none....... 695 Getting Mail Account Settings .................... 708 Enabling/Disabling Mail Service on Domain ........................................................ The spam-protect-sign node is optional......... It specifies the way the server handles messages sent to unknown mail users (not registered on the domain)................................... such messages are sent back to the sender with a message: ―this address no longer accepts mail‖................... 717 Getting Mail Service Preferences ............................... Data type: Boolean......... It specifies whether mail users will have access to their mail via a WebMail application...........) ................. 721 Renaming Mail Accounts .............. This type is structured as follows:       The nonexistent-user node is optional........... If the DomainKeys spam protection is available on the server.................................xsd). The forward node specifies the mail address to which undelivered mail should be forwarded.....

5.2.1.0 and earlier.2.676 Supported Operations For API RPC version 1. a packet which sets mail service preferences for three domains can look as follows: <packet version=”1.5.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> .1”> <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> <spam-protect-sign>true</spam-protect-sign> </prefs> </set_prefs> </mail> </packet> For API RPC version 1.5.4.2.2. the following packet sets mail service preferences for three domains: <packet version=”1.

Supported Operations 677 Mail Account Settings Mail account settings are specified by complex type mailnameType (plesk_mailname. It is structured as follows:  The id node is optional. Data type: integer. It specifies the identifier of the mail user (if this user already exists in Plesk database). .xsd).

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

........... 681 Redirecting Settings .................................................................................. 685 Repository Settings ..................... 687 Mail User Permissions .................................................................................................... 688 ........................................................................................................................................................................................................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> In this section: Control Panel Settings.......................... 684 Automatic Response Settings ................ 680 Mail Box Settings .......................................................Supported Operations 679 The following sample packet creates a mail account and sets a collection of settings for it: <packet version=”1...............2......4..................................................................................... 682 Mail Group Settings ..

it is nested within the mailname node (see the structure of this node in the Mail User Account Settings (see page 677) section). If you use get_info to retrieve the value of this parameter. It specifies a collection of CP access settings.680 Supported Operations Control Panel Settings The cp_access node is used to enable/disable access to the personal mail account through control panel (CP). If CP access is allowed.5.4. Data type: none.2. Data type: integer. The multiply_login node is optional.1. . The access node is required.5. The disable_lock_screen node is optional.1. the cp_access node can specify a collection of GUI preferences for the mail user.0 and later. Data type: string. Data type: boolean. the four-letter locale name is returned.1. Data type: boolean.0 or later. The locale node is optional.2. The cp_access node does not have a special data type.0. If you use API RPC v. you can also use two-letter locale names. If set to true.    The skin_id node is optional. In API RPC v. the operations will be successfully processed. It is used to enable the CP access to the mail user page. It specifies what language is used when displaying the CP to the mail user.0 or earlier versions. and request packet protocol is API RPC v. It allows/prohibits creating multiple simultaneous CP sessions with the mail user credentials. it prevents mail user from working with CP until the GUI is completely loaded. you will receive the error (error code 1019). It specifies what interface skin (by ID) is used when displaying the CP to the mail user.0. Note: In API RPC v. Default value: en-US. use four-letter locale names (RFC 1766). It is structured as follows:    The enabled node is optional.1. If you specify two-letter locale name in a request packet.0 and earlier versions. Data type: boolean.4.

it is nested within the mailname (see page 677) node. Data type: integer. It shows whether the mail user can use the mail box created on Plesk server.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. Data type: Boolean. It is structured as follows:   The enabled node is optional. Default value: true. . It specifies the maximum size of the mail box (in bytes). and to restrict the size of the mail box as well. The mailbox node does not have a special data type.2.Supported Operations 681 The following sample packet creates mail account and sets up CP access to the mail user page: <packet version=”1. The quota node is optional.4.

4. request packet should contain the redirect node within the mailname parent node. and specifies the limit for the mail box size: <packet version=”1.2. Data type: boolean. . The address node is optional. The redirect node does not have a special data type. Data type: string. Default value: false. it is defined within the parent node as follows:   The enabled node is required. It enables the redirect feature for a particular mail account. It holds an email address to which the correspondence will be redirected. enables the use of mail box on it.682 Supported Operations The following sample packet creates a mail account.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. To enable the redirect feature for a particular mail account.

com</address> </redirect> </mailname> </filter> </create> </mail> </packet> .4.com: <packet version=”1.Supported Operations 683 The following sample packet creates a mail account. and makes it redirect all incoming messages to techdept@example.2.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <redirect> <enabled>true</enabled> <address>techdept@example.

To enable the mail group functionality for a particular mail account. It holds an email address of this mail group member. request packet should contain the mailgroup node within the mailname parent node. The address node is optional. Data type: string.com</address> </mailgroup> </mailname> </filter> </create> </mail> </packet> . The mailgroup node does not have a special data type.684 Supported Operations 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.2.com</address> <address>automation@example. Default value: false.4. It enables the mail group functionality for the mail account. Data type: boolean. it is defined within the parent node as follows:   The enabled node is required.0”> <mail> <create> <filter> <domain_id>12</domain_id> <mailname> <name>bfischer</name> <mailgroup> <enabled>true</enabled> <address>techdept@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.

It specifies an autoresponder object. An autoresponder object is a collection of conditions (events) on which the automatic response message is sent back. In addition. . Default value: false. Data type: boolean. It enables/disables the feature on the mail account. It is structured within the autoresponders node as follows:  The name node is required. Data type: none. 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. Data type: string. it can specify how this automatic response will act. It specifies the name of the autoresponder. The autoresponder node does not have a special data type. The autoresponder node is optional. Finally. See the structure of this node below.Supported Operations 685 Automatic Response Settings The automatic response settings are specified for each mail account by the list of autoresponder objects. this object specifies the text of this response and the attachment (a file stored in the a mail box repository).

Data type: string. It specifies the maximum number of automatic replies that can be sent back to the mail address. It specifies the text of the automatic response message. Data type: integer. Data type: string. Data type: string. It specifies the email address to which the original message will be forwarded. The mem_limit node is optional. Data type: boolean.            . Data type: string. Data type: string. The content_type node is optional. It specifies the part of an incoming message (body. Default value: false. It specifies the Content type field in the incoming message header that will enable the autoresponder sending back its message. Data type: string. The attachment node is optional. Data type: string. It specifies the Reply to field in an incoming message header that will enable the autoresponder sending back its message. Data type: string. It specifies the key string in the incoming message that will enable this autoresponder sending back its message. It specifies the subject field in the incoming message header that will enable this autoresponder sending its message back. The key_where node is optional. It specifies the maximum number of unique email addresses that can be stored. The reply_to node is optional. It specifies the name of the file to be attached to the response message. The forward node is optional. It enables/disables the use of the autoresponder object. The keystr node is optional. Allowed values: subj | no | body. Allowed values: text/html | text/plain.686 Supported Operations  The enabled node is optional. Data type: string. The charset node is optional. The subject node is optional. Data type: integer. The ans_freq node is optional. It specifies the charset field in the incoming message header that will enable the autoresponder sending back its message. subject) where the key string should be searched. The text node is optional.

Data type: base64.4.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.</text> <forward>techdept@technolux. It specifies the file name. It specifies a single file object. Data type: string. The stored files can be used as attachments to automatically sent messages. The name node is required.co.Supported Operations 687 The following sample packet creates a mail account and specifies autorespoder settings for it: <packet version=”1.2. each describing a single file as file name and file contents. . Thank you.    The file node is required. It is defined within the parent type mailnameType. 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. The content node is optional. or for other needs. A repository presents a collection of file objects. The repository node does not have a special data type. Data type: none.uk</forward> </autoresponder> </autoresponders> </mailname> </filter> </create> </mail> </packet> Repository Settings Every mail account is provided with a personal file repository.

... there are two possible ways of retrieving mail user permissions... . 689 API RPC v..688 Supported Operations The following get_info response packet returns the list of files stored in the repository of the specified mail account: <packet version=”1..1.............4........0 and later versions you should manage mail user permissions according to the following XML schema:  The permission node is required.......1.0................. It specifies mail user permissions....2.5.......txt</name> </file> <file> <name>attach2.....2.4.5.2...0 and Later Versions In the API RPC v.....0.......0”> <mail> <get_info> <result> <status>ok</status> <mailname> <name>techdept</name> <repository> <file> <name>attach1.5.....0...xsd)..1. In this section: API RPC v. 688 API RPC v.... The other way is parameter-undependable....4........0 and earlier versions is parameterdependable......0.....0 and Later Versions.....1.. Data type: PleskPermissionType (plesk_common......0.. The way used in the API RPC v..txt</name> </file> </repository> </mailname> </result> </get_info> </mail> </packet> Mail User Permissions Starting from API RPC 1..0 and Earlier Versions ..5.....1..

0 and Earlier Versions Mail user permissions are defined by complex data type MailUserPermission (plesk_mailname. Data type: sting. Data type: anySimple.0. It specifies a permission value.xsd).Supported Operations 689   The name node is required. Sample The following packet creates a mail account and sets permissions for it: <packet version=”1.5.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> <permission> <name>manage_spamfilter</name> <value>true</value> </permission> </permissions> </mailname> </filter> </create> </mail> </packet> API RPC v. The value node is required. This type is structured as follows: .4.1. It specifies a permission name.2.

It specifies the domain ID. The mailname node is required.2. The manage_spamfilter node is optional. It allows/prohibits the mail user changing settings of the antivirus software integrated with Plesk (DrWeb). It holds a collection of mail account settings that will be affected. Data type: boolean. The mail operator uses filtering in most of its operations. The filter node used in operations create and update is presented by the mailnameFilterType complex type (mail_input. It allows/prohibits the mail user changing settings of the spam filtering software integrated with Plesk (SpamAssassin). The manage_drweb node is optional.4.xsd).690 Supported Operations    The cp_access node is optional. It allows/prohibits the mail user access to their mail box through Plesk GUI. Data type: mailnameType (plesk_mailname. . This filter can pick out one to many mail account existing on the same domain.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> Filtering Issues . Data type: boolean. This data type is structured as follows:   The domain_id node is required. Data type: integer.xsd). The following packet creates a mail account and sets permissions for it: <packet version=”1. Data type: Boolean.Filtering is the way request packets pick out mail accounts to which the requested operation will be applied.

and the mail account name. respectively). The mail operator uses two more types of filtering (type GetInfoAdvancedFilter. In addition. These types are designed for particular cases and considered in the relevant sections (Getting Mail Account Settings (see page 703) and Deleting Mail Accounts (see page 708).com mail account (a mail group) with several new mail addresses. type mailFilterType). Creating Mail Accounts Mail user account can be created on the specified domain either by Plesk Administrator or by Plesk client. you can specify various mail account settings (all of them are optional):           Mail user access to the account through Plesk GUI 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 . To register new mail account in Plesk database.com</address> <address>techgroup@example. we never specify the entire mail name.4. it is enough to specify some general setup information.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>ann</name> <mailgroup> <enabled>true</enabled> <address>techdept@example. The domain part of it is specified by the domain_id node.2.Supported Operations 691 When filtering mail accounts. <packet version=”1. and the mail user name is specified by the name node within the mailname section.com</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> The packet above modifies settings of the ann@example. namely: the domain ID where the mail account will be registered.com</address> <address>findept@example.

....... Data type: mailnameType (plesk_mailname............... It holds a collection of data describing mail accounts to be created..................................................... 695 Request Packet Structure A request XML packet creating a mail account in Plesk database includes the create operation node: <packet version=”1.........0”> <mail> <create> … </create> </mail> </packet> The create node does not have a separate type............................... or it can hold just some of them.................. It uniquely identifies the domain on which the mail account will be created......... The mailname node is required............... 692 Request Samples . Data type: integer....... It defines the name of a mail account...........................................xsd).... You can specify these settings when creating a mail account or later (they can be set using the set_prefs operation)...................2...xsd) The domain_id node is required.................692 Supported Operations A mail account can have all these settings specified............. 692 Response Packet Structure . In this section: Request Packet Structure........... The create node has the following graphics representation:    The filter node is required....... 694 Response Samples ..............................4. Data type: mailnameFilterType (plesk_mailname................. See the structure of this node in the Mail User Account Settings (see page 677) section.... and a collection of mail account settings (if any specified)............. it is nested within the MailTypeRequest type (mail_input..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> To create multiple mail accounts on different domains within one packet.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> .Supported Operations 693 Request Samples The following packet creates on a single domain two mail accounts with a minimum of settings: <packet version=”1. use multiple create nodes: <packet version=”1.4.4.2.2.

The status node is required. Data type: string. The mailname node is optional. Data type: operationresultType (common. The errcode node is optional.694 Supported Operations <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.xsd). The packets are similar in both cases. It returns the execution status of the create operation. Data type: unsignedInt. It returns an error message if the create operation fails. It wraps the result of the requested create operation. Data type: mailnameType (plesk_mailname. To see the structure of this node. refer to the Mail User Account Settings (see page 677) section. It returns an error code when the create operation fails. Returns a collection of settings set for the mail account that has just been created. . Response Packet Structure The create node of the response packet is structured as follows:      The result node is required. It is required if the create operation succeeds. Allowed values: ok | error. except for Plesk clients can create mail accounts on their own domains only.xsd). The errtext node is optional. Data type: string.

2.</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.4.2. .Supported Operations 695 Response Samples A positive response received from server after creating two mail accounts on the same domain looks as follows: <packet version=”1.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> A negative response can look as follows: <packet version=”1.4.</errtext> </result> </create> </mail> </packet> The result blocks do not indicate creation of which mail accounts has failed.0”> <mail> <create> <result> <status>error</status> <errcode>1015</errcode> <errtext>Object owner not found. To distinguish between multiple requests.

........................ It means that all settings specified in the packet will replace all the settings already existing for the mail account...........   In this section: Request Packet Structure ... This sub-operation can be applied to any setting................  The add sub-operation is a typical update operation.............................. All these sub-operations were designed for working with the lists of objects kept in mail accounts. These settings are as follows:           Mail user access to his account through Plesk GUI 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.701 Response Samples ................... The settings not mentioned in the packet will be kept unchanged.............698 Response Packet Structure . and the settings already existing will be kept unchanged..........................................................697 Request Samples ................................. and set......................... remove............................ It means that all the setting specified in the packet will be removed from a mail account......... The set sub-operation is a hybrid (delete + update) operation........................696 Supported Operations Modifying Mail Account Settings Mail account settings can be modified either by Plesk Administrator or by Plesk client........ The remove sub-operation is a typical delete operation.......702 ................................................. It means that all the setting specified in the packet will be added to a mail account..

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

uk</address> <address>findept@advent.co.co. <packet version=”1.uk</address> <address>nick@advent.2.co.4.co.uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>bob@advent. use multiple create elements: <packet version=”1.co.uk</address> <address>techgroup@advent.2.co.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techdept@advent.uk</address> <address>techgroup@advent.0”> <mail> <update> <add> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techdept@advent.co.uk</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> To add new settings to email accounts that belong to different domains.co.uk</address> </mailgroup> </mailname> </filter> </add> .698 Supported Operations 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>findept@advent.4.uk</address> <address>ann@advent.co.

co.co.uk and findept@advent. The second mail group stores one address (bob@techservice.4. .uk</address> </mailgroup> </mailname> </filter> </add> </update> </mail> </packet> 699 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.uk</address> </mailgroup> </mailname> </filter> </remove> </update> </mail> </packet> The first mail group stores two addresses now (techdept@advent.uk</address> <address>ann@techservice.2.uk).co.uk</address> <address>nick@techservice.co.uk).uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>ann@techservice.co.co.0”> <mail> <update> <remove> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techgroup@advent.Supported Operations </update> <update> <add> <filter> <domain_id>13</domain_id> <mailname> <name>bfischer</name> <mailgroup> <enabled>true</enabled> <address>bob@techservice.uk</address> <address>nick@techservice.co.

uk</address> <address>nick@techservice.co.co.uk</address> </mailgroup> </mailname> </filter> </set> </update> </mail> </packet> .co.uk</address> </mailgroup> </mailname> <mailname> <name>webmaster</name> <mailgroup> <enabled>true</enabled> <address>ann@techservice.700 Supported Operations Setting new mail account settings The following packet removes all email addresses from mail groups of the specified two email user accounts.2.co.0”> <mail> <update> <set> <filter> <domain_id>12</domain_id> <mailname> <name>admin</name> <mailgroup> <enabled>true</enabled> <address>techgroup@advent. After that the new addresses are added to the lists: <packet version=”1.4.uk</address> <address>fingroup@advent.

To see the structure of this node. The mailname node is optional. Data type: mailnameType (plesk_mailname. The result node is required. after which the passed-in settings are applied to the mail account).        . Data type: none. other settings are kept unchanged).xsd). The remove node is required. It returns the result of the remove sub-operation (the passed-in settings are removed from the mail account. Allowed values: ok | error.xsd). It returns an error message if the update operation fails. Data type: none. It returns the execution status of the update operation. Data type: unsignedInt. Data type: string. Returns a collection of updated settings of the specified mail account(s).Supported Operations 701 Response Packet Structure The update node of the response packet is structured as follows:  The add node is required. It returns the result of the set sub-operation (all previously set settings are removed. The errtext node is optional. The errcode node is optional. Data type: none. all previously set settings are kept unchanged). Data type: operationresultType (mail_output. It returns an error code when the update operation fails. The status node is required. The set node is required. It is required if the update operation succeeds. Data type: string. refer to the Mail User Account Settings (see page 677) section. It returns the result of the add sub-operation (the passedin settings are added to the mail account. It wraps the result of the update operation.

</errtext> <mailname> <name>techdept</name> </mailname> </result> </add> </update> </mail> </packet> If the result blocks do not indicate what particular email account failed.702 Supported Operations Response Samples Here is a sample response received from server after the specified mail accounts are updated with new settings successfully: <packet version=”1.</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.2. you can rely on the order they followed one another in the request packet.2.0”> <mail> <update> <add> <result> <status>error</status> <errcode>1015</errcode> <errtext>Object owner not found.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. a negative response packet looks as follows: <packet version=”1.4. . If the update operation on any mail account fails.4.

.....0”> <mail> <get_info> … </get_info> </mail> </packet> .............................. redirects.. 703 Request Samples ....... In this section: Request Packet Structure......................................................................... Plesk clients are allowed to get settings of mail accounts registered on their own domains only..Supported Operations 703 Getting Mail Account Settings Plesk Administrator can get settings of any mail account registered on any domain.4........................... and alias Control panel access settings Mail box settings Automatic responses..................... 707 Request Packet Structure A request XML packet getting a collection of mail account settings should include the get_info operation node: <packet version=”1................... name...2.......................... 706 Response Samples ............................................................................................................... stored files Mail group settings Mail user permissions Use the get_info operation to retrieve domain settings............ The settings are as follows:       Mail account identifier............... 705 Response Packet Structure ...

It holds a collection of data describing which mail account settings to retrieve. Note: This node is supported in API RPC 1.5. Data type: GetInfoAdvancedFilter (mail_input. The cp_access node is optional.2. . it is nested within the MailTypeRequest complex type (mail_input.704 Supported Operations The get_info node does not have a separate type.  The redirect node is optional. Data type: string. Data type: integer. It indicates that control panel access settings of the specified mail account are requested. Data type: none. The get_info node has the following graphics representation:       The filter node is required. It indicates that mail box settings of the specified mail account are requested. The domain_id node is required. Data type: none.xsd). The name node is optional. It specifies the name of the mail account. It indicates that the list of redirects of the specified mail account is requested. the amount of disk space used by a specific mailbox will be retrieved in the response packet. Data type: none. If it is present in the request packet. The mailbox node is optional. The mailbox-usage node is optional.0 and later versions. Data type: none. It specifies the identifier of the domain which mail accounts are requested.xsd).

The repository node is optional. It indicates that the list of aliases of the given mail account is requested.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> . Data type: none. It indicates that the list of files and their contents stored in the repository of the given mail account is requested. It indicates that the list of automatic-response objects of the given mail account is requested. Data type: none. Data type: none.2. Data type: none. The autoresponders node is optional.0 and later. It indicates that the mail group settings of the specified mail account are requested.4.  Request Samples The following sample packet requests for information on two mail accounts belonging to the same domain: <packet version=”1. The aliases node is optional. The repository_content node is optional. The permissions node is optional. This node is supported by API RPC 1. Data type: none. Data type: none.2. Data type: none.Supported Operations 705       The group node is optional. The groups node is optional.4. It indicates that a collection of permissions set for the given mail user is requested. It indicates that the list of mail groups in which the given account has a membership is requested. It indicates that the list of files stored in the repository of the given mail account is requested.

Data type: string. The status node is required. It can be missing if some error occurs before the validation starts. Data type: string. Can be used to return an error message if the get_info operation fails.2.0”> <mail> <get_info> <filter> <domain_id>12</domain_id> <name>techservice</name> <name>techknowledge</name> </filter> <cp_access/> <mailbox/> </get_info> <get_info> <filter> <domain_id>13</domain_id> <name>admin</name> </filter> <permissions/> </get_info> </mail> </packet> Response Packet Structure The get_info node of the response packet is structured as follows:  The result node is optional.4. Allowed values: ok | error. It is used to return the error code if the get_info operation fails. use multiple get_info sections: <packet version=”1. Data type: unsignedInt.706 Supported Operations To request information on mail accounts belonging to different domains. The errtext node is optional.xsd). Data type: resultType (common. It wraps the result of the requested get_info operation.    . The errcode node is optional. It returns the execution status of the get_info operation.

Supported Operations 707  The mailname node is required if the get_info operation succeeds.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> .2. See the structure of this node in the Mail Account Settings (see page 677) section.xsd). Data type: mailnameType (plesk_mailname. Response Samples A positive response that returns the requested information for the specified mail accounts can look as follows: <packet version=”1.4. It contains a collection of mail account settings ordered in the request packet.

.... 708 Request Samples ............................. Plesk Administrator can remove any mail account registered in Plesk.....................0”> <mail> <remove> … </remove> </mail> </packet> .... 709 Response Packet Structure ........ 710 Response Samples ...... In this section: Request Packet Structure....................4...................................................... while a Plesk client can delete mail accounts referring to domains that belong to this Plesk client only.....</errtext> <mailname> <name>techknowledge</name> </mailname> </result> </get_info> </mail> </packet> Deleting Mail Accounts The remove operation is used to remove one to many mail accounts at one stroke......................708 Supported Operations A negative response can look as follows: <packet version=”1.4......2.................2..</errtext> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed................................ 711 Request Packet Structure A request XML packet that deletes mail accounts should include the remove operation node: <packet version=”1........................................ provided all these accounts refer to the same domain........................0”> <mail> <get_info> <result> <status>error</status> <errcode>1013</errcode> <errtext>Object not found................................................................

The remove node has the following graphics representation:    The filter node is required. It specifies the name of the mail account to be deleted.xsd).xsd). Data type: integer. It specifies what mail accounts should be removed.2. Request Samples The following packet deletes several mail accounts belonging to one domain: <packet version=”1. It specifies the identifier of the domain which mail account (or several) will be deleted.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> . The name node is optional. it is nested within the MailTypeRequest type (mail_input. The domain_id node is required.4. Remarks To remove all mail accounts existing on a domain. Data type: string. Data type: mailFilterType (mail_input.Supported Operations 709 The remove node does not have a separate type. include to your request packet filter rule containing only domain_id node.

xsd). It wraps the result of the requested remove operation.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.0”> <mail> <remove> <filter> <domain_id>12</domain_id> </filter> </remove> </mail> </packet> Response Packet Structure The remove node of the response packet is structured as follows:  The result node is optional.710 Supported Operations To delete several mail accounts belonging to different domains. use multiple remove sections: <packet version=”1. Data type: resultType (common.4.2. .2. the following packet can be used: <packet version=”1.4.

Data type: string. See the structure of this node in the Mail User Account Settings (see page 677) section.2. Data type: mailnameType. It contains a settings of the mail account that has been deleted. Returns an error message if the remove operation fails.</errtext> <mailname> <name>techdept</name> </mailname> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.</errtext> <mailname> <name>techknowledge</name> </mailname> </result> </set_prefs></mail></packet> . Response Samples A positive response received from server after deleting particular mail accounts looks as follows: <packet version=”1. The errcode node is optional.4. The mailname node is required if the remove operation succeeds. It returns the execution status of the del operation.0”> <mail> <remove> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations 711     The status node is required. Data type: string. Allowed values: ok | error. Returns an error code when the remove operation fails.2.4. Data type: unsignedInt.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> A negative response can look as follows: <packet version=”1. The errtext node is optional.

........................................................0”> <mail> <enable> … </enable> </mail> </packet> The enable node does not have a separate data type.. Data type: integer.........................xsd)...............2............................................ 713 Response Packet Structure .......... it is nested within the MailTypeRequest type (mail_input.......................0”> <mail> <disable> … </disable> </mail> </packet> ............2................. It indicates the domain on which mail service should be turned on................................................712 Supported Operations Enabling/Disabling Mail Service on Domain Use the enable (disable) operation to enable (disable) mail service on a particular domain..... A request XML packet that disables mail service on the specified domain contains the disable operation node: <packet version=”1................. The enable node has the following graphics representation:  The domain_id node is required..4.......................... In this section: Request Packet Structure......... 712 Request Samples ................. 715 Response Samples ............. 716 Request Packet Structure A request XML packet that enables mail service on the specified domain contains the enable operation node: <packet version=”1....4...............

4. The disable node has the following graphics representation:  The domain_id node is required.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. send the following request: <packet version=”1.xsd).4.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> . Data type: it_type (integer). Request Samples The following request packet demonstrates how mail service can be enabled on multiple domains: <packet version=”1.2.2. it is nested within the MailTypeRequest complex type (mail_input.Supported Operations 713 The disable node does not have a separate data type. It indicates the domain on which mail service should be turned off.

2.4.0”> <mail> <enable> <domain_id>11</domain_id> </enable> <disable> <domain_id>12</domain_id> </disable> </mail> </packet> .714 Supported Operations API RPC allows the use of both these operations within a single packet and within the same mail operator: <packet version=”1.

Supported Operations 715 Response Packet Structure The enable node of the response packet is structured as follows:     The result node is optional. Data type: resultType (common. The status node is required. Can be used to return an error message if the disable operation fails. . Data type: unsignedInt. Data type: string. The status node is required. The disable node of the response packet is structured as follows:     The result node is optional. It is used to return an error code if the enable operation fails. It is used to return an error code if the disable operation fails. Allowed values: ok | error. The errcode node is optional. Data type: unsignedInt. The errcode node is optional. Can be used to return an error message if the enable operation fails. Data type: string. Allowed values: ok | error. Data type: string.xsd).xsd). The errtext node is optional. The errtext node is optional. It returns the execution status of the disable operation. Data type: resultType (common. It wraps the result of the requested enable operation. It returns the execution status of the enable operation. It wraps the result of the requested disable operation. Data type: string.

a positive response from Plesk server looks as follows: <packet version=”1.4.0”> <mail> <enable> <result> <status>ok</status> </result> <result> <status>ok</status> </result> <result> <status>ok</status> </result> </enable> </mail> </packet> . If the mail service has been turned on the multiple domains. a positive response arrives from Plesk server: <packet version=”1.2.4.0”> <mail> <enable> <result> <status>ok</status> </result> </enable> </mail> </packet> A positive response for the disable operation looks similarly.2.716 Supported Operations Response Samples If the mail service has been turned on the domain successfully.

...........2...............2....0”> <mail> <set_prefs> … </set_prefs> </mail> </packet> ....Supported Operations 717 The results will be returned in the order the enable node have been sent in the request packet........... In this section: Request Packet Structure..................................4....................... 720 Response Samples .....</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............ 717 Request Samples ................... If the enable operation fails......... 718 Response Packet Structure ........................ 720 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.. Setting Mail Service Preferences Use the set_prefs operation to set mail service preferences on the specified domains............................................................0”> <mail> <enable> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed...................................</errtext> </result> <result> <status>ok</status> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed............................................................ a negative response packet looks as follows: <packet version=”1....................

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

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.2.4.uk</forward> </nonexistent-user> <webmail>false</webmail> </prefs> </set_prefs> </mail> </packet> 719 If the filter is empty.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.0”> <mail> <set_prefs> <filter/> <prefs> <webmail>true</webmail> </prefs> </set_prefs> </mail> </packet> .2. the specified settings will be applied to all domains registered in Plesk: <packet version=”1.co.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.4.

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

.. 723 Response Samples .............................................. In this section: Request Packet Structure.........................................................</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..................4...........0”> <mail> <set_prefs> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed...................4.......................</errtext> <domain_id>12</domain_id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed............................... 722 Response Packet Structure ............................................2............................................0”> <mail> <get_prefs> … </get_prefs> </mail> </packet> ................................ 721 Request Samples .......Supported Operations 721 If the operation fails... a negative response can look as follows: <packet version=”1.............2. 724 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......

4. use the following packet: <packet version=”1.xsd). the following packet must be used: <packet version=”1. The get_prefs node has the following graphics representation:   The filter node is required. Request Samples Getting Mail Service Settings under Plesk Administrator Plesk Administrator can get mail service preferences for all domains registered in Plesk.722 Supported Operations The get_prefs node does not have a separate type. It specifies an identifier of the domain which mail service settings are requested. Data type: integer.4.0”> <mail> <get_prefs> <filter/> </get_prefs> </mail> </packet> . 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. it is nested within the MailTypeRequest type (mail_input. Data type: none.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.2.2. It holds a list of domains which mail service settings are requested. The domain_id node is optional.

Returns an error code when the get_prefs operation fails. The status node is required. Returns the execution status of the get_prefs operation.xsd).4. Allowed values: ok | error. The prefs node is optional. Returns an error message if the get_prefs operation fails. The domain_id node is optional.2. Data type: resultType (common. Data type: MailPreferences (plesk_mail. Data type: integer. Returns a collection of mail service preferences set for the specified domain.xsd). It wraps the result of the requested get_prefs operation. The structure of the node is described in the Mail Service Settings (see page 675) section. Returns the identifier of the domain which mail service settings are retrieved. 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.      . Data type: unsignedInt.Supported Operations 723 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 errtext node is optional. Data type: string. Data type: string. It can be missing if some error occurs before the validation starts. described above. The errcode node is optional.0”> <mail> <get_prefs> <filter/> </get_prefs> </mail> </packet> Response Packet Structure The get_prefs node of the response packet is structured as follows:  The result node is optional.

0”> <mail> <get_prefs> <result> <status>error</status> <domain_id>12</domain_id> <prefs> <nonexistent-user> <reject/> </nonexistent-user> <webmail>true</webmail> </prefs> </result> <result> <status>error</status> <domain_id>13</domain_id> <prefs> <nonexistent-user> <forward>techdept@advent.4.724 Supported Operations Response Samples A positive response that returns mail service settings for two specified domains looks as follows: <packet version=”1.4.</errtext> <domain_id>13</domain_id> </result> </get_prefs> </mail> </packet> .uk</forward> </nonexistent-user> <webmail>true</webmail> </prefs> </result> </get_prefs> </mail> </packet> If the operation fails.</errtext> <domain_id>12</domain_id> </result> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed. a negative response can look as follows: <packet version=”1.co.2.2.0”> <mail> <get_prefs> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.

.0”> <mail> <rename> … </rename> </mail> </packet> The rename node does not have a separate type............ 725 Request Samples ................... 727 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............................................................... It specifies the new name for the mail account............................ It specifies the current name of the mail account.. ................................... it is nested within the MailTypeRequest type (mail_input......................... 726 Response Samples ......... Data type: string... It identifies the domain that owns the mail account... Data type: string................. The name node is required.Supported Operations 725 Renaming Mail Accounts Use the rename operation to rename a mail account..................................2............................. 726 Response Packet Structure .............xsd)... In this section: Request Packet Structure...............................4.................. The rename node has the following graphics representation:    The domain_id node is required... Data type: integer......... The new-name node is required.....

2. It wraps the result of the requested rename operation.726 Supported Operations Request Samples The following request packet renames mail account existing on the domain with ID 11: <packet version=”1. Data type: resultType (common. Data type: string. The status node is required. Allowed values: ok | error.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.4. .4.2.xsd). It returns the execution status of the rename operation.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> Response Packet Structure The rename node of the response packet is structured as follows:   The result node is optional. use a separate rename section for each: <packet version=”1.

Data type: string.</errtext> </result> </rename></mail></packet> . a positive response arrives from Plesk server: <packet version=”1. the response packet will look as follows: <packet version=”1. Returns an error code when the rename operation fails. The results will follow one another in the order they have been sent in the request packet.0”> <mail> <rename> <result> <status>ok</status> </result> </rename> </mail> </packet> If the request packet renames multiple accounts. The errtext node is optional. If the operation fails.0”> <mail> <rename> <result> <status>ok</status> </result> </rename> <rename> <result> <status>ok</status> </result> </rename> </mail> </packet> The packet will return the result for every filtered domain within a separate rename node.2.4. Data type: unsignedInt. Returns an error message if the rename operation fails. a negative response can look as follows: <packet version=”1.4.4.0”> <mail> <rename> <result> <status>error</status> <errcode>1023</errcode> <errtext>Operation failed.Supported Operations 727   The errcode node is optional.2. Response Samples After the specified mail account is renamed successfully.2.

....................................................... 783 ................................................. In this section: Filtering Issues ........................ Each mailing list should have unique name parameter........................................................................... the messages from mailing list owner will not be sent to subscribers................................ Plesk client Description The maillist operator is designed for managing mailing lists on domains.... 743 Retrieving Mailing Lists ....................................................... Before using the operator.. 754 Removing Subscriber .......................................................... If it is deactivated..................... The e-mail address that is used for messages delivery to subscribers looks as follows: name@domain............................................................ The mailing service (managing all mailing lists on a domain) can be activated or deactivated.. make sure that the specified software is installed on your Plesk server..... all messages from all mailing list owners of a specified domain will not be sent to subscribers........................................................................................ 779 Retrieving Status of Mailing Lists Service ............................................................................4..... Each mailing list can be enabled or disabled......................................................... 732 Removing Mailing List . Mailing lists are provided by the GNU Mailman software............................ 774 Disabling Mailing List............ 748 Retrieving Subscribers' Info ............. The name of the mailing list cannot be changed........................................ 769 Enabling Mailing List ................................................................. If it is disabled.............. 730 Adding Mailing List ........ 763 Deactivating Mailing Lists Service ............xsd Plesk version: all versions API RPC version: 1.......728 Supported Operations Managing Mailing Lists Operator: <maillist> XML Schema: maillist......................... 738 Adding Subscriber to Mailing List ..........................................................0 and higher Plesk user: Plesk Administrator........2... 759 Activating Mailing Lists Service ..................................

Supported Operations 729 Supported operations            ADD-LIST (see page 732) adds a new mailing list to the specified domain DEL-LIST (see page 738) deletes mailing lists using filtering rules GET-LIST (see page 748) retrieves mailing lists name and status using filtering rules ADD-MEMBER (see page 743) adds a new subscriber to the specified mailing list GET-MEMBERS (see page 754) retrieves the subscribers of the specified mailing lists DEL-MEMBERS (see page 759) removes a subscriber from the specified mailing lists ENABLE (see page 763) activates the mailing list service on the specified domains DISABLE (see page 769) deactivates the mailing list service on the specified domains ENABLE-LIST (see page 774) activates the specified mailing lists DISABLE-LIST (see page 779) deactivates the specified mailing lists GET-STATUS (see page 783) retrieves the status of the mailing service on the specified domain .

..... 732 MaillistFilterType The MaillistFilterType filter is used in del-list.................... The graphical representation of the filter node is as follows:    The id node is required....................... Data type: integer. enable or disable mailing lists.xsd)....... Enabling Mailing List (see page 774)...................... The domain-id node is required.......................................................... The request XML filters objects using a special <filter> section........ A single operation can use only parameters of the same type in the filtering rule.... The name node is required............. Data type: string. Retrieving Mailing Lists (see page 748)....... remove. 730 MaillistSimpleFilterType ........... Parameters....................... 731 MaillistToggleFilterType ......... nested in the filter node are called filtering rule... Data type:MaillistFilterType (maillist.................. get-list.............................. ........... Data type: integer............ enable-list..... It specifies the mailing list name..730 Supported Operations 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..... It specifies the domain ID in Plesk database.............. In this section: MaillistFilterType ... disable-list operations to retrieve..... Disabling Mailing List (see page 779) sections. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. refer to the Removing Mailing List (see page 738).............................. Use this parameter to specify all mailing lists on the domain (specified by ID).... 732 filter-id Node ....................... For more information on the operations.. It specifies the mailing list ID in Plesk database............

A packet containing a combination of list-id and list-name parameters in a single filter node will be considered invalid by Plesk server. and domain-name parameters in a single filter node will be considered invalid by Plesk server. It specifies the mailing list ID in Plesk database. domain-id. Data type: integer. 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. The graphical representation of the filter node is as follows:   The list-id node is required. Data type: string. or domain-name parameters when creating a filtering rule. It specifies the mailing list name. Data type: string.xsd). domain-id.Supported Operations 731  The domain-name node is required. . For more information on the operations. The list-name node is required. or remove mailing list subscribers. and del-member operations to add. Use this parameter to specify all mailing lists on the domain (specified by name). or list-name parameters when creating a filtering rule. refer to the Adding Subscriber to Mailing List (see page 743). MaillistSimpleFilterType The MaillistSimpleFilterType filter is used in add-member. A packet containing a combination of id. It specifies the domain name. name. Retrieving Subscribers' Info (see page 754). Data type:MaillistSimpleFilterType (maillist. get-members. Removing Subscriber (see page 759) sections. retrieve. name. 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.

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

............................ 734 Request Samples ................ 735 Response Packet Structure ............................................................ In this section: Request Packet Structure................ 736 Response Samples ..............................................................................................Supported Operations 733 Adding Mailing List Use the add-list operation to add a new mailing list................................................... 737 ...................................................................................

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

0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain.4.4.Supported Operations 735 Request Samples Adding a single mailing list This packet adds mailing list MyMailer 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.com</admin-email> </add-list> </maillist> </packet> .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.2.com</admin-email> </add-list> <add-list> <domain-id>45</domain-id> <name>SubscribeMe</name> <password>123456</password> <admin-email>admin@mydomain.2. <packet version="1.

Is returns the error code if the add-list operation fails. Data type: string. The status node is required. It specifies the execution status of the add-list operation. It returns the mailing list ID in Plesk database if the operation succeeds.     . The errcode node is optional. It returns the error message if the add-list operation fails.xsd) and structured as follows:  The result node is required. Data type: string. The id node is optional. Allowed values: ok | error. Data type: integer.xsd).736 Supported Operations Response Packet Structure The add-list node of the output XML packet is presented by type MaillistAddOutputType (maillist. The errtext node is optional. Data type: ResultType (common. It wraps the response retrieved from the server. Data type: integer.

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. <packet version="1.2.4.4.0"> <maillist> <add-list> <result> <status>error</status> <errcode>1031</errcode> <errtext>Component is not configured on server</errtext> </result> </add-list> </maillist> </packet> .4.Supported Operations 737 Response Samples Adding a single mailing list This request packet adds mailing list MyMailer to the domain specified by ID 45.0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> <password>hello</password> <admin-email>admin@mydomain. the response looks as follows: <packet version="1.com</admin-email> </add-list> </maillist> </packet> A positive response from the server can look as follows: <packet version="1.2.2.

0"> <maillist> <add-list> <domain-id>45</domain-id> <name>MyMailer</name> &l