Parallels Operations Automation 5.0 Public API Reference



Similar documents
Transcription:

Parallels Parallels Operations Automation 5.0 Public API Reference Revision 9.34 (June 12, 2010) 1999-2010

2 ISBN: N/A Parallels 500 SW 39th Street Suite 200 Renton, WA 98057 USA Phone: +1 (425) 282 6400 Fax: +1 (425) 282 6444 Copyright 2010, 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. Parallels Operations Automation is a registered trademark of Parallels.

3 Contents Preface 9 Documentation Conventions... 9 Typographical Conventions... 9 General Conventions... 11 Feedback... 11 Introduction 12 Purpose... 13 Scope... 13 References... 13 Definitions, Acronyms, and Abbreviations... 14 Overview... 14 Overall Description 15 Public API Data Types 16 Public API Security 17 Executing Public API Methods 18 Obtaining POA XML-RPC Server Properties... 19 Executing Public API Methods with curl Utility... 19 Big Integer Support 21 Specification Rules... 21 Backward Compatibility Issues... 22 Public API Reference 23 Management of Accounts and Account's Staff Members... 33 pem.addaccount... 33 pem.addaccountmember... 37 pem.checkpassword... 40 pem.disableaccount... 41 pem.disableaccountmember... 41 pem.enableaccount... 42 pem.enableaccountmember... 42 pem.getaccountinfo... 43

4 Contents pem.getaccountmemberbylogin... 43 pem.getaccountsubscriptions... 44 pem.promotetoreseller... 44 pem.removeaccount... 45 pem.removeaccountmember... 45 pem.setaccountauthdata... 45 pem.setaccountinfo... 46 pem.setmemberinfo... 47 pem.setmemberpassword... 48 pem.setsystemproperty... 49 pem.updateaccountandaccountmember (deprecated)... 50 pem.getvendorcustomers... 50 pem.getaccountroles... 50 pem.getaccountmemberroles... 51 pem.assignrolestomember... 51 pem.revokerolesfrommember... 52 Subscriptions Management... 52 Provisioning Models... 52 pem.activatesubscription... 53 pem.addsubscription... 56 pem.disablesubscription... 57 pem.enablesubscription... 57 pem.getsubscription... 58 pem.migratesubscription (deprecated)... 59 pem.ordersubscription (deprecated)... 60 pem.provisionsubscription (deprecated)... 61 pem.removesubscription... 62 pem.setsubscriptionname... 63 pem.upgradesubscription... 63 pem.getcustomersubscriptions... 64 Domains Management... 65 pem.adddnshosting... 65 pem.adddomain... 66 pem.adddomainrequest... 69 pem.adddomaintoaccount... 70 pem.addptrrecord... 71 pem.addsubdomain... 71 pem.bindservicestodomain... 73 pem.creatednsrecord... 73 pem.deletednsrecord... 75 pem.disablednsrecord... 75 pem.disabledomain... 76 pem.enablednsrecord... 76 pem.enabledomain... 77 pem.getdomainbyname... 77 pem.getdomainlist... 78 pem.getdomainsubscription... 79 pem.getaccountdomains... 79 pem.getnameservers... 80 pem.getdomainnameservers... 81 pem.getrequirednameservers (internal)... 82 pem.importcertificate... 82 pem.removednshosting... 83 pem.removedomain... 83 pem.removedomainrequest... 84

Contents 5 pem.removeptrrecord... 84 pem.setdomainregistrarstatus... 85 pem.syncnameservers (internal)... 85 pem.unbindservicesfromdomain... 86 Webspace Management... 86 pem.apache.updatelimits... 86 pem.getftpuser... 87 pem.getsubscriptionwebspaces... 87 pem.getwebspaceslist... 88 pem.iis.getsubscriptionsharepointsites... 88 pem.iis.getsubscriptionwebsites... 89 pem.iis.getwebspacefeaturesinfo... 90 pem.iis.getwebspacesinfo... 91 pem.iis.setwebspacefeaturesinfo... 91 pem.iis.updatelimits... 93 pem.iis.updatephpextensionslist... 93 pem.setftppassword... 94 pem.apache.turnwebstatprocessingon... 94 pem.apache.turnwebstatprocessingoff... 95 pem.proftpd.createcustomftpuser... 95 pem.proftpd.deletecustomftpuser... 96 pem.proftpd.getcustomftpuserslist... 96 Service Users Management... 97 pem.adduser... 97 pem.changeuserpassword... 98 pem.disableuser... 98 pem.enableuser... 99 pem.getuserbylogin... 99 pem.getuserinfo... 99 pem.getusers... 100 pem.modifyuser... 101 pem.removeuser... 101 Service User's Properties... 102 IIS Management... 103 IIS Application Mappings Management... 103 IIS Website Users Management... 116 SharePoint Management... 120 pem.sharepoint.createsharepointsite... 120 pem.sharepoint.createsharepointsiteinsharedapplication... 122 pem.sharepoint.deletesharepointsite... 124 pem.sharepoint.getavailablesharepointsitetemplates... 124 pem.sharepoint.addsharepointuser... 127 pem.sharepoint.removesharepointuser... 127 Exchange Management... 128 Exchange Mailbox Management... 128 Exchange Distribution List Management... 143 Exchange Public Folder Management... 147 Exchange Contact Management... 154 Global Relay Archiving Management... 156 Delivery Permissions Management... 165 Unified Messaging Management... 172 Exchange Auxiliary Methods... 173 Hosted OCS Management... 177 pem.ocs.getphonenumberlist... 177 Hosted CRM Management... 178

6 Contents pem.mscrm.createorg... 178 pem.mscrm.createuser... 178 pem.mscrm.disableorg... 181 pem.mscrm.enableorg... 181 pem.mscrm.getbusinessunits... 181 pem.mscrm.getcurrencies... 182 pem.mscrm.getorgbysubscription... 182 pem.mscrm.getorginfo... 183 pem.mscrm.getorglist... 184 pem.mscrm.getorgusers... 185 pem.mscrm.getsecurityroles... 186 pem.mscrm.getuserinfo... 186 pem.mscrm.modifysecurityroles... 189 pem.mscrm.moveuser... 189 pem.mscrm.removeorg... 189 pem.mscrm.removeuser... 190 pem.mscrm.setexchangedeliverysettings... 190 pem.mscrm.setexternaldeliverysettings... 191 pem.mscrm.setnonedeliverysettings... 192 pem.mscrm.setorgdisplayname... 192 pem.mscrm.setoutlookdeliverysettings... 192 pem.mscrm.synchronizedata... 193 Database Management... 193 pem.createdatabase... 193 pem.createdatabaseuser... 194 pem.mssql.setquota... 195 pem.mysql.applymysqlactivationparams... 195 QMail Mailbox Management... 196 pem.cqmail.addmailbox... 196 pem.cqmail.addmailforwarding... 198 pem.cqmail.addmailname... 200 pem.cqmail.delmailname... 201 pem.cqmail.editmailname... 202 pem.spam_assassin.additems... 203 pem.spam_assassin.deleteitems... 203 pem.spam_assassin.getitems... 204 Resource Accounting... 205 pem.addresourcetype... 205 pem.addresourcetypetoservicetemplate... 206 pem.getresourceusage... 206 pem.getcustomersubscriptionsresources... 207 pem.getresourceusageforperiod... 208 pem.resetresourceusage (internal)... 210 pem.setresourcetypelimit... 211 pem.setresourcetypelimits... 212 pem.setrtattributes... 213 pem.statistics.getstatisticsreport... 214 pem.uploadlicense... 225 Service Template Management... 226 pem.activatest... 226 pem.addservicetemplate... 226 pem.cloneservicetemplate... 227 pem.deactivatest... 227 pem.getservicetemplate... 228 pem.setstactivationparams... 229

Contents 7 pem.setstrtlimits... 230 Provisioning Attributes Management... 231 pem.addprovisioningattributes... 231 pem.getprovisioningattributes... 231 pem.sethostattributes... 232 pem.unsethostattributes... 232 IP Pools Management... 233 pem.assignippool... 233 pem.attachippool... 233 pem.bindippool... 234 pem.createippool... 234 pem.detachippool... 235 pem.revokeippool... 235 pem.unbindippool... 235 Native Package Management... 236 pem.packaging.native_repository.createrepository... 236 pem.packaging.native_repository.getrepository... 237 pem.packaging.native_repository.reindex... 237 pem.packaging.native_repository.removerepository... 238 Branding Management... 238 pem.branddomain... 238 pem.getdomainsforbrandcreation... 239 pem.unbranddomain... 240 Parallels Plesk Panel Management... 240 pem.installplesklicense... 240 pem.revokeplesklicense... 241 Parallels Virtuozzo Containers Management... 241 pem.virtuozzo.attachvps... 241 pem.virtuozzo.importtemplate... 242 pem.virtuozzo.installtemplate... 242 pem.virtuozzo.installtemplates... 243 pem.virtuozzo.updateeztemplates... 243 pem.virtuozzo.removetemplates... 244 pem.virtuozzo.registerhwnode... 244 Hardware Node Management... 245 pem.registersharednode... 245 Application Management... 246 pem.aps.getapplicationinstance... 246 pem.aps.getapplicationinstancesettings... 248 pem.aps.getapplicationsettings... 248 pem.aps.getpackage... 249 pem.aps.getprovisioningsettings... 251 pem.aps.getsubscriptionapplicationinstances... 252 pem.aps.importpackage... 254 pem.aps.provideapplicationinstance... 254 pem.aps.removeapplication... 255 pem.aps.setapplicationinstancesettings... 255 pem.aps.unimportpackage... 256 pem.aps.unprovideapplicationinstance... 256 pem.aps.upgradeapplicationinstance... 257 pem.aps.getapplicationlicenseinfo... 257 pem.aps.getapplicationinstancelicenseactivationdata... 258 pem.aps.installapplicationinstancelicense... 259 pem.aps.removeapplicationinstancelicense... 260 External System Management... 261

8 Contents pem.getexternalsystemlist... 261 pem.registerexternalsystem... 262 pem.setexternalsystemconfig... 263 pem.unregisterexternalsystem... 263 Transactional Extension... 265 pem.batchrequest... 265 pem.getrequeststatus... 266 txn.begin... 267 txn.commit... 268 txn.rollback... 268 XML-RPC Samples 269 Common Response Codes... 270 Success Response... 270 Failure Response... 271 pem.addaccount Sample... 272 pem.addaccountmember Sample... 276 pem.activatesubscription Sample... 279 pem.adddomain Sample... 282 pem.batchrequest Sample... 282 Diagrams 293 Provisioning Model Version 1... 294 Domain and Hosting Provisioning Model Version 2... 295 Domain Provisioning Model Version 2... 298 Service Cancellation... 300 Creating Service User and Exchange Mailbox... 300 Creating Service User and Hosted CRM User... 301 Creating MS SQL Database... 302 Activating Global Relay Archiving Support... 303 Using Transactions... 304 Application License Management... 305 Index 306

C H A P T E R 1 Preface In This Chapter Documentation Conventions... 9 Feedback... 11 Documentation Conventions Before you start using this guide, it is important to understand the documentation conventions used in it. Typographical Conventions The following kinds of formatting in the text identify special information. Formatting convention Type of Information Example Special Bold Italics Items you must select, such as menu options, command buttons, or items in a list. Titles of chapters, sections, and subsections. Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value. Go to the QoS tab. Read the Basic Administration chapter. The system supports the so called wildcard character search.

10 Parallels Operations Automation 5.0 Parallels Important Note Monospace Preformatted Preformatted Bold An important note provides information that is essential to the completion of a task. Users can disregard information in a note and still complete a task, but they should not disregard an important note. A note with the heading Note indicates neutral or positive information that emphasizes or supplements important points of the main text. A note supplies information that may apply only in special cases for example, memory limitations, equipment configurations, or details that apply to specific versions of a program. The names of commands, files, and directories. On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages. What you type, contrasted with on-screen computer output. <> The value enclosed in angle brackets is variable, i.e. depending on the context it can take this or that value. CAPITALS KEY+KEY Names of keys on the keyboard. Key combinations for which the user must press and hold down one key and then press another. Important: The device drivers installed automatically during Setup are required by your system. If you remove one of these drivers, your system may not work properly. Note: If Windows prompts you for a network password at startup, your network is already set up and you can skip this section. The license file is located in the httpdocs/common/licenses directory. # ls al /files total 14470 # cd /root/rpms/php Go to unpacked OS directory: # cd <POA_DIST>/rpms/<OS SHIFT, CTRL, ALT CTRL+P, ALT+F4

Preface 11 General Conventions Be aware of the following conventions used in this book. Modules in this guide are divided into sections, which, in turn, are subdivided into subsections. For example, Documentation Conventions is a section, and General Conventions is a subsection. When following steps or using examples, be sure to type double-quotes ("), left singlequotes (`), and right single-quotes (') exactly as shown. The key referred to as RETURN is labeled ENTER on some keyboards. Commands in the directories included into the PATH variable are used without absolute path names. Steps that use commands in other, less common, directories show the absolute paths in the examples. 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.

C H A P T E R 2 Introduction In This Chapter Purpose... 13 Scope... 13 References... 13 Definitions, Acronyms, and Abbreviations... 14 Overview... 14

Introduction 13 Purpose The purpose of this Reference document is to describe the Public API of Parallels OperatiOns automation (POA). This API provides functionality enough to integrate POA with external billing system. This document is intended for any person participating in integration of POA with external billing system: analysts gathering and elaborating the requirements, designers and software architects designing the system, developers implementing the solution, testers and test designers performing quality assurance, technical writers composing user documentation, etc. The reader of this document is expected to be familiar with basic POA concepts like: objects hierarchy, including accounts; account s staff members; domains; hosts; customer services; etc. The reader should also be familiar with resources accounting system used in POA and understand such terms as: resource type, service template, subscription, resource. To obtain the complete information concerning POA concepts please refer to Parallels Operations Automation Provider's Guide. Scope This document describes all methods constituting the Public API of Parallels Operations Automation (POA) in terms of their functionality. It also provides comprehensive explanation of methods input and output parameters and gives examples of their usage. References The following documents are referenced elsewhere in this Reference: 1 XML-RPC Specification (http://www.xmlrpc.com/spec). 2 Extensible Markup Language (XML) (http://www.w3.org/xml/). 3 Hypertext Transfer Protocol (HTTP) (http://www.w3.org/protocols/).

14 Parallels Operations Automation 5.0 Parallels Definitions, Acronyms, and Abbreviations The following definitions, acronyms, and abbreviations are used throughout this document: HTTP Hypertext Transfer Protocol. RPC Remote Procedure Calls. XML extensible Markup Language. XML-RPC - Remote procedure calling using HTTP as the transport and XML as the encoding. Optional parameter (parameter name enclosed in square brackets) - when you come over the method parameter enclosed in square brackets [...], it means that the parameter is optional and that you can do not initialize this parameter during method call. Eg. [host_id] Deprecated method - if a method is marked as deprecated, it means that there exist other newer methods that can deliver the same result as the deprecated method. Still, the deprecated method works fine as well until you see it in the document. Internal method - if a method is marked as internal, it means that method is exlusively intended for system maintenance purposes and should be invoked by the system developers only. It is strongly recommended do not use such methods by the usual system users. It is not guaranted that method marked as internal will be available or will support back-compatibility in future versions of system. Overview The Reference document first provides general description of POA Public API, then describes how it is structured according to functional groups, and finally lists all methods constituting the API in alphabetical order. The examples of methods calls are given in the XML-RPC Samples section (on page 269).

C H A P T E R 3 Overall Description The purpose of POA Public API is to provide external billing systems with a way to control services provisioning flow, collect resources usage statistics, suspend/resume/cancel services availability for the end-users, modify the objects properties within Parallels Operations Automation (POA) boundaries. The API represents a set of methods implemented over XML-RPC. All methods conform to XML-RPC specification so that the external system can use any third-party software implementing this protocol. All methods constituting the API are transactional on per-call basis. In other words, if an XML-RPC call succeeds, POA can guarantee that all operations implied by the called method have been performed. And vice versa, if a call fails, POA guarantees that no changes implied by this method have been made to the system. By default, a sequence of calls is not transactional as a whole and the external system shall handle failed calls in the sequence itself. However, POA provides a set of helper methods, which allows to call a sequence of methods in context of transaction. The whole Public API of POA can be subdivided into several groups according to the primary functionality they support. Starting from version 2.6.5 (freshly installed) POA will accept Public API connections only from allowed hosts/networks. Management Node will be allowed to call POA via Public API by default. See also: Public API Security (on page 17) Executing Public API Methods (on page 18)

C H A P T E R 4 Public API Data Types The following data types are used in POA Public API: Name Range Description int from -2,147,483,648 to +2,147,483,647 (inclusive) 32-bit signed integer bigint from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (inclusive) string from 0 to unlimited number of characters boolean 0 (false) or 1 (true) base64 from 0 to unlimited number of bytes struct Not applicable array Not applicable array 64-bit signed integer character string Boolean data type base64-encoded binary structured data type

C H A P T E R 5 Public API Security This topic describes security considerations when using Public API. POA allows to control the following security aspects of Public API using: Type of protocol is used as transport for XML-RPC communication. SSL is disabled. In this case the plain HTTP is used as transport protocol. The content of XML-RPC requests/responses transmits over network in unencrypted form. SSL is enabled. In this case HTTP over SSL is used as transport protocol. The content of XML-RPC requests/responses transmits over network in encrypted form. Authentication mode. HTTP Authentication is disabled. In this case XML-RPC client can call Public API methods, which are listed in this reference, without POA credentials providing. HTTP Authentication is enabled. In this case XML-RPC client should provide POA Account Staff Member's login and password to pass through authentication process. If Provider Account Staff Member's login and password are provided, the XML-RPC client will be able to call Public API methods, which are listed in this reference. If Reseller Account Staff Member's login and password are provided, the XML-RPC client will be able to call limited set of Public API methods (the method allowed to use by Reseller is marked as "this method can also be called under Reseller permissions" in method's description). Networks from which access to Public API is allowed. Accept connections from everywhere. In this case XML-RPC clients from any network can call Public API methods. Accept connections only from allowed networks. In this case XML-RPC clients only from allowed networks (or IP Addresses) can call Public API methods. Note: The complete information how to configure Public API security is provided in Provider's Guide in Configuring POA Public API section.

C H A P T E R 6 Executing Public API Methods This section describes how to execute POA Public API methods. In This Chapter Obtaining POA XML-RPC Server Properties... 19 Executing Public API Methods with curl Utility... 19

Executing Public API Methods 19 Obtaining POA XML-RPC Server Properties Prior to invocation of POA Public API methods, it is necessary to obtain the POA XML- RPC server properties, such as IP Address, Port, SSL status, and HTTP Authentication status. To do this, perform the following actions: 1 Log in to POA Provider's Control Panel. 2 Go to Top > System Director > Public API Manager. The Summary tab of Public API Manager opens, displaying the properties of the POA XML-RPC server. Figure 1: Public API Manager - Summary Tab It is recommended to write them down or copy them to the text editor. This information is used for executing POA Public API methods. Executing Public API Methods with curl Utility This section describes how to execute POA Public API methods using the curl utility. Note: The curl utility for Windows-based hosts can be obtained from the http://curl.haxx.se web site. For Linux-based hosts the curl utility is available in the OS distribution. 1 Log in to the host where the curl utility is installed. 2 Create a file and insert the required XML-RPC request into it. Signatures of POA Public API methods are provided in the Public API Reference section (on page 23). 3 Execute the following command: # curl -k -d@file PROTOCOL://LOGIN:PASSWORD@IP_ADDRESS:PORT Where: FILE - Path to the file that contains the XML-RPC request.

20 Parallels Operations Automation 5.0 Parallels PROTOCOL - Protocol used to connect to the POA XML-RPC server (http or https). PASSWORD and LOGIN - Credentials of a Staff Member belonging to the POA Provider's/Reseller's Account. IP_ADDRESS - The IP Address of the POA XML-RPC server. PORT - Port number of the POA XML-RPC server (8440 is default port). Examples: # curl -k -d@/root/pem.addaccount.xml https://login:password@1.1.1.1:8440 # curl -k -d@/root/pem.addaccount.xml https://1.1.1.1:8440 # curl -k -d@/root/pem.addaccount.xml http://1.1.1.1:8440

C H A P T E R 7 Big Integer Support POA Public API supports big integers for some classes of parameters. They are: resource limits and resource usage values. Currently there is no standard for representation of 64+ bits integers in XML-RPC. So it was decided to transfer 64-bit integer values within XML-RPC string values. However these strings are validated for correctness. In This Chapter Specification Rules... 21 Backward Compatibility Issues... 22 Specification Rules The type bigint actually stands for XML-RPC string type with the following restrictions: If bigint is the type of input parameter, then it is tested if it actually has numeric content and the content fits 64-bit integer. If bigint is the type of output parameter, then there is a guarantee that the parameter will actually contain numeric value that fits 64 bit integer.

22 Parallels Operations Automation 5.0 Parallels Backward Compatibility Issues There are a number of methods that already accept/return parameters that have semantics of resource accounting (resource limits/usage amount, etc). The type of these parameters can not be changed because of compatibility reasons. This is why we have introduced additional rules that describe POA Public API policy regarding this issue. In general, an additional method parameter of type bigint is introduced. The name of that parameter partially coincide with original one with one exception that new parameter will have '64' prefix. In case of input parameters, an introduced bigint parameter is optional. So it is safe for the user to keep using specific methods in a usual way, transferring usual int parameters. However, if it appears that user should transfer big number, he could use bigint parameter and do not transfer int parameter at all (or leave it 0 because bigint parameter has higher priority). POA Public API will always transfer both int and bigint output parameters that refer the same value. If it appears that the actual value does not fit the int representation, then the minimal negative or maximum positive integer would be returned in int-typed parameter (depending on actual value) and correct value will be returned in bigint-typed parameter. So it is relatively safe to keep reading int output parameters but it is better to always use their bigint analogs. Please note that rules described in this section concern existent method parameters only. The new bigint parameters will not have any int analogs and will be named in a usual fashion (no '64' prefixes).

C H A P T E R 8 Public API Reference This section lists all methods constituting the POA Public API along with comprehensive explanation of their input and output parameters. The list is sorted in alphabetical order for better navigation. Descriptions of all methods follow the same way: first, a short explanation is given of what the method does, and then lists of its input and output parameters are provided in tabular form. If the method participates in complex scenario involving other methods, a link to the corresponding diagram, explaining this scenario, is given. Types of all arguments are given in terms of XML-RPC specification. All methods described in this document are supported by POA version 2.3 or later, if not otherwise stated explicitly. New methods and new optional parameters for existing methods introduced in subsequent releases of POA are marked with the version of POA where they were introduced for the first time. For the sake of convenience, the following table groups all methods from POA Public API by releases where they were introduced for the first time. Method Name Effective since version pem.activatest (on page 226) 2.6.4 pem.activatesubscription (on page 53) 2.3.01 pem.addaccount (on page 33) 2.3 pem.addaccountmember (on page 37) 2.3 pem.adddnshosting (on page 65) 2.6.4 pem.adddomain (on page 66) 2.3 pem.adddomainrequest (on page 69) 2.8 pem.adddomaintoaccount (on page 70) 2.8 pem.apache.updatelimits (on page 86) 2.9 pem.apache.turnwebstatprocessingon (on page 94) 2.9 hotfix01 pem.apache.turnwebstatprocessingoff (on page 95) 2.9 hotfix01 pem.aps.getapplicationinstance (on page 246) 2.9 hotfix01 pem.aps.getapplicationinstancesettings (on page 248) 2.9 hotfix01 pem.aps.getapplicationsettings (on page 248) 2.9 hotfix01 pem.aps.getpackage (on page 249) 2.9 hotfix01

24 Parallels Operations Automation 5.0 Parallels Method Name pem.aps.getprovisioningsettings (on page 251) pem.aps.getsubscriptionapplicationinstances (on page 252) pem.aps.importpackage (on page 254) pem.aps.provideapplicationinstance (on page 254) pem.aps.removeapplication (on page 255) pem.aps.setapplicationinstancesettings (on page 255) pem.aps.unimportpackage (on page 256) pem.aps.unprovideapplicationinstance (on page 256) pem.aps.upgradeapplicationinstance (on page 257) pem.aps.getapplicationinstancelicenseactivationdata (on page 258) pem.aps.getapplicationlicenseinfo (on page 257) pem.aps.installapplicationinstancelicense (on page 259) pem.aps.removeapplicationinstancelicense (on page 260) pem.bindservicestodomain (on page 73) 2.8 pem.getrequirednameservers (internal) (on page 82) 2.8 pem.removedomainrequest (on page 84) 2.8 pem.syncnameservers (internal) (on page 85) 2.8 pem.unbindservicesfromdomain (on page 86) 2.8 pem.addprovisioningattributes (on page 231) 2.6.3 pem.addptrrecord (on page 71) 2.6.5 pem.addresourcetype (on page 205) 2.6.3 pem.addresourcetypetoservicetemplate (on page 206) 2.6.5 pem.addservicetemplate (on page 226) 2.6.3 pem.addsubdomain (on page 71) 2.3 pem.addsubscription (on page 56) 2.3 pem.adduser (on page 97) 2.6.5 pem.assignippool (on page 233) 2.6.5 pem.assignrolestomember (on page 51) 5.0 pem.attachippool (on page 233) 2.6.3 pem.batchrequest (on page 265) 2.3 pem.bindippool (on page 234) 2.6.3 pem.branddomain (on page 238) 2.6 Effective since version 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 2.9 hotfix04 2.9 hotfix04 2.9 hotfix04 2.9 hotfix04

Public API Reference 25 Method Name Effective since version pem.changeuserpassword (on page 98) 2.6.5 pem.checkpassword (on page 40) 2.4 pem.cqmail.addmailbox (on page 196) 2.4 pem.cqmail.addmailname (on page 200) 2.6.4 pem.cqmail.delmailname (on page 201) 2.6.4 pem.cqmail.editmailname (on page 202) 2.6.4 pem.cqmail.addmailforwarding (on page 198) 2.5 pem.cloneservicetemplate (on page 227) 5.0 pem.createdatabase (on page 193) 2.3 pem.createdatabaseuser (on page 194) 2.3 pem.creatednsrecord (on page 73) 2.6.1 pem.createippool 2.6.3 pem.deactivatest (on page 227) 2.6.4 pem.deletednsrecord (on page 75) 2.6.1 pem.disablednsrecord (on page 75) 2.8 hotfix03 pem.detachippool (on page 235) 2.6.3 pem.disableaccount (on page 41) 2.3 pem.disableaccountmember (on page 41) 2.8 hotfix02 pem.disabledomain (on page 76) 2.3 pem.enablednsrecord (on page 76) 2.8 hotfix03 pem.disablesubscription (on page 57) 2.3 pem.disableuser (on page 98) 2.6.5 pem.enableaccount (on page 42) 2.3 pem.enableaccountmember (on page 42) 2.8 hotfix02 pem.enabledomain (on page 77) 2.3 pem.enablesubscription (on page 57) 2.3 pem.enableuser (on page 99) 2.6.5 pem.exchange.addemailaddresses (on page 173) 2.6.5 pem.exchange.addmailbox (on page 128) 2.6.5 pem.exchange.changeprimaryemailaddress (on page 174) 2.6.5 pem.exchange.disableforwarding (on page 130) 2.6.5 pem.exchange.enableforwarding (on page 130) 2.6.5 pem.exchange.getemailaddresses (on page 131) 2.6.5

26 Parallels Operations Automation 5.0 Parallels Method Name Effective since version pem.exchange.getemaildomains (on page 175) 2.7 pem.exchange.getmailboxbyemailaddress (on page 131) 2.6.5 pem.exchange.getmailboxes (on page 132) 2.6.5 pem.exchange.getmailboxinfo (on page 132) 2.6.5 pem.exchange.getmailboxstores (on page 134) 2.8 pem.exchange.getusermailbox (on page 135) 2.6.5 pem.exchange.grantpublicfolderroles (on page 151) 5.0 pem.exchange.revokepublicfolderroles (on page 152) 5.0 pem.exchange.listpublicfolderroles (on page 153) 5.0 pem.exchange.enableunifiedmessaging (on page 172) 5.0 pem.exchange.disableunifiedmessaging (on page 173) 5.0 pem.getaccountdomains (on page 79) 5.0 pem.getaccountroles (on page 50) 5.0 pem.getaccountmemberroles (on page 51) 5.0 pem.getcustomersubscriptionsresources (on page 207) 2.9 hotfix01 pem.getdomainsforbrandcreation (on page 239) 5.0 pem.getdomainnameservers (on page 81) 5.0 pem.global_relay.createarchive (on page 156) 2.8 hotfix02 pem.global_relay.disablearchive (on page 157) 2.8 hotfix02 pem.global_relay.disablearchiving (on page 158) 2.8 hotfix02 pem.global_relay.enablearchive (on page 158) 2.8 hotfix02 pem.global_relay.enablearchiving (on page 159) 2.8 hotfix02 pem.global_relay.getarchive (on page 160) 2.8 hotfix02 pem.global_relay.getarchiverecipients (on page 162) 2.8 hotfix02 pem.global_relay.getarchiverecipientscandidates (on page 163) 2.8 hotfix02 pem.global_relay.retryarchiveoperation (on page 164) 2.8 hotfix02 pem.exchange.modifymailbox (on page 136) 2.6.5 pem.exchange.movemailboxes (on page 137) 2.8 pem.exchange.addmailboxwithtemplate (on page 139) 2.9 pem.exchange.changemailboxtemplate (on page 140) 2.9 pem.exchange.getmailboxtemplates (on page 141) 2.9 pem.exchange.forcemailboxtemplatesusing (on page 141) 2.9 pem.exchange.removeemailaddresses (on page 176) 2.6.5

Public API Reference 27 Method Name Effective since version pem.exchange.removemailbox (on page 138) 2.6.5 pem.exchange.addblackberry (on page 138) 2.8 hotfix02 pem.exchange.addgoodlink (on page 139) 2.8 hotfix02 pem.exchange.adddistributionlist (on page 143) 2.8 hotfix02 pem.exchange.adddistributionlistmembers (on page 144) 2.8 hotfix02 pem.exchange.removedistributionlistmembers (on page 146) 2.8 hotfix02 pem.exchange.removedistributionlist (on page 146) 2.8 hotfix02 pem.exchange.addpublicfolder (on page 147) 2.8 hotfix02 pem.exchange.mailenablepublicfolder (on page 148) 2.8 hotfix02 pem.exchange.maildisablepublicfolder (on page 149) 2.8 hotfix02 pem.exchange.getrootfoldername (on page 149) 2.8 hotfix02 pem.exchange.removepublicfolder (on page 151) 2.8 hotfix02 pem.exchange.addcontact (on page 154) 2.8 hotfix02 pem.exchange.removecontact (on page 155) 2.8 hotfix02 pem.exchange.getsmtpfilters (on page 175) 2.8 hotfix02 pem.exchange.getoutlooklicense (on page 142) 2.9 pem.exchange.enableoutlooklicense (on page 143) 2.9 pem.exchange.disableoutlooklicense (on page 143) 2.9 pem.exchange.getdistributionlists (on page 145) 2.9 hotfix03 pem.exchange.getpublicfolders (on page 150) 2.9 hotfix03 pem.exchange.getcontacts (on page 155) 2.9 hotfix03 pem.exchange.getdeliverypermissions (on page 165) 2.9 hotfix03 pem.exchange.getdeliverypermissionscandidates (on page 166) 2.9 hotfix03 pem.exchange.grantdeliverypermissions (on page 167) 2.9 hotfix03 pem.exchange.revokedeliverypermissions (on page 168) 2.9 hotfix03 pem.exchange.getmailboxpermissions (on page 169) 2.9 hotfix03 pem.exchange.getmailboxpermissionscandidates (on page 170) 2.9 hotfix03 pem.exchange.grantmailboxpermissions (on page 170) 2.9 hotfix03 pem.exchange.revokemailboxpermissions (on page 171) 2.9 hotfix03 pem.getvendorcustomers (on page 50) 2.9 hotfix03 pem.getcustomersubscriptions (on page 64) 2.9 hotfix03 pem.getaccountinfo (on page 43) 2.4 pem.getaccountmemberbylogin (on page 43) 2.7

28 Parallels Operations Automation 5.0 Parallels Method Name Effective since version pem.getaccountsubscriptions (on page 44) 2.4 pem.getdomainbyname (on page 77) 2.8 pem.getdomainsubscription (on page 79) 2.4 pem.getdomainlist (on page 78) 2.5 pem.getftpuser (on page 87) 2.4 pem.getnameservers (on page 80) 2.3 pem.getprovisioningattributes (on page 231) 2.6.3 pem.getrequeststatus (on page 266) 2.6.2 pem.getresourceusage (on page 206) 2.3 pem.getresourceusageforperiod (on page 208) 2.3 pem.getservicetemplate (on page 228) 2.6.1 pem.getsubscription (on page 58) 2.6.1 pem.getsubscriptionwebspaces (on page 87) 2.8 pem.getuserbylogin (on page 99) 2.6.5 pem.getuserinfo (on page 99) 2.6.5 pem.getusers (on page 100) 2.6.5 pem.getwebspaceslist (on page 88) 2.4 pem.iis.adddomainmapping (on page 103) 2.6.5 pem.iis.addsystemmapping (on page 104) 2.6.5 pem.iis.applysystemmappingstohosts (on page 105) 2.6.5 pem.iis.bulkadddomainmapping (on page 106) 2.6.5 pem.iis.deletesystemmapping (on page 107) 2.6.5 pem.iis.getdomainengines (on page 107) 2.6.5 pem.iis.getdomainmapping (on page 107) 2.6.5 pem.iis.getdomainmappings (on page 108) 2.6.5 pem.iis.getsystemengines (on page 109) 2.6.5 pem.iis.getsystemmapping (on page 110) 2.6.5 pem.iis.getsystemmappings (on page 111) 2.6.5 pem.iis.getwebspacefeaturesinfo (on page 90) 2.8 pem.iis.resetdomainmapping (on page 112) 2.6.5 pem.iis.setdomainmappingenabled (on page 113) 2.6.5 pem.iis.getsubscriptionwebsites (on page 89) 2.8 pem.iis.getsubscriptionsharepointsites (on page 88) 2.8

Public API Reference 29 Method Name Effective since version pem.iis.getwebspacesinfo (on page 91) 2.8 pem.iis.setwebspacefeaturesinfo (on page 91) 2.8 pem.iis.updatedomainmapping (on page 113) 2.6.5 pem.iis.updatelimits (on page 93) 2.9 pem.iis.updatephpextensionslist (on page 93) 2.9 pem.iis.updatesystemengine (on page 114) 2.6.5 pem.iis.updatesystemmapping (on page 115) 2.6.5 pem.iis.grantauthorizedwebaccess (on page 116) 2.9 pem.iis.revokeauthorizedwebaccess (on page 116) 2.9 pem.iis.getauthorizedwebaccessdomainsforuser (on page 116) 2.9 pem.iis.getauthorizedwebaccessusersfordomain (on page 117) 2.9 pem.iis.getftpaccessstatusforuser (on page 117) 2.9 hotfix01 pem.iis.getftpaccessstatusesfordomain (on page 118) 2.9 hotfix01 pem.iis.grantftpaccesstowebsite (on page 119) 2.9 hotfix01 pem.iis.revokeftpaccessfromwebsite (on page 119) 2.9 hotfix01 pem.importcertificate (on page 82) 2.3 pem.installplesklicense (on page 240) 2.6.5 pem.migratesubscription (deprecated) (on page 59) 2.5 pem.modifyuser (on page 101) 2.6.5 pem.mscrm.createorg (on page 178) 2.8 pem.mscrm.createuser (on page 178) 2.8 pem.mscrm.disableorg (on page 181) 2.8 pem.mscrm.enableorg (on page 181) 2.8 pem.mscrm.getbusinessunits (on page 181) 2.8 pem.mscrm.getcurrencies (on page 182) 2.8 pem.mscrm.getorgbysubscription (on page 182) 2.8 pem.mscrm.getorginfo (on page 183) 2.8 pem.mscrm.getorglist (on page 184) 2.8 pem.mscrm.getorgusers (on page 185) 2.8 pem.mscrm.getsecurityroles (on page 186) 2.8 pem.mscrm.getuserinfo (on page 186) 2.8 pem.mscrm.modifysecurityroles (on page 189) 2.8 pem.mscrm.moveuser (on page 189) 2.8

30 Parallels Operations Automation 5.0 Parallels Method Name pem.mscrm.removeorg (on page 189) 2.8 pem.mscrm.removeuser (on page 190) 2.8 pem.mscrm.setexchangedeliverysettings (on page 190) 2.8 pem.mscrm.setexternaldeliverysettings (on page 191) 2.8 pem.mscrm.setnonedeliverysettings (on page 192) 2.8 pem.mscrm.setorgdisplayname (on page 192) 2.8 pem.mscrm.setoutlookdeliverysettings (on page 192) 2.8 pem.mssql.setquota (on page 195) 2.6.5 pem.mysql.applymysqlactivationparams (on page 195) 2.9 pem.ordersubscription (deprecated) (on page 60) 2.3 pem.ocs.getphonenumberlist (on page 177) 5.0 pem.packaging.native_repository.createrepository (on page 236) 2.6 pem.packaging.native_repository.getrepository (on page 237) 2.6 pem.packaging.native_repository.reindex (on page 237) 2.6 pem.packaging.native_repository.removerepository (on page 238) pem.promotetoreseller (on page 44) 2.6.4 pem.provisionsubscription (deprecated) (on page 61) 2.3 pem.proftpd.createcustomftpuser (on page 95) pem.proftpd.deletecustomftpuser (on page 96) pem.proftpd.getcustomftpuserslist (on page 96) pem.registerexternalsystem (on page 262) 2.9 pem.setexternalsystemconfig (on page 263) 2.9 pem.getexternalsystemlist (on page 261) 2.9 pem.unregisterexternalsystem (on page 263) 2.9 pem.registersharednode (on page 245) 5.0 Effective since version 2.6 2.9 hotfix01 2.9 hotfix01 2.9 hotfix01 pem.removeaccount (on page 45) 2.3.01 pem.removeaccountmember (on page 45) 2.3.01 pem.removednshosting (on page 83) 2.6.4 pem.removedomain (on page 83) 2.3 pem.removeptrrecord (on page 84) 2.6.5 pem.removesubscription (on page 62) 2.3 pem.removeuser (on page 101) 2.6.5

Public API Reference 31 Method Name pem.resetresourceusage (internal) (on page 210) 2.3 pem.revokeippool (on page 235) 2.6.5 pem.revokerolesfrommember (on page 52) 5.0 pem.revokeplesklicense (on page 241) 2.6 pem.statistics.getstatisticsreport (on page 214) 5.0 pem.setaccountauthdata (on page 45) 2.3 pem.setaccountinfo (on page 46) 2.3 pem.setdomainregistrarstatus (on page 85) 2.3 pem.setftppassword (on page 94) 2.4 pem.sethostattributes (on page 232) 2.6.3 pem.setmemberinfo (on page 47) 2.6.2 pem.setmemberpassword (on page 48) 2.6.2 pem.setresourcetypelimit (on page 211) 2.3 pem.setresourcetypelimits (on page 212) 2.6.1 pem.setrtattributes (on page 213) 2.6.3 pem.setstactivationparams (on page 229) 2.6.3 pem.setstrtlimits (on page 230) 2.6.3 pem.setsubscriptionname (on page 63) 2.6.1 pem.setsystemproperty (on page 49) 2.6.3 pem.sharepoint.createsharepointsite (on page 120) pem.sharepoint.deletesharepointsite (on page 124) pem.sharepoint.getavailablesharepointsitetemplates (on page 124) pem.sharepoint.addsharepointuser (on page 127) pem.sharepoint.removesharepointuser (on page 127) pem.sharepoint.createsharepointsiteinsharedapplication (on page 122) pem.spam_assassin.additems (on page 203) 5.0 pem.spam_assassin.deleteitems (on page 203) 5.0 pem.spam_assassin.getitems (on page 204) 5.0 pem.uploadlicense (on page 225) 5.0 pem.unbindippool (on page 235) 2.6.3 pem.unbranddomain (on page 240) 2.6 pem.unsethostattributes (on page 232) 2.6.3 Effective since version 2.8 hotfix02 2.8 hotfix02 2.8 hotfix02 2.8 hotfix02 2.8 hotfix02 5.0

32 Parallels Operations Automation 5.0 Parallels Method Name Effective since version pem.updateaccountandaccountmember (on page 50) 2.3 pem.upgradesubscription (on page 63) 2.3 pem.virtuozzo.attachvps (on page 241) 2.6.5 pem.virtuozzo.importtemplate (on page 242) 2.6.3 pem.virtuozzo.installtemplate (on page 242) 2.6.3 pem.virtuozzo.installtemplates (on page 243) 5.0 pem.virtuozzo.removetemplates (on page 244) 5.0 pem.virtuozzo.updateeztemplates (on page 243) 5.0 pem.virtuozzo.registerhwnode (on page 244) 2.8 txn.begin (on page 267) 2.6.3 txn.commit (on page 268) 2.6.3 txn.rollback (on page 268) 2.6.3 In This Chapter Management of Accounts and Account's Staff Members... 33 Subscriptions Management... 52 Domains Management... 65 Webspace Management... 86 Service Users Management... 97 IIS Management... 103 SharePoint Management... 120 Exchange Management... 128 Hosted OCS Management... 177 Hosted CRM Management... 178 Database Management... 193 QMail Mailbox Management... 196 Resource Accounting... 205 Service Template Management... 226 Provisioning Attributes Management... 231 IP Pools Management... 233 Native Package Management... 236 Branding Management... 238 Parallels Plesk Panel Management... 240 Parallels Virtuozzo Containers Management... 241 Hardware Node Management... 245 Application Management... 246 External System Management... 261 Transactional Extension... 265

Public API Reference 33 Management of Accounts and Account's Staff Members This functional group allows to create, modify, retrieve properties, and remove Accounts and Account s Staff Members. POA 2.4 introduces an ability to work in conjunction with the external system that stores accounts information in its own database. If you configure POA to work with external account information storage, the user should apply alternative public API methods' interface where needed. Note that some public API methods become unavailable under this scheme. System ID parameter, that is used to refer to external system, is generated during registering of this external system in POA. pem.addaccount This method is supported by POA starting from version 2.3. This method creates an Account for Reseller or Customer in POA. Note that this method does not create an Account s Staff Member; use pem.addaccountmember (on page 37) method for this purpose. The request must contain either the set of Account information parameters such as person, address, phone, fax, email or the external_info that uniquely identifies External System where POA should get appropriate data. Important: You should always call pem.addaccountmember (on page 37) just after pem.addaccount (on page 33). Otherwise, the deployment will be considered incorrect and, in general, subsequent call of pem.activatesubscription will lead to the unpredictable result. [account_id] int The ID of the Account to create. This ID is generated by External System. Optional parameter. If this parameter is not specified, POA will generate it according its internal sequence of IDs.

34 Parallels Operations Automation 5.0 Parallels [account_type] string Indicates the type of the Account to create. It can take the following values: C - Indicates that the Account is created for Customer. Default value. R - Indicates that the Account is created for Reseller. [subscription_id] int The ID of Subscription that provides resource Client accounts or Reseller accounts depending on Account type. If subscription_id parameter is specified, then the POA searches that concrete Subscription for appropriate resource. Method would fail if no resource found. If subscription_id is not specified, then the method will look at all owner's Subscriptions and search least loaded resource of the needed type. [parent_account_id] int [branded_domain_nam e] string Account ID of a parent Account. POA Provider's Account is the default value. The domain, brand is created on. If such domain is specified, the created account is bound to this brand. If parameter is omitted, the brand is selected in the following way: The 'Inherit branding configuration' System Property is disabled. If a vendor s account has a default brand, a new account is bound to this brand. Otherwise, a new account is not bound to any brand (systemwide service names are used for accessing hosting services). The 'Inherit branding configuration' System Property is enabled. There are the following scenarios: Send the following info, if POA uses external account info storage: If a vendor s account has a default brand, a new account is bound to this brand. Vendor s account has no default brand, but vendor s account is bound to a brand of parent vendor s account. In this scenario a new account is bound to a brand of parent vendor s account. Vendor s account has no default brand and it is not bound to a brand of parent vendor s account. In this scenario POA looks up for a brand in the hierarchy of accounts: a default brand of parent vendor s account (if such default brand exists) or brand to which parent vendor s account is bound (if such brand exists), right up to the Provider s account. If POA finds the required brand, a new account is bound to this brand. Otherwise, a new account is not bound to any brand (system-wide service names are used for accessing hosting services).

Public API Reference 35 [external_info] struct system_id string The reference ID to External System that stores Account info external_account _id string Some Account identifier that will be passed to the External System for identification of this Account. Send the following info, if POA stores account info in its own database: [person] struct Contains general information about person/company represented by the Account being created. [title] string This is salutation like Mr. or Mrs., etc. first_name string The first name of the person represented by the Account. [middle_name] string The middle name of the person represented by the Account. last_name string The last name of the person represented by the Account. [company_name] string The name of the company represented by the Account. If the company is not specified, first name, middle name and last name will be used instead. [address] struct Contains address information for the person/company represented by the Account being created. street_name string Name of the street. [house_num] string The number of the house. [address2] string Second address. zipcode string Postal code. city string Name of the city. country string This is the code of the country represented by two lowercased letters, like us, uk, etc. state string Name of the state/province. [phone] struct Contains phone information for the person/company represented by the Account being created. country_code string Country code part of the phone number. area_code string Area code part of the phone number. phone_num string The phone number itself. ext_num string Extension to the phone number, if present. [fax] struct Contains fax information for the person/company represented by the Account being created.

36 Parallels Operations Automation 5.0 Parallels country_code string Country code part of the fax number. area_code string Area code part of the fax number. phone_num string The fax number itself. ext_num string Extension to the fax number, if present. [email] string The e-mail address of the person/company represented by the Account being created. [locale] struct Locale of Account. language_code string Language code (two-letter code system), for example: en, de, etc. country_code string Country code (two-letter code system), for example: US, DE, etc. variant string Variant code. It contains a customization of Locale (this field can be empty). The method has the following output parameters: account_id int ID of the created Account.

Public API Reference 37 For XML-RPC sample of using this method see pem.addaccount Sample section (on page 272) in XML-RPC Samples appendix (on page 269). See also: pem.addaccountmember method (on page 37). pem.addaccountmember This method is supported by POA starting from version 2.3 This method creates a Staff Member in POA. There are the following use cases: POA stores Account's and Staff Member's properties in the system database, and POA authenticates Staff Member by itself. In this case the auth, person, address, phone, fax, and email parameters are mandatory. The external_identity parameter should not be specified. Account's and Staff Member's properties are stored in the External System, and External System is used for Staff Members authentication purposes. In this case the external_identity parameter is mandatory. The auth, person, address, phone, fax, and email parameters should not be specified. account_id int ID of Account. [subscription_id] int ID of Subscription, which provides the Additional Staff Members Resource Type. This is an optional parameter. There are the following use cases: The parameter is specified. In this case POA uses the Additional Staff Members Resource Type from the Subscription specified. The parameter is not specified. In this case POA looks at all Account's Subscriptions and searches the least loaded Additional Staff Members Resource. Note: If an Account has no Staff Members yet, then the Staff Member creation will succeed in any case. [user_id] int ID of Staff Member. This is an optional parameter. If parameter is not specified, POA generates user_id itself.

38 Parallels Operations Automation 5.0 Parallels [login] string Key of Staff Member in the External System, which is associated with Account (an external account is required). [external_identity] struct system_name string External System name. This parameter is optional. It is used if Account's and Staff Member's properties are stored in the External System, and External System is used for Staff Member authentication purposes. Important: Since POA 2.9, this parameter is deprecated. The external_identity parameter should be used instead. Identity of Staff Member in the External System. This is an optional parameter. It should be used if Staff Member belongs to the External System. identity_key string External key that is passed to the External System for identification of the Staff Member. The external key is static unique key in the scope of specified External System. The format of the key depends on External System plug-in implementation and External System configuration. To obtain information about this parameter, refer to the plug-in documentation. [auth] struct It contains information, which is used for authenticating the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA. login string Login of Staff Member. password string Password of Staff Member. [check_password] boolean It defines whether to check the quality of the password, against the password quality level defined in POA. [person] struct It contains general information about the person represented by the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA.

Public API Reference 39 [title] string Title of the person represented by the Staff Member. For example: Mr. or Mrs., etc. first_name string The first name of the person represented by the Staff Member. [middle_name] string The middle name of the person represented by the Staff Member. last_name string The last name of the person represented by the Staff Member. [company_name] string The name of the company represented by the Staff Member. [address] struct It contains address information for the person represented by the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA. street_name string Name of the street. [house_num] string The number of the house. [address2] string Second address. zipcode string Postal code. city string Name of the city. country string This is the code of the country represented by two lowercased letters, like the us, uk, etc. state string Name of the state/province. [phone] struct It contains phone information for the person represented by the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA. country_code string Country code part of the phone number. area_code string Area code part of the phone number. phone_num string The phone number itself. ext_num string Extension to the phone number, if present. [fax] struct It contains fax information for the person represented by the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA. country_code string Country code part of the fax number. area_code string Area code part of the fax number. phone_num string The fax number itself. ext_num string Extension to the fax number, if present. [email] string The e-mail address of the person represented by the Staff Member. This is an optional parameter. It should be used, if Staff Member belongs to POA.

40 Parallels Operations Automation 5.0 Parallels [roles] array of string Names of Roles. If the parameter is specified, POA grants the Roles to Staff Member. Note: The first Account's Staff Member automatically obtains the Account Administrator Role, the subsequent Account's Staff Members automatically obtain the Staff member defaults Role. The method has the following output parameters: user_id int Staff Member ID For XML-RPC sample of using this method see pem.addaccountmember Sample (on page 276) section in XML-RPC Samples appendix (on page 269). See also: pem.addaccount (on page 33) method. pem.checkpassword This method is supported by POA starting from version 2.4 This method checks password quality. account_id int The ID of the Account to check password for. password string Password to check. [name] string Name to check that password does not contain personal information. [disabled_chars] string Disabled characters. The list of characters that cannot occur in password. This method has no output parameters.

Public API Reference 41 pem.disableaccount This method is supported by POA starting from version 2.3. This method disables all services provisioned under specified account. The corresponding Reseller or Customer will be still able to login to POA, but will not be able to use and manage services provisioned under this account. account_id int The ID of the Account to disable. The method has no output parameters. See also: pem.enableaccount method (on page 42). pem.disableaccountmember This method is supported by POA starting from version 2.8 hotfix02 This method makes a Staff Member disabled. Note: Disabled Staff Member is not allowed to log in to POA Control Panel. member_id int ID of Staff Member. The method has no output parameters.

42 Parallels Operations Automation 5.0 Parallels pem.enableaccount This method is supported by POA starting from version 2.3. This method enables all services provisioned under specified account if they were disabled. The corresponding Reseller or Customer will be able to login to POA and manage services provisioned under this account. Note: if pem.disableaccount method (on page 41) was called for an account, then it is not guaranteed that, after calling pem.enableaccount method, all services will be in the same state as they were just before pem.disableaccount method (on page 41) was called; it depends on particular kind of services. account_id int The ID of the Account to enable. The method has no output parameters. See also: pem.disableaccount method (on page 41). pem.enableaccountmember This method is supported by POA starting from version 2.8 hotfix02 This method makes a Staff Member enabled. member_id int ID of Staff Member. The method has no output parameters.

Public API Reference 43 pem.getaccountinfo This method is supported by POA starting from version 2.4. This method returns information about account: contacts, parent accounts, etc. account_id int POA Account ID The output parameters are the following: account_type string Account type. The possible values are the following: A - Provider's Account C - Customer's Account R - Reseller's Account parent_account_id int Parent account ID person struct General information about person/company address struct Customer/reseller address phone struct Customer/reseller phone number fax struct Customer/reseller fax number email string Customer/reseller E-mail address Look into pem.addaccount method (on page 33) description for complete specification of these structures. pem.getaccountmemberbylogin This method is supported by POA starting from version 2.7. This method returns information about account member for specific login if there is any. login string Login to find in POA system

44 Parallels Operations Automation 5.0 Parallels This method has the following output parameters: user_id int Account member ID account_id int ID of an account that owns the member pem.getaccountsubscriptions This method is supported by POA starting from version 2.4. This method returns a list of subscriptions that Account has. account_id int Account ID Method returns an array(int) that contain a list of customer s subscription IDs. pem.promotetoreseller This method is supported by POA starting from version 2.6.4 This method promotes any Customer Account to the Reseller Account. Note: The method checks that parent Account of the Customer Account has enough the Reseller accounts Resource. Otherwise an error is returned. account_id int ID of Account to promote The method has no output parameters.

Public API Reference 45 pem.removeaccount This method is supported by POA starting from version 2.3.01 This method removes an account from POA. Note that this method automatically removes all account s data. account_id int The ID of the account to remove. Note: After account deletion the account ID remains in the database and can not be reused anew. The method has no output parameters. pem.removeaccountmember This method is supported by POA starting from version 2.3.01. This method removes an Account's Staff Member from POA. user_id int The ID of the Account's Staff Member to remove. The method has no output parameters. pem.setaccountauthdata This method is supported by POA starting from version 2.3. Note: Starting from POA version 2.4, the calling of this method is considered incorrect, if POA is configured to gather account and account auth info from external system. This method is used to change account member password. auth struct Account authentication info

46 Parallels Operations Automation 5.0 Parallels [member_id] int The ID of Account's Staff Member [login] string The login of Account's Staff Member password string The password of Account's Staff Member to set [check_password ] boolean Checks the quality of the issued password member_id and login parameters are optional to each other. It means that one of them must be explicitly specified. This method has no output parameters. pem.setaccountinfo This method is supported by POA starting from version 2.3. Note: Starting from POA version 2.4, the calling of this method is considered incorrect, if POA is configured to gather account and account auth info from external system. This method updates information of POA Account. This method has the following input parameters: account_id int ID of an Account. It identifies the Account to change. person struct General information about contact person and company. [title] string This is salutation like Mr. or Mrs., etc. first_name string The first name of the contact person. [middle_name] string The middle name of the contact person. last_name string The last name of the contact person. [company_name] string The name of the company. address struct Address information.

Public API Reference 47 street_name string Name of the street. [house_num] string The number of the house. [address2] string Second address. zipcode string Postal code. city string Name of the city. country string This is the code of the country represented by two lowercase letters, like us, uk, etc. state string Name of the state/province. phone struct Contact phone number. country_code string Country code part of the phone number. area_code string Area code part of the phone number. phone_num string The phone number itself. ext_num string Extension to the phone number, if present. [fax] struct Contact fax number. country_code string Country code part of the fax number. area_code string Area code part of the fax number. phone_num string The fax number itself. ext_num string Extension to the fax number, if present. email string Contact E-mail address. This method has no output parameters. pem.setmemberinfo This method is supported by POA starting from version 2.6.2 This method sets the contact information for Staff Member identified by login. The semantics of structure and field names are fully compatible with pem.setaccountinfo method (on page 46). This method has the following input parameters: login string Login name of the Sraff Member. Identifies the Account s Staff Member to change. person struct General information about Staff Member.

48 Parallels Operations Automation 5.0 Parallels [title] string This is salutation like Mr. or Mrs., etc. first_name string The first name of the Staff Member. [middle_name] string The middle name of the Staff Member. last_name string The last name of the Staff Member. [company_name] string The name of the company. This parameter is ignored. address struct Address information. street_name string Name of the street. [house_num] string The number of the house. [address2] string Second address. zipcode string Postal code. city string Name of the city. country string This is the code of the country represented by two lowercase letters, like us, uk, etc. state string Name of the state/province. phone struct Contact phone number. country_code string Country code part of the phone number. area_code string Area code part of the phone number. phone_num string The phone number itself. ext_num string Extension to the phone number, if present. [fax] struct Contact fax number. country_code string Country code part of the fax number. area_code string Area code part of the fax number. phone_num string The fax number itself. ext_num string Extension to the fax number, if present. email string Contact E-mail address. This method has no output parameters. pem.setmemberpassword This method is supported by POA starting from version 2.6.2 This method changes the password for member identified by login. login string Login name of the member password string Password to be issued to member

Public API Reference 49 [check_password] boolean Checks the quality of password. This method has no output parameters. pem.setsystemproperty This method is supported by POA starting from version 2.6.3 This method sets system property to a specified value. POA system properties are the typed values so one should set correct input value parameter. One and only one of bool_value, str_value, num_value, enum_value parameters should be specified. Note that POA UI will not see new property values automatically, it needs reread them into cache. account_id int Account ID that defines a scope of a new value to be applied to. name string Property name [bool_value] boolean Boolean-typed value [str_value] string String-typed value [num_value] int Numeric value [enum_value] string Enumeration value This method has no output parameters.

50 Parallels Operations Automation 5.0 Parallels pem.updateaccountandaccountmember (deprecated) This method is supported by POA starting from version 2.3. This method exists in our API for compatibility reasons but it is no longer supported. Please use pem.setaccountinfo (on page 46), pem.setmemberinfo (on page 47), pem.setmemberpassword (on page 48) instead. pem.getvendorcustomers This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of direct child Accounts for the specified vendor's Account (Provider's or Reseller's one). vendor_id int ID of vendor's Account (ID of Provider's or Reseller's Account) The method returns the following array: account_id int Account ID pem.getaccountroles This method is supported by POA starting from version 5.0 This method returns a list of Roles, which can be assigned to Account's Staff Members. account_id int Account ID The method has the following output parameters: roles array of string Names of Roles

Public API Reference 51 pem.getaccountmemberroles This method is supported by POA starting from version 5.0 This method returns a list of Roles, which are assigned to the specified Staff Member. member_id int Staff Member ID The method has the following output parameters: roles array of string List of Roles pem.assignrolestomember This method is supported by POA starting from version 5.0 This method grants a list of new Roles to the specified Staff Member. Note: The method does not change a list of already assigned Roles. member_id int Staff Member ID roles array of string Names of Roles The method has no output parameters.

52 Parallels Operations Automation 5.0 Parallels pem.revokerolesfrommember This method is supported by POA starting from version 5.0 This method revokes a list of Roles from the specified Staff Member. member_id int Staff Member ID roles array of string List of Roles The method has no output parameters. Subscriptions Management This functional group allows to manage Subscriptions. Provisioning Models 3 provisioning models could be used in POA: 1 Single call (pem.activatesubscription) model that supports variable parameters set to provide any kinds of resources supported by POA. Additionally you could use pem.addsubscription call to create subscription, but in this case you will be not able to initiate provisioning of it from Public API if it is not shared hosting subscription. 2 Obsolete model that supports only shared hosting subscriptions provisioning. In this model you should call pem.addsubscription to create subscription then set limits on resources using a series of pem.setresourcetypelimit calls, and, finally, call pem.provisionsubscription method (on page 61) to provision the subscription. The external billing system shall use a separate method pem.adddomain to add domains. Please refer to the diagram. 3 Starting from POA version 2.5, the new scheme of "Pure Domains" is introduced. Using this scheme, you can create domains without hosting. In this case, the parameter hosting_type should be turned off, when you call pem.adddomain method. At the same time, there is a possibility to create domains with automatically included Mail Hosting. In this case, the activation parameter Auto host domains should be turned to "yes" in the Service Template.

Public API Reference 53 pem.activatesubscription This method is supported by POA starting from version 2.3.01. This method creates subscription, sets resource limits for this subscription, and then executes subscription provisioning. There are the following use cases of this method: Call pem.activatesubscription without parameters array passing. The system creates Subscription and performs provisioning. To add a Domain, pem.adddomain should be called separately. Call pem.activatesubscription with parameters array passing. The system creates Subscription and Domain with physical hosting turned on, after that the provisioning takes place. [subscription_id] int The ID of the Subscription to activate. If the parameter is not specified then ID for new Subscription will be generated by the system. [subscription_name] string The name of Subscription. account_id int The ID of Account to subscribe service_template_id int The ID of the Service Template that should be used for Subscription creation. [resource_limits] array of struct Subscription resource limits. It is optional parameter. If omitted then Service Template s limits are used.

54 Parallels Operations Automation 5.0 Parallels resource_id int Resource Type ID. [resource_limit] int Resource Type limit. Parameters resource_limit and resource_limit64 are optional to each other. Note: Use -1 value to make a resource unlimited. [resource_limit64] bigint Resource Type limit. It is 64bit analog of resource_limit parameter. Parameters resource_limit and resource_limit64 are optional to each other. Note: Use -1 value to make a resource unlimited. [parameters] array of struct The array of parameters (var_name, var_value) pairs that should be used during Subscription resources provisioning. It is optional parameter. Each element of array is a struct of two string values, the first is the parameter name, the second is the parameter value. The table of parameters supported is provided below. var_name string Parameter name. var_value string Parameter value. The table of parameters supported: Name domain_id domain_name Value The ID of Domain. If omitted, the system will assign the ID to Domain automatically. Otherwise, specified Domain ID value will be used. The name of Domain to create.

Public API Reference 55 apache_homedir _path registrar_stat us The custom Webspace s location relative the Webspaces Root directory of the Apache Web Server. If the parameter is omitted, an ID of a Webspace is used as default value. Examples: The Webspaces Root directory of the Apache Web Server is /usr/local/pem/vhosts/ and the apache_homedir_path parameter s value is dir01/dir02/. In this case a Webspace is provisioned in /usr/local/pem/vhosts/dir01/dir02/ directory. The Webspaces Root directory of the Apache Web Server is /usr/local/pem/vhosts/ and the apache_homedir_path parameter is omitted. In this case POA generates the ID of a Webspace and the Webspace is provisioned in /usr/local/pem/vhosts/<id of a Webspace>/ directory. Registrar status of Domain. Possible values: 0 - Domain check result is undefined. 1 - Domain is not registered. 2 - Domain is registered. If omitted, 2 (Domain is registered) is used by default. The method has the following output parameters: subscription_id int The ID of the Subscription created. auto_provisioning_result array of struct The result of Subscription autoprovisioning. It contains information about the provisioned Resources. It is not empty if Hosting Modules to which Resources belong use this parameter to return an additional information.

56 Parallels Operations Automation 5.0 Parallels rt_id int Resource Type ID of provisioned Resource. rt_parameters array of struct Information about the provisioned Resource. parameter_name string Parameter name. parameter_value string Parameter value. For XML-RPC sample of using this method see pem.activatesubscription Sample (on page 279) in XML-RPC Samples appendix (on page 269). pem.addsubscription This method is supported by POA starting from version 2.3. This method adds a subscription, created by external billing system, into POA without provisioning it. account_id int The ID of Account. Indicates the Account, which the Subscription being added relates to. [subscription_name] string The name of Subscription. [subscription_id] int The ID of Subscription to add, generated by external system. If the parameter is not specified then ID for new Subscription will be generated by the system. service_template_id int The ID of the Service Template. Indicates the existing Service Template, which the Subscription being added is based on. The method has the following output parameter. subscription_id int id of subscription to add See also: pem.adddomain method. pem.provisionsubscription method (on page 61).

Public API Reference 57 pem.disablesubscription This method is supported by POA starting from version 2.3. This method disables all services provisioned under specified subscription. Moreover, new services under this subscription cannot be provisioned until the subscription is enabled. subscription_id int The ID of the Subscription to disable. The method has no output parameters. See also: pem.enablesubscription method (on page 57). pem.enablesubscription This method is supported by POA starting from version 2.3. This method enables all services provisioned under specified subscription if they were disabled. Moreover, new services can be provisioned under the subscription after this method is called for it. Note: if pem.disablesubscription method was called for a subscription, then it is not guaranteed that, after calling pem.enablesubscription method, all services will be in the same state as they were just before pem.disablesubscription method was called; it depends on particular kind of services. subscription_id int The ID of the Subscription to enable.

58 Parallels Operations Automation 5.0 Parallels The method has no output parameters. See also: pem.disablesubscription method. pem.getsubscription This method is supported by POA starting from version 2.6.1 The pem.getsubscription allows to retrieve information about specific POA Subscriptions. subscription_id int Subscription ID get_resources boolean If method should return Subscription resources along with general information. This method has the following output parameters: subscription_id int Subscription ID name string Subscription Name st_id int Service Template ID st_version int Service Template Version owner_id int ID of account that own the Subscription is_active boolean Is Subscription active [resource_types] array of structs

Public API Reference 59 name string Name of Resource Type resource_type_i d parent_resource _type_id measurement_uni t int int string ID of the Resource Type ID of parent Resource Type (-1 is used if Resource Type has not parent Resource Type) Unit that used for measurement of resource quantity limit bigint Limit set for specific Resource Type usage bigint Amount of consumed resources of specific Resource Type resclass_name string Name of Resource Class The resource_types output parameter will be present only if get_resources input parameter is set to 1 (true). Note: POA resource types are organizing tree-like structure. The pem.getsubscription method returns plain list of resource types in a sake of simplicity. However, the actual resource type tree can be reproduced using parent_resource_type_id member. pem.migratesubscription (deprecated) This method is supported by POA starting from version 2.5. This method upgrades or downgrades a Subscription to the specified Service Template. This method is deprecated, please use the pem.upgradesubscription (on page 63) method instead. subscription_id int The ID of the Subscription to migrate. service_template_id int The ID of the Service Template to migrate the Subscription to. [custom_resource_li mits] array of structs Array of custom Resource Types limits. If specified, custom limits override the limits which are specified in the destination Service Template.

60 Parallels Operations Automation 5.0 Parallels resource_type_id int Resource Type ID. limit bigint Resource Type limit. Note: Use -1 value to make a resource unlimited. This method has the following output parameters: rt_added array of int IDs of Resource Types that are added to Subscription. rt_removed array of int IDs of Resource Types that are removed from Subscription. rt_mapped array of structs This parameter contains the list of the Resource Types mapped between source and destination Service Templates. Mapped Resource Type means that the Resource Type in the source Service Template has the same Resource Class as the Resource Type in the destination Service Template. src_rt_id int ID of Resource Type in the source Service Template. dst_rt_id int ID of Resource Type in the destination Service Template. pem.ordersubscription (deprecated) This method is supported by POA starting from version 2.3. This deprecated method was used for creation only Shared Hosting subscriptions and will be removed from API in next POA versions. This method creates a subscription, adds a domain and provisions the subscription in one call. Instead of calling pem.ordersubscription, external billing system shall now call pem.activatesubscription method. Following parameters set should be passed as parameters parameter to pem.activatesubscription call for Shared Hosting subscriptions: domain_name, domain_id (optional), registrar_status. account_id int ID of Account. Indicates the Account, which the Subscription being added/provisioned relates to. subscription_id int The ID of the Subscription to add/provision. This ID is generated by external billing system.

Public API Reference 61 service_template_id int Service Template ID. Indicates the existing Service Template, which the Subscription being added/provisioned is based on. [domain_id} int The ID of the Domain to add. This parameter is optional and present here for backward compatibility purposes. domain_name string Name of Domain to add. registrar_status int Indicates the registrar Domain status. It can take the following values: The method has no output parameters. See also: Ordering a Subscription diagram. pem.adddomain method. pem.addsubscription method. pem.provisionsubscription method (on page 61). pem.setresourcetypelimit method. 0. Domain check result is undefined. 1. Domain is not registered. 2. Domain is registered. pem.provisionsubscription (deprecated) This method is supported by POA starting from version 2.3.01. This method was used for provisioning Shared Hosting subscriptions only. Use pem.activatesubscription method to create and provisions a subscription in POA. subscription_id int The ID of the Subscription to provision.

62 Parallels Operations Automation 5.0 Parallels [provisioned_resource_types] array (struct) This parameter indicates which Resource Types must be autoprovisioned and in what amount. It is an optional parameter. If it is omitted, then the auto-provisioning of Resource Types is performed according to default rules in POA. The method has no output parameters. See also: Ordering a Subscription diagram. pem.adddomain method. pem.addsubscription method. pem.setresourcetypelimit method. This parameter represents an array of structs, each describing autoprovisioning for a separate Resource Type. Structs have the following fields: resource_type_id of type int. Indicated the Resource Type to auto-provision. amount of type int. Specifies the amount of resources to auto-provision. pem.removesubscription This method is supported by POA starting from version 2.3. This method unsubscribes Reseller or Customer from services provisioned under the specified subscription. subscription_id int The ID of the Subscription to remove. The method has no output parameters.

Public API Reference 63 pem.setsubscriptionname This method is supported by POA starting from version 2.6.1 This method allows to set new name and description for an existent subscription. This method has the following input parameters: subscription_id int Subscription ID [name] string The name of Subscription. [descr] string The description of Subscription. This method has no output parameters. pem.upgradesubscription This method is supported by POA starting from version 2.3. This method upgrades or downgrades a Subscription to the specified Service Template. subscription_id int The ID of the Subscription to upgrade or downgrade. service_template_id int The ID of the Service Template to upgrade or downgrade the Subscription to. [custom_resource_li mits] array of structs Array of custom Resource Types limits. If specified, custom limits override the limits which are specified in the destination Service Template. resource_type_id int Resource Type ID. limit bigint Resource Type limit. Note: Use -1 value to make a resource unlimited. This method has the following output parameters: rt_added array of int IDs of Resource Types that are added to Subscription. rt_removed array of int IDs of Resource Types that are removed from Subscription.

64 Parallels Operations Automation 5.0 Parallels rt_mapped array of structs This parameter contains the list of the Resource Types mapped between source and destination Service Templates. Mapped Resource Type means that the Resource Type in the source Service Template has the same Resource Class as the Resource Type in the destination Service Template. src_rt_id int ID of Resource Type in the source Service Template. dst_rt_id int ID of Resource Type in the destination Service Template. pem.getcustomersubscriptions This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of Subscriptions, which belong to direct child Accounts of the specified vendor's Account (Provider's or Reseller's one). The method has the following input parameter: vendor_id int ID of vendor's Account (ID of Provider's or Reseller's Account) The method returns the following array: subscription_id int Subscription ID

Public API Reference 65 Domains Management This functional group allows to manage Domains. pem.adddnshosting This method is supported by POA starting from version 2.6.4 This method adds DNS Hosting on the specified Domain. domain_id int The ID of Domain to add DNS Hosting on. [subscription_id] int The ID of Subscription which contains the "DNS Hosting" Resource Type. This is an optional parameter. [hosting_rt_id] int The Resource Type ID of the "DNS Hosting" Resource Type. This is an optional parameter.

66 Parallels Operations Automation 5.0 Parallels There are the following scenarios of the using this method: Both the subscription_id and the hosting_rt_id parameters are specified. In this scenario DNS Hosting is provisioned on the basis of the specified "DNS Hosting" Resource Type from the specified Subscription. Only the subscription_id parameter is specified. In this case DNS Hosting is provisioned on the basis of the "DNS Hosting" Resource Type, which is obtained from the specified Subscription. Only the hosting_rt_id parameter is specified. In this scenario POA looks for the specified "DNS Hosting" Resource Type in all existing Account's Subscriptions, the first encountered Subscription containing the specified Resource Type is used for DNS Hosting provisioning. None of the two parameters are specified. In this scenario, POA looks for Subscriptions containing the "DNS Hosting" Resource Type, the first encountered Subscription with this Resource Type is used for provisioning. The method has no output parameters. See also pem.removednshosting (on page 83). Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.adddomain This method is supported by POA starting from version 2.3. This method creates a domain and adds all the available in Subscription hostings to the Domain created. Subscription should not contain conflicting hostings, like the Apache Web Hosting and IIS Web Hosting simultaneously (or QMail Hosting and Exchange Hosting). Additionally, there is an ability to control which hostings to add to the Domain from the Subscription. Every Resource Type, which corresponds to the certain hosting, has the Auto host domains Activation Parameter. If this parameter has the Yes value, hosting will be added to the Domain during the call of method. If this parameter has the No value, hosting will not be added to the Domain during the call of method. This Activation Parameter controls the provisioning of the following hostings: IIS Web Hosting SharePoint Services Hosting Domain Parking Hosting (Apache) Exchange Hosting Apache Web Hosting Domain Parking Hosting (IIS) CQMail Hosting

Public API Reference 67 subscription_id int ID of Subscription. [domain_id] int ID of Domain to create. This parameter is optional. domain_name string Name of Domain to create. [registrar_status] int Initial registrar status for Domain. It can take the following values: 0 - Domain check result is undefined. 1 - Domain is not registered. 2 - Domain is registered. This parameter is optional. If it is omitted, then the value of the Domain registrar status default value System Property is used to set the registrar status for Domain. [hosting_type] int Hosting type for new Domain. This parameter is optional. It can take the following values: [domain_parking_typ e] int 0 - Physical Hosting (Apache/IIS/SharePoint). 1 - RESERVED. Do not use! 2 - Domain Parking Hosting (Apache/IIS). There are the following use cases: This parameter is omitted. In this case POA adds all available in the Subscription hostings. This parameter is specified. In this case POA, first, adds hosting according to the value of this parameter (the Auto host domains Activation Parameter is ignored), then - all available in Subscription hostings. Note: If the parameter is set to 0, under IIS Web Hosting Subscriptions at least one provisioned Webspace is required for domain creation. If a Subscription does not contain any Webspaces, a domain is not created and an error is returned. Type of domain parking. This parameter can be issued only if hosting_type parameter is set to 2 (parked domain hosting type). It can take the following values: 0 - Parking 1 - Standard Forwarding 2 - Single Page Website 3 - Frame Forwarding If this parameter is omitted and hosting_type is set to 2, then the Parking is used.

68 Parallels Operations Automation 5.0 Parallels [path] string Path or URL to redirect. Parameter meaning depends on the hosting type: Physical Hosting - path to document root location relatively to document root of Webspace. If it omitted or not specified then / is used by default. Domain Parking Hosting - Forwarding URL. This parameter is required for Standard Forwarding or Frame Forwarding Domain Parking Hosting types only. [external_domain] boolean This parameter defines a type of DNS Hosting for domain. If parameter is specified and its value is set to 1 (true), POA creates a domain having the external DNS Hosting type. [force] boolean This parameter defines Domain creating mode. There are the following possible values: The method has the following output parameter. 0 - Default value. There are the following scenarios: Domain with the same name exists in POA. In this case error is returned. Domain with the same name does not exist. In this case method removes Domain Request with the same name for Subscription specified, and creates new Domain. 1 - There are the following scenarios: Domain with the same name exists in POA under different Account. Method removes from POA all Domain Requests with the same name, then removes existing Domain, and creates new one for Subscription specified. Domain with the same name exists in POA under current Account. In this case method removes from POA all Domain Requests with the same name, and modifies Domain's properties according to parameters passed. Domain with the same name does not exist. Method removes from POA all Domain Requests with the same name, and creates new Domain for Subscription specified. domain_id int ID of Domain created.

Public API Reference 69 For XML-RPC sample of using this method see pem.adddomain Sample (on page 282) in the XML-RPC Samples Appendix (on page 269). pem.adddomainrequest This method is supported by POA starting from version 2.8 This method creates Domain Request. If Domain with the same name exists, DNS Zone of existing Domain is used for Domain Request. Otherwise, a new DNS Zone is created. Method returns a list of DNS Servers, which are responsible for appropriate DNS Zone. These DNS Servers are used by the external system to process Domain registration or transfer. Note: If Domain Request with the same name exists for Subscription specified, method does not create new Domain Request. It returns properties of existing Domain Request. subscription_id int ID of Subscription. domain_name string Name of Domain Request. The method returns array of strings: name_servers array DNS Servers list. ns string DNS Server hostname. zone_created boolean Whether the new DNS Zone is created. There are the following options: 0 - The new DNS Zone is created and method returns DNS Servers of new DNS Zone. 1 - DNS Zone already exists and method returns the DNS Servers of existing DNS Zone.

70 Parallels Operations Automation 5.0 Parallels pem.adddomaintoaccount This method is supported by POA starting from version 2.8 This method creates Domain for Account specified. The Domain created has no hosting added, not even DNS Hosting. account_id int ID of Account. [domain_id] int ID of Domain. This parameter is optional. domain_name string The name of Domain to create. [force] boolean This parameter defines Domain creating mode. There are the following possible values: The method has the following output parameters: 0 - Default value. There are the following scenarios: Domain with the same name exists in POA already. In this case error is returned. Domain with the same name does not exist. In this case method removes all Domain Requests with the same name for Account specified, and creates new Domain. 1 - There are the following scenarios: Domain with the same name exists in POA under different Account. Method removes from POA all Domain Requests with the same name, then removes existing Domain, and creates new one. Domain with the same name exists in POA under current Account. In this case method removes from POA all Domain Requests with the same name, but Domain stays intact. Domain with the same name does not exist. Method removes from POA all Domain Requests with the same name, and creates new Domain. domain_id int ID of Domain.

Public API Reference 71 pem.addptrrecord This method is supported by POA starting from version 2.6.5 This method adds new PTR record, and returns it s id. Note that this method works even if there are no appropriate reverse zone created, in this case, this record will immediately appear in the appropriate zone when as soon as a provider creates one. ip_address string IP address of the POA object (VPS or Hardware Node) to create a PTR record for. hostname string Hostname to configure PTR record for. The method has the following output parameters: N/A int ID of the created record. See also pem.removeptrrecord (on page 84). pem.addsubdomain This method is supported by POA starting from version 2.3. This method adds a Subdomain into POA under the corresponding Subscription. subscription_id int This parameter indicates the existing Subscription under which the Subdomain is added. domain_name string Name of the Domain to add the new Subdomain under. prefix string The prefix for Subdomain to add. The new Subdomain will be accessible via http://prefix.domain_name URL.

72 Parallels Operations Automation 5.0 Parallels [hosting_type] int This parameter indicates hosting type for the Subdomain. It can take the following values: [domain_parking_typ e] int 0 - Physical Hosting (Apache/IIS). 1 - RESERVED. Do not use! 2 - Domain Parking Hosting (Apache/IIS). This is an optional parameter. If it is omitted, a new pure Subdomain is created. Type of domain parking. This parameter can be issued only if hosting_type parameter is set to 2 (parked domain hosting type). It can take the following values: 0 - Parking 1 - Standard Forwarding 2 - Single Page Website 3 - Frame Forwarding If this parameter is omitted and hosting_type is set to 2, then the Parking is used. [path] string Path or URL to redirect. Parameter meaning depends on the hosting type: The method has no output parameters. Physical Hosting - path to document root location relatively to document root of WebSpace. If it omitted or not specified then / is used by default. Domain Parking Hosting - Forwarding URL. This parameter is required to specify for the Standard Forwarding or Frame Forwarding Domain Parking Hosting types only.

Public API Reference 73 pem.bindservicestodomain This method is supported by POA starting from version 2.8 This method adds hostings to Domain from Subscription specified. Subscription should not contain conflicting hostings, like the Apache Web Hosting and IIS Web Hosting simultaneously (or QMail Hosting and Exchange Hosting). Additionally, there is an ability to control which hostings to add to the Domain from the Subscription. Every Resource Type, which corresponds to the certain hosting, has the Auto host domains Activation Parameter. If this parameter has the Yes value, hosting will be added to the Domain during the call of method. If this parameter has the No value, hosting will not be added to the Domain during the call of method. This Activation Parameter controls the provisioning of the following hostings: IIS Web Hosting SharePoint Services Hosting Domain Parking Hosting (Apache) Exchange Hosting Apache Web Hosting Domain Parking Hosting (IIS) CQMail Hosting domain_id int ID of Domain for which hostings will be added. subscription_id int ID of Subscription. The method has no output parameters. pem.creatednsrecord This method is supported by POA starting from version 2.6.1 Hotfix 4. This method creates new DNS Record for a particular Domain. Method returns DNS Record ID. The caller should keep track of DNS Record IDs in order to be able to delete them later by pem.deletednsrecord (on page 75). domain_name string Name of the Domain to create DNS Record for.

74 Parallels Operations Automation 5.0 Parallels host string Host part of the DNS Record. Note: For SRV DNS Records this parameter should be specified in the following format: _SERVICE._PROTOCOL where _SERVICE is the name of service and _PROTOCOL is the protocol of service (TCP or UDP). For example: _service._tcp [ttl] int Optional DNS Record's TTL. type string DNS Record type. There are the following options: A - A DNS Record is created. CNAME - CNAME DNS Record is created. TXT - TXT DNS Record is created. MX - MX DNS Record is created. SRV - SRV DNS Record is created. NS - NS DNS Record is created. data string Actual data content. There are the following options: The method has the following output parameter. For A DNS Record: IP Address should be specified, for example 1.1.1.1 For CNAME DNS Record: Canonical name should be specified, for example name For TXT DNS Record: Data should be specified, for example v=spf1 a mx For MX DNS Record: Mail exchanger and preference should be specified, for example 10 mailexchanger.domain.acom For SRV DNS Record: Priority, Weight, Port, and Target should be specified. For example 10 65535 10000 service.domain.acom For NS DNS Record: Name server should be specified, for example nameserver record_id int ID of the created DNS Record. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions.

Public API Reference 75 pem.deletednsrecord This method is supported by POA starting from version 2.6.1 Hotfix 4. This method allows to delete DNS resource record that has been previously created with pem.creatednsrecord (on page 73) or via POA UI. record_id int ID of the record to delete. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.disablednsrecord This method is supported by POA starting from version 2.8 Hotfix 03 This method makes a DNS Resource Record disabled. record_id int DNS Resource Record ID.

76 Parallels Operations Automation 5.0 Parallels The method has no output parameters. See also: pem.enablednsrecord (on page 76) Note: This method can also be called under Reseller permissions. pem.disabledomain This method is supported by POA starting from version 2.3. This method disables the specified Domain in POA. It means that all Domain s DNS Records (except SOA and NS) will be removed from configuration of POA DNS Servers. domain_id int The ID of the Domain to disable. [domain_name] string Name of the Domain to disable. This parameter is optional. If it is specified, then domain_id parameter is ignored. The method has no output parameters. See also: pem.enabledomain (on page 77) method. pem.enablednsrecord This method is supported by POA starting from version 2.8 Hotfix 03 This method makes a DNS Resource Record enabled. record_id int DNS Resource Record ID.

Public API Reference 77 The method has no output parameters. See also: pem.disablednsrecord (on page 75) Note: This method can also be called under Reseller permissions. pem.enabledomain This method is supported by POA starting from version 2.3. This method enables the specified Domain in POA. It means that all Domain s DNS Records will be restored to the values they have before the Domain was disabled. domain_id int The ID of the Domain to enable. [domain_name] string Name of the Domain to enable. This parameter is optional. If it is specified, then domain_id parameter is ignored. The method has no output parameters. See also: pem.disabledomain method (on page 76). pem.getdomainbyname This method is supported by POA starting from version 2.8 This method returns the properties of the Domain specified. domain_name string The name of Domain. The method has the following output parameters: domain_id int ID of Domain. owner_id int ID of Account.

78 Parallels Operations Automation 5.0 Parallels name string The name of Domain. pem.getdomainlist This method is supported by POA starting from version 2.5. This method returns the list of all Domains, which have hostings added from Subscription specified. subscription_id int Subscription ID. This method returns the array of structures: domain_id int ID of Domain. domain_name string The name of Domain. domain_type string Domain type. The current set of the possible domain types are: domain_hosting_type string DOMAIN SUBDOMAIN Domain hosting type. Current set of possible Domain hosting types are: REGULAR SLAVE NONE registrar_status int Numeric registrar status. There are the following possible values: 0 - Undefined. 10 - Ordering in progress. 15 - Transferring. 20 - Failed. 30 - Ready (Domain having this registrar status can be used for services provisioning). 50 - Closing (Domain having this registrar status can be used for services provisioning). 60 - Closed. 70 - Gone. is_locked boolean Whether Domain is disabled.

Public API Reference 79 dns_management_allo wed boolean If a Customer is allowed to manage Domain's DNS records. pem.getdomainsubscription This method is supported by POA starting from version 2.4. This method returns an ID of Subscription, under which DNS Hosting for Domain is added. domain_id and domain_name parameters are optional to each other. It means that you can specify either domain_id parameter or domain_name one in your request. This method has the following input parameters: [domain_id] int ID of Domain. [domain_name] string Name of Domain. This method has the following output parameters: subscription_id int ID of Subscription. If Domain has no DNS Hosting added, 0 is returned. pem.getaccountdomains This method is supported by POA starting from version 5.0 This method returns a list of Domains of the specified Account. account_id int Account ID

80 Parallels Operations Automation 5.0 Parallels The method returns an array of the following structures: domain_id int Domain ID owner_id int Account ID name string Name of Domain Note: This method can also be called under Reseller permissions. pem.getnameservers This method is supported by POA starting from version 2.3. This method returns hostnames of DNS Servers, which host DNS Zone of the Domain or Domain Request specified. There are the following use cases of method: To retrieve DNS Servers of existing Domain, the domain_name parameter should be passed to the method. To retrieve DNS Servers of Domain Request both the domain_name and subscription_id parameters should be passed to the method. domain_name string Name of the Domain or Domain Request to return DNS Servers for. [subscription_id] int ID of Subscription. This parameter is optional. It is used for Domain Request's DNS Servers retrieving only. The method has the following output parameters: N/A array (string) Contains hostnames of DNS Servers corresponding the Domain or Domain Request.

Public API Reference 81 See also: pem.getdomainnameservers (on page 81) Note: This method can also be called under Reseller permissions. pem.getdomainnameservers This method is supported by POA starting from version 5.0 This method returns hostnames and IP Addresses of DNS Servers, which host DNS Zone of the Domain or Domain Request specified. There are the following use cases of method: To retrieve DNS Servers of existing Domain, the domain_name parameter should be passed to the method. To retrieve DNS Servers of Domain Request both the domain_name and subscription_id parameters should be passed to the method. domain_name string Name of the Domain or Domain Request to return DNS Servers for. [subscription_id] int ID of Subscription. This parameter is optional. It is used for Domain Request's DNS Servers retrieving only.

82 Parallels Operations Automation 5.0 Parallels The method returns an array of the following structures: ns string Hostname of DNS Server. ip_address string IP Address of DNS Server. Note: This method can also be called under Reseller permissions. pem.getrequirednameservers (internal) This method is supported by POA starting from version 2.8. If Domain is transferred from one POA Account to another one, it uses DNS Servers according to Domain Subscription (it contains DNS Hosting) of the source Account. This method returns DNS Servers, which should serve the Domain according to Domain Subscription of target Account. domain_name string Name of the Domain to return DNS Servers for. The method returns an array of the following structures: ns string Hostname of DNS Server. ip_address string IP Address of DNS Server. pem.importcertificate This method is supported by POA starting from version 2.3. This method allows import SSL certificate on a specific site. domain_id int The ID of Domain to add a Certificate to cert string Certificate sent in raw data form priv_key string Certificate s private key in raw data ca_cert string CA certificate

Public API Reference 83 The ca_cert parameter and the pair of parameters of cert, priv_key are optional each to other. They can be transmitted both or any one of these as well. Method has no output values. pem.removednshosting This method is supported by POA starting from version 2.6.4 This method converts the internal DNS hosting for a Domain registered in POA to the external one. domain_id int ID of the Domain to remove DNS hosting from. The method has no output parameters. See also pem.adddnshosting (on page 65). Note: This method can also be called under Reseller permissions. pem.removedomain This method is supported by POA starting from version 2.3. This method removes the Domain specified. [domain_id] int ID of the Domain to remove. If specified the domain_name parameter is ignored. [domain_name] string Name of the Domain to remove. The method has no output parameters.

84 Parallels Operations Automation 5.0 Parallels pem.removedomainrequest This method is supported by POA starting from version 2.8. This method removes Domain Request. subscription_id int ID of Subscription. domain_name string Name of Domain Request to remove. The method has no output parameters. pem.removeptrrecord This method is supported by POA starting from version 2.6.5 This method removes a PTR record. record_id int The ID of PTR record to remove. The method has the following output parameters: N/A boolean Result of method invocation. The possible values are the following: See also pem.addptrrecord (on page 71). 1 - If PTR record is removed or PTR record does not exists. 0 - If PTR record can not be removed because it is used by some POA object (VPS or Hardware Node for example).

Public API Reference 85 pem.setdomainregistrarstatus This method is supported by POA starting from version 2.3. This method sets new registrar status for given Domain in POA. [domain_id] int ID of Domain, if specified the domain_name parameter is ignored domain_name string The name of Domain. registrar_status int This parameter indicates the new registrar domain status. It can take the following values: The method has no output parameters. 0 - Domain check result is undefined. 1 - Domain is not registered. 2 - Domain is registered. Note: This method can also be called under Reseller permissions. pem.syncnameservers (internal) This method is supported by POA starting from version 2.8 If Domain is transferred from one POA Account to another one, it uses DNS Servers according to Domain Subscription (it contains DNS Hosting) of the source Account. This method synchronizes DNS Servers for Domain specified, according to Subscription of target Account. domain_name string Name of Domain to synchronize DNS Servers for. The method has no output parameters.

86 Parallels Operations Automation 5.0 Parallels pem.unbindservicesfromdomain This method is supported by POA starting from version 2.8 This method removes hostings from Domain for Subscription specified. domain_id int ID of Domain for which hostings will be removed. subscription_id int ID of Subscription. The method has no output parameters. Webspace Management This functional group allows to manage Webspaces. pem.apache.updatelimits This method is supported by POA starting from version 2.9. This method updates the following Apache Website limits: Limit of simultaneous requests per Virtual Host Limit of maximum bandwidth allowed per website Limit of used CPU per website Limit of used memory per website Limit number of processes per website subscription_id int ID of existing Subscription, under which Apache Websites are provisioned. This method has no output parameters.

Public API Reference 87 pem.getftpuser This method is supported by POA starting from version 2.4. This method returns the login name for primary FTP user for FTP hosting associated with the specific subscription. subscription_id int ID of the subscription [webspace_id] int ID of the webspace served by the chosen FTP service [domain_name] string Name of the domain served by the chosen FTP service The [webspace_id] or [domain_name] parameters should be used when a subscription contains more than one webspace served by the FTP service in order to determine, which exactly service to use. These parameters are optional to each other, so only one of them can be used in a single request. If neither of them is specified, the method will act as if there is only one webspace in the subscription and will result in error if it's not so. Output is a structure with following content: username string The requested login name. pem.getsubscriptionwebspaces This method is supported by POA starting from version 2.8 This method returns the list of Webspaces with their properties for Subscription specified. subscription_id int ID of Subscription. The method returns the array of structures: webspace_id int ID of Webspace.

88 Parallels Operations Automation 5.0 Parallels host_id int ID of Host where Webspace is located. host_name string The fully qualified domain name of Host. path string Path to the Webspace on the Host's file system. pem.getwebspaceslist This method is supported in POA starting from version 2.4. This method returns the list of Apache Webspaces with their properties for specified Subscription. subscription_id int The ID of the Subscription The method returns the array of structures: host_ip int IP Address of the host the corresponding service is running on. webspace_id int ID of a Webspace. path string Path to Webspace on the host. domain_id int ID of the Domain, which is used as part of Instant Access URL for the Webspace. domain_name string Instant Access URL for the Webspace. See also: pem.getsubscriptionwebspaces (on page 87) pem.iis.getsubscriptionsharepointsites This method is supported by POA starting from version 2.8 This method returns the list of SharePoint Sites with their properties for Subscription specified. subscription_id int ID of Subscription.

Public API Reference 89 The method returns the array of structures: domain_id int ID of SharePoint Site's Domain. domain_name string The name of SharePoint Site's Domain. ip_address string IP Address of SharePoint Site. sharepoint_version string SharePoint version. There are the following possible values: 2.0 - SharePoint v.2.0 3.0 - SharePoint v.3.0 content_quota bigint Storage quota (in KB). content_usage bigint Current usage of storage quota (in KB). pem.iis.getsubscriptionwebsites This method is supported by POA starting from version 2.8 This method returns the list of IIS Websites with their properties for Subscription specified. subscription_id int ID of Subscription. The method returns the array of structures: webspace_id int ID of Webspace. domain_id int ID of Website's Domain. domain_name string The name of Website's Domain. ip_address string IP Address of Website. iis_version string IIS version. There are the following possible values: 6 - IIS v.6.0. 7 - IIS v.7.0.

90 Parallels Operations Automation 5.0 Parallels pem.iis.getwebspacefeaturesinfo This method is supported by POA starting from version 2.8 This method returns a list of IIS WebSpace Features and their properties. webspace_id int IIS WebSpace ID. The method returns the array of structures: feature_name string The name of Feature. There are the following possible Feature names: ASP ASP.NET Perl PHP SSI ISAPIRewrite ColdFusion enabled boolean This parameter defines state of Feature. There are the following possible values: 0 - Feature is disabled. 1 - Feature is enabled. [feature_mode] string Feature mode. This parameter is returned for the following Features: ASP.NET. There are the following possible Feature modes: v1.1 v2.0 Perl. There are the following possible Feature modes: CGI ISAPI PHP. There are the following possible Feature modes: ISAPI FastCGI

Public API Reference 91 pem.iis.getwebspacesinfo This method is supported by POA starting from version 2.8 This method returns the list of IIS Webspaces with their properties. webspace_id_list array of int The list of Webspaces' IDs. The method returns the array of structures: webspace_id int ID of Webspace. host_id int ID of Host where Webspace is located. host_name string The fully qualified domain name of Host. path string Path to the Webspace on the Host file system. disk_space_limit bigint Diskspace limit on the size of the Webspace. pem.iis.setwebspacefeaturesinfo This method is supported by POA starting from version 2.8 This method modifies the properties of IIS WebSpace Features. If Feature is not specified, its properties will stay intact. webspace_id int IIS WebSpace ID. features_list array of struct The list of Features to modify.

92 Parallels Operations Automation 5.0 Parallels feature_name string The name of Feature. There are the following possible Feature names: ASP ASP.NET Perl PHP SSI ISAPIRewrite ColdFusion enabled boolean This parameter defines state of Feature. There are the following use cases: 0 - Feature is disabled. 1 - Feature is enabled. [feature_mode] string Feature mode. This parameter is mandatory for the following Features: The method has no output parameters. ASP.NET. There are the following possible Feature modes: v1.1 v2.0 Perl. There are the following possible Feature modes: CGI ISAPI PHP. There are the following possible Feature modes: ISAPI FastCGI Note: This parameter is optional for the Perl Feature. If parameter is omitted, the ISAPI value is used.

Public API Reference 93 pem.iis.updatelimits This method is supported by POA starting from version 2.9. This method updates the following IIS Website limits: CPU consumption limit for exclusive application pools Memory limit for exclusive pool Default bandwidth limit Lower bandwidth boundary Upper bandwidth boundary subscription_id int ID of existing Subscription, under which IIS Websites are provisioned. This method has no output parameters. pem.iis.updatephpextensionslist This method is supported by POA starting from version 2.9. This method updates the information in POA about the installed PHP extensions for the specified IIS web server. Note: If the PHP extensions have been installed on the IIS web server manually (that is, bypassing POA), it is necessary to submit these new settings to POA. host_id int ID of host where IIS is installed [perform_synchronou sly] boolean This parameter defines whether to perform the operation in the synchronous mode. There are the following options: 0 (false) - Operation is performed in the asynchronous mode. In this case POA creates a task that performs the operation. 1 (true) - Operation is performed in the synchronous mode. If this parameter is omitted, the asynchronous mode is used. This method has no output parameters.

94 Parallels Operations Automation 5.0 Parallels pem.setftppassword This method is supported by POA starting from version 2.4. This method changes the password of the primary FTP user from FTP hosting associated with the specific subscription. subscription_id int ID of the subscription password string The password to set password_crypted boolean Whether the password is encrypted [webspace_id] int ID of the webspace served by the chosen FTP service [domain_name] string Name of the domain served by the chosen FTP service The [webspace_id] or [domain_name] parameters should be used when a subscription contains more than one webspace served by the FTP service in order to determine, which exactly service to use. These parameters are optional to each other, so only one of them can be used in a single request. If neither of them is specified, the method will act as if there is only one webspace in the subscription and will result in error if it's not so. This method has no output parameters. Note: IIS does not support the encrypted passwords. pem.apache.turnwebstatprocessingon This method is supported by POA starting from version 2.9 HOTFIX01. This method turns on the processing of web statistics by Web Statistics Processor Server for specified Apache Service. service_id int Apache Service ID.

Public API Reference 95 affect_existing_web spaces boolean Whether to enable the processing of web statistics for the existing Webspaces. There are the following options: 0 - The web statistics is processed for new Webspaces only. 1 - The web statistics is processed for all Webspaces. This method has no output parameters. pem.apache.turnwebstatprocessingoff This method is supported by POA starting from version 2.9 HOTFIX01. This method turns off the processing of web statistics by Web Statistics Processor Server for specified Apache Service. Note: The primary use of the method is to prepare POA for uninstalling Web Statistics Processor Server. service_id int Apache Service ID. This method has no output parameters. pem.proftpd.createcustomftpuser This method is supported by POA starting from version 2.9 HOTFIX01. This method creates a Custom FTP User for Apache Webspace. webspace_id int Webspace ID login_suffix string Login suffix of Custom FTP User. The login of Custom FTP User will be: <General FTP User Login>.login_suffix password string Password of Custom FTP User location struct It defines the entry point for Custom FTP User.

96 Parallels Operations Automation 5.0 Parallels location_base string It defines a base location. There are the following options: httpdocs - WebSite document root (/webspace/httpdocs). httpsdocs - SSL WebSite document root (/webspace/httpsdocs). cgi-bin - WebSite CGI directory (/webspace/cgi-bin). [path] string Path inside the base location. It is optional parameter. If the parameter is omitted, the root of the base location is used. This method has no output parameters. pem.proftpd.deletecustomftpuser This method is supported by POA starting from version 2.9 HOTFIX01. This method removes a Custom FTP User from the specified Webspace. webspace_id int Webspace ID login_suffix string Login suffix of Custom FTP User. The Custom FTP User with <General FTP User Login>.login_suffix login name will be removed. This method has no output parameters. pem.proftpd.getcustomftpuserslist This method is supported by POA starting from version 2.9 HOTFIX01. This method returns the list of the existing Custom FTP Users for the specified Webspace. webspace_id int Webspace ID The method returns the array of structures: webspace_id int Webspace ID

Public API Reference 97 login_suffix string Login suffix of Custom FTP User login string Login of Custom FTP User location struct It represents the entry point for Custom FTP User. location_base string It represents a base location. There are the following options: httpdocs - WebSite document root (/webspace/httpdocs). httpsdocs - SSL WebSite document root (/webspace/httpsdocs). cgi-bin - WebSite CGI directory (/webspace/cgi-bin). [path] string Path inside the base location ip_address string FTP Server IP Address port int FTP Server port Service Users Management This functional group allows to manage Service Users. pem.adduser This method is supported by POA starting from version 2.6.5 This method creates a Service User. subscription_id int The ID of Subscription. login string Service User's login. password string Service User's password. [check_password_qua lity] boolean Optional parameter. It defines whether to check the quality of password according to the password quality level defined in POA.

98 Parallels Operations Automation 5.0 Parallels [properties] array of struct Array of Service User's properties. Property is a pair of "name" and "value" parameters (see the Service User's Properties section (on page 102)). If the display_name property is omitted, the login parameter's value is used as default value for the display_name property. name string Property name. value string Property value. The method has the following output parameters: user_id int The ID of Service User created. pem.changeuserpassword This method is supported by POA starting from version 2.6.5 This method allows to set the new Service User's password. user_id int The ID of Service User. password string Service User's password. [check_password_qua lity] boolean Whether to check password quality. 0 (false) is used by default. The method has no output parameters. pem.disableuser This method is supported by POA starting from version 2.6.5 This method allows to disable the Service User specified. user_id int The ID of Service User. The method has no output parameters.

Public API Reference 99 pem.enableuser This method is supported by POA starting from version 2.6.5 This method allows to enable the Service User specified. user_id int The ID of Service User. The method has no output parameters. pem.getuserbylogin This method is supported by POA starting from version 2.6.5 This method allows to retrieve the ID of Service User by the Service User's login specified. login string Service User's login. The method has the following output parameters: user_id int The ID of Service User. pem.getuserinfo This method is supported by POA starting from version 2.6.5 This method allows to obtain the Service User's properties. user_id int The ID of Service User.

100 Parallels Operations Automation 5.0 Parallels The method has the following output parameters: user_id int The ID of Service User. subscription_id int The ID of Subscription which Service User belongs to. login string Service User's login. enabled boolean Whether Service User is enabled. status int Service User's status. Possible values are the following: properties array of struct 0 - Ready 1 - Updating 2 - Deleting name string Property name. value string Property value. Array of Service User's properties. Property is a pair of "name" and "value" parameters (see the Service User's Properties section (on page 102)). services array of string The list of services names which Service User belongs to. Possible values are the following: AD:<Active Directory Domain name> - Active Directory Exchange - MS Exchange FPSE - IIS FrontPage Server Extensions WSS - Windows SharePoint Services WSS-ADMIN - Windows SharePoint Services (Site Administrator role) FTP - IIS FTP WinFM - Windows FileManager pem.getusers This method is supported by POA starting from version 2.6.5 This method allows to obtain the list of Service Users with their properties for the Subscription specified. subscription_id int The ID of Subscription.

Public API Reference 101 The method returns the array of structures: user_id int The ID of Service User. display_name string The "Display Name" property of Service User. login string Service User's login. pem.modifyuser This method is supported by POA starting from version 2.6.5 This method allows to modify the Service User's properties. user_id int The ID of Service User. [login] string Service User's login. [properties] array of struct name string Property name. values string Property value. The method has no output parameters. pem.removeuser This method is supported by POA starting from version 2.6.5 This method removes the Service User specified. Array of Service User's properties. Property is a pair of "name" and "value" parameters (see the Service User's Properties section (on page 102)). user_id int The ID of Service User. The method has no output parameters.

102 Parallels Operations Automation 5.0 Parallels Service User's Properties Name city country Value max size: 256; can be any string value; max size: 128; can be any string value; country_abbr max size: 4; can be any string value; state street zip_code first_name last_name initials title po_box office phone fax ip_phone mobile pager email home_phone department company web_page notes max size: 128; can be any string value; max size: 128; can be any string value; max size: 12; can be any string value; max size: 1024; can be any string value; max size: 1024; can be any string value; max size: 6; can be any string value; max size: 256; can be any string value; max size: 256; can be any string value; max size: 1024; can be any string value; max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. This property's value is shown in the E-mail field in Service User's Contact Information menu. max size: 132; can be any string value with format: COUNTRY_CODE#AREA_CODE#PHONE_NUMBER#EXTENSION_NU MBER. max size: 256; can be any string value; max size: 256; can be any string value; max size: 4000; can be any string value; RESERVED. Do not use!

Public API Reference 103 description max size: 1024; can be any string value; display_name max size: 256; can be any string value; contact_emai l l_country_co de l_language_c ode l_variant This property's value is shown in the Secondary E-mail field in Service User's Contact Information menu. RESERVED. Do not use! RESERVED. Do not use! RESERVED. Do not use! IIS Management IIS Application Mappings Management This functional group allows to manage IIS Application Mappings. pem.iis.adddomainmapping This method is supported by POA starting from version 2.6.5 This method allows to create the mapping between the file name extension and the scripting engine for the specified domain. domain_id int The ID of domain. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine. enabled boolean Whether the mapping is enabled. properties struct

104 Parallels Operations Automation 5.0 Parallels verbs string Contains HTTP verbs, the list of comma separeted values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. The method has the following output parameters: mapping_id int The ID of created mapping. pem.iis.addsystemmapping This method is supported by POA starting from version 2.6.5 This method allows to create the system mapping between the file name extension and the scripting engine. System mapping is a system wide template and it can be used in pem.iis.applysystemmappingstohosts (on page 105) method call for example. [iis_ver] int IIS version. Parameter's value can be 6 or 7 for IIS 6.0 or IIS 7.0 correspondingly. If parameter is not set, value 6 is used by default. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine.

Public API Reference 105 properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. The method has the following output parameters: mapping_id int The ID of created mapping. pem.iis.applysystemmappingstohosts This method is supported by POA starting from version 2.6.5 This method allows to apply the system mappings to all domains at the specified hosts. All existing domains mappings will be destroyed and all system mappings will be applied. hosts array (int) Contains the array of host IDs. This method has no the output parameters.

106 Parallels Operations Automation 5.0 Parallels pem.iis.bulkadddomainmapping This method is supported by POA starting from version 2.6.5 This method allows to add the set of mappings between the file name extension and the scripting engine to specified domain at once. domain_id int The ID of domain. mappings array (struct) engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine. enabled boolean Whether the mapping is enabled. properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exis ts boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. This method has no the output parameters.

Public API Reference 107 pem.iis.deletesystemmapping This method is supported by POA starting from version 2.6.5 This method allows to remove system mapping. mapping_id int The ID of mapping. This method has no the output parameters. pem.iis.getdomainengines This method is supported by POA starting from version 2.6.5 This method allows to get the list of scripting engines associated with specified domain. domain_id int The ID of domain. This method returns array of structures with the following data: engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. customizable boolean Whether the customization of mappings is enabled. active boolean Whether the scripting engine is active. pem.iis.getdomainmapping This method is supported by POA starting from version 2.6.5 This method allows to get properties of domains mapping. mapping_id int The ID of mapping.

108 Parallels Operations Automation 5.0 Parallels The method has the following output parameters: engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine. enabled boolean Whether the mapping is enabled. properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. pem.iis.getdomainmappings This method is supported by POA starting from version 2.6.5 This method allows to get the list of mappings associated with domain for specified scripting engine. domain_id int The ID of domain. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI.

Public API Reference 109 This method returns array of structures with the following data: mapping_id int The ID of mapping. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine. enabled boolean Whether the mapping is enabled. properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. pem.iis.getsystemengines This method is supported by POA starting from version 2.6.5 This method allows to get the list of system scripting engines. [iis_ver] int IIS version. Parameter's value can be 6 or 7 for IIS 6.0 or IIS 7.0 correspondingly. If parameter is not set, value 6 is used by default.

110 Parallels Operations Automation 5.0 Parallels This method returns array of structures with the following data: engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. customizable boolean Whether the customization of mappings is enabled. pem.iis.getsystemmapping This method is supported by POA starting from version 2.6.5 This method allows to get the properties of the system mapping. mapping_id int The ID of mapping. The method has the following output parameters: engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine. properties struct

Public API Reference 111 verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. pem.iis.getsystemmappings This method is supported by POA starting from version 2.6.5 This method allows to get the list of system mappings for specified scripting engine. [iis_ver] int IIS version. Parameter's value can be 6 or 7 for IIS 6.0 or IIS 7.0 correspondingly. If parameter is not set, value 6 is used by default. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. This method returns array of structures with the following data: mapping_id int The ID of mapping. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. extension string The file name extension, that will be associated with the scripting engine.

112 Parallels Operations Automation 5.0 Parallels properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. pem.iis.resetdomainmapping This method is supported by POA starting from version 2.6.5 This method allows to reset specified domains mapping. If domains mapping was created on base of system mapping, such domains mapping properties will be defaulted to properties of appropriate system mapping. In other case the domains mapping will be removed. mapping_id int The ID of mapping. This method has no the output parameters.

Public API Reference 113 pem.iis.setdomainmappingenabled This method is supported by POA starting from version 2.6.5 This method allows to change the state of specified domains mapping. mapping_id int The ID of mapping. enabled boolean Whether the mapping is enabled. This method has no the output parameters. pem.iis.updatedomainmapping This method is supported by POA starting from version 2.6.5 This method allows to change the properties of specified domains mapping. mapping_id int The ID of mapping. properties struct

114 Parallels Operations Automation 5.0 Parallels verbs string Contains HTTP verbs, the list of comma separeted values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. This method has no the output parameters. pem.iis.updatesystemengine This method is supported by POA starting from version 2.6.5 This method allows to change the properties of specified system scripting engine. [iis_ver] int IIS version. Parameter's value can be 6 or 7 for IIS 6.0 or IIS 7.0 correspondingly. If parameter is not set, value 6 is used by default. engine string The name of the scripting engine, currently one of: ASP, ASP.NET1.1, ASP.NET2, Perl, PHP, SSI. customizable boolean Whether the customization of mappings is enabled. This method has no the output parameters.

Public API Reference 115 pem.iis.updatesystemmapping This method is supported by POA starting from version 2.6.5 This method allows to change the properties of specified system mapping. mapping_id int The ID of mapping. properties struct verbs string Contains HTTP verbs, the list of comma separated values: GET, POST, HEAD, TRACE and/or DEBUG. script_engine boolean Whether the Script Engine option is enabled. It indicates that script can run in a directory without Execute Permission. This setting is intended primarily for script-based applications, such as ASP and IDC, that are mapped to an interpreter. verify_if_exists boolean Whether the Verify That File Exists option is enabled. It instructs the Web server to verify the existence of the requested script file and to ensure that the requesting user has access permission for that script file. If the script does not exist or the user does not have permission, the appropriate warning message is returned to the browser and the script engine is not invoked. This option can be useful for scripts mapped to non-cgi executables, such as the Perl interpreter, that do not send a CGI response if the script is not accessible. Since the script must be opened twice, once by the server and once by the script engine, enabling this option can impact performance. This method has no the output parameters.

116 Parallels Operations Automation 5.0 Parallels IIS Website Users Management This functional group allows to manage Authorized Web Access for IIS Websites and Service Users. pem.iis.grantauthorizedwebaccess This method is supported by POA starting from version 2.9 This method grants Authorized Web Access to specified Domains to a Service User. user_id int Service User ID. domain_ids array of int The list of Domain IDs. The method has no output parameters. pem.iis.revokeauthorizedwebaccess This method is supported by POA starting from version 2.9 This method revokes Authorized Web Access to specified Domains from a Service User. user_id int Service User ID. domain_ids array of int The list of Domain IDs. The method has no output parameters. pem.iis.getauthorizedwebaccessdomainsforuser This method is supported by POA starting from version 2.9 This method returns the list of Domains to which a Service User has Authorized Web Access. user_id int Service User ID.

Public API Reference 117 The method returns the array of structures: domain_id int Domain ID. pem.iis.getauthorizedwebaccessusersfordomain This method is supported by POA starting from version 2.9 This method returns the list of Service Users which have Authorized Web Access to a specified Domain. domain_id int Domain ID. The method returns the array of structures: user_id int Service User ID. pem.iis.getftpaccessstatusforuser This method is supported by POA starting from version 2.9 HOTFIX01. This method returns a status of FTP Access to IIS Website (Domain with IIS Web Hosting) for Service User. user_id int Service User ID The method has the following output parameters: domain_id int ID of Domain user_id int Service User ID ip_address string FTP Server IP Address port int FTP Server port

118 Parallels Operations Automation 5.0 Parallels status string The current status of FTP Access to IIS Website for Service User. There are the following options: granting - Granting ready - Ready updating - Updating revoking - Revoking pem.iis.getftpaccessstatusesfordomain This method is supported by POA starting from version 2.9 HOTFIX01. This method returns the list of Service Users which have FTP Access to IIS Website on the specified Domain. domain_id int Domain ID The method returns the array of structures: domain_id int Domain ID user_id int Service User ID ip_address string FTP Server IP Address port int FTP Server port status string The current status of FTP Access to IIS Website for Service User. There are the following options: granting - Granting ready - Ready updating - Updating revoking - Revoking

Public API Reference 119 pem.iis.grantftpaccesstowebsite This method is supported by POA starting from version 2.9 HOTFIX01. This method grants FTP access to the specified IIS Website (Domain with IIS Web Hosting) to a Service User. Note: The FTP access can be granted to a Service User to single IIS Website only. user_id int Service User ID domain_id int ID of Domain This method has no output parameters. pem.iis.revokeftpaccessfromwebsite This method is supported by POA starting from version 2.9 HOTFIX01. This method revokes FTP access to IIS Website from a Service User. user_id int Service User ID This method has no output parameters.

120 Parallels Operations Automation 5.0 Parallels SharePoint Management This functional group allows to manage SharePoint Sites. pem.sharepoint.createsharepointsite This method is supported by POA starting from version 2.8 hotfix02 This method creates SharePoint Site, which is runned in Exclusive Web Application. domain_id int ID of Domain on which SharePoint Site is installed. subscription_id int ID of Subscription. sharepoint_admin_us er_id [notification_email ] [application_pool_t ype] int string string ID of SharePoint Site Administrator Service User. E-mail address where notification from SharePoint Site(s) is sent. This e-mail address is common for all SharePoint Sites to which Service User is assigned or will be assigned. This parameter is optional. There are the following major use-cases: At the first assigning operation, the notification_email parameter is specified, and this parameter is not specified for the rest assigning operations. At the first assigning operation, the notification_email parameter is specified, and this parameter is specified for the certain assigning operation to redefine the e-mail address. It defines the Application Pool type for SharePoint Site. There are the following options: shared - Shared Application Pool. exclusive - Exclusive Application Pool. This parameter is optional. If the parameter is not specified, the shared Application Pool type is used.

Public API Reference 121 [ip_address] boolean It defines the type of the FrontNet IP Address for SharePoint Site. There are the following options: 0 - In this case a Shared FrontNet IP Address is used. This is default value. 1 - In this case the Exclusive FrontNet IP Address is used from the appropriate IP Pool, which is assigned to the SharePoint host. language_code int Locale ID of Site Template (refer to http://www.microsoft.com/globaldev/reference/lcidall.mspx to obtain detailed information about Locale ID). The value of this parameter should be obtained from the pem.sharepoint.getavailablesharepointsitetemplat es (on page 124) method. [sharepoint_site_te mplate] string SharePoint Site Template. This is an optional parameter. There are the following options: Parameter is not specified. In this case a user selects the SharePoint Site Template at first logon to the Site. Parameter is specified. In this case the specified SharePoint Site Template is used. The value of this parameter should be obtained from pem.sharepoint.getavailablesharepointsitetem plates (on page 124) method. [content_quota] bigint It defines the content size limit of a single SharePoint Site (in Kilobytes). The minimum and maximum values are 1 KB and 10 GB respectively. This parameter is optional. If the parameter is not specified, the 10 GB value is used. [existing_users_rol e] string It defines the Role, which is assigned to all Service Users having any SharePoint Sites attached. There are the following options: none - Do not grant any Role. reader - Reader Role. contributor - Contributor Role. webdesigner - Web Designer Role. administrator - Site Administrator Role. This is an optional parameter. If it is not specified, the none Role is used. [resources] struct It contains a combination of Resource Types, which is used to point out the service targeted for provisioning SharePoint Site. It is an optional parameter. If it is not specified, a combination of Resource Types is automatically found by POA. If POA detects multiple combinations of Resource Types, which are required for SharePoint Site provisioning, an error is thrown.

122 Parallels Operations Automation 5.0 Parallels [sharepoint_site s_resource] [traffic_resourc e] [diskspace_resou rce] int int int ID of Resource Type, which is created on the basis of the SharePoint Sites Resource Class. For example, if a Subscription contains several such Resource Types, the ID of the required Resource Type should be specified. ID of Resource Type, which is created on the basis of the Traffic Resource Class. It should be specified, for example, if a separate Resource Type is used to calculate traffic for SharePoint Sites. ID of Resource Type, which is created on the basis of the Diskspace Resource Class. It should be specified, for example, if a separate Resource Type is used to calculate diskspace for SharePoint Sites. The method has no output parameters. See also: pem.sharepoint.createsharepointsiteinsharedapplication (on page 122) pem.sharepoint.createsharepointsiteinsharedapplication This method is supported by POA starting from version 5.0 This method creates SharePoint Site, which is runned in Shared Web Application. domain_id int ID of Domain on which SharePoint Site is installed. subscription_id int ID of Subscription. sharepoint_admin_us er_id [notification_email ] int string ID of SharePoint Site Administrator Service User. E-mail address where notification from SharePoint Site(s) is sent. This e-mail address is common for all SharePoint Sites to which Service User is assigned or will be assigned. This parameter is optional. There are the following major use-cases: At the first assigning operation, the notification_email parameter is specified, and this parameter is not specified for the rest assigning operations. At the first assigning operation, the notification_email parameter is specified, and this parameter is specified for the certain assigning operation to redefine the e-mail address.

Public API Reference 123 language_code int Locale ID of Site Template (refer to http://www.microsoft.com/globaldev/reference/lcidall.mspx to obtain detailed information about Locale ID). The value of this parameter should be obtained from the pem.sharepoint.getavailablesharepointsitetemplat es (on page 124) method. [sharepoint_site_te mplate] string SharePoint Site Template. This is an optional parameter. There are the following options: Parameter is not specified. In this case a user selects the SharePoint Site Template at first logon to the Site. Parameter is specified. In this case the specified SharePoint Site Template is used. The value of this parameter should be obtained from pem.sharepoint.getavailablesharepointsitetem plates (on page 124) method. [content_quota] bigint It defines the content size limit of a single SharePoint Site (in Kilobytes). The minimum and maximum values are 1 KB and 10 GB respectively. This parameter is optional. If the parameter is not specified, the 10 GB value is used. [existing_users_rol e] string It defines the Role, which is assigned to all Service Users having any SharePoint Sites attached. There are the following options: none - Do not grant any Role. reader - Reader Role. contributor - Contributor Role. webdesigner - Web Designer Role. administrator - Site Administrator Role. This is an optional parameter. If it is not specified, the none Role is used. [resources] struct It contains a combination of Resource Types, which is used to point out the service targeted for provisioning SharePoint Site. It is an optional parameter. If it is not specified, a combination of Resource Types is automatically found by POA. If POA detects multiple combinations of Resource Types, which are required for SharePoint Site provisioning, an error is thrown.

124 Parallels Operations Automation 5.0 Parallels [sharepoint_site s_resource] [traffic_resourc e] [diskspace_resou rce] int int int ID of Resource Type, which is created on the basis of the SharePoint Sites Resource Class. For example, if a Subscription contains several such Resource Types, the ID of the required Resource Type should be specified. ID of Resource Type, which is created on the basis of the Traffic Resource Class. It should be specified, for example, if a separate Resource Type is used to calculate traffic for SharePoint Sites. ID of Resource Type, which is created on the basis of the Diskspace Resource Class. It should be specified, for example, if a separate Resource Type is used to calculate diskspace for SharePoint Sites. The method has no output parameters. See also: pem.sharepoint.createsharepointsite (on page 120) pem.sharepoint.deletesharepointsite This method is supported by POA starting from version 2.8 hotfix02 This method removes SharePoint Site from Domain specified. domain_id int ID of Domain. The method has no output parameters. pem.sharepoint.getavailablesharepointsitetemplates This method is supported by POA starting from version 2.8 hotfix02 This method returns the list of all available Site Templates with their languages. It prepares information about Site Templates, which is used in the pem.sharepoint.createsharepointsite (on page 120) method. subscription_id int ID of Subscription.

Public API Reference 125 [resources] struct It contains a combination of Resource Types, which is used to point out the service targeted for provisioning SharePoint Site. It is an optional parameter. If it is not specified, a combination of Resource Types is automatically found by POA. If POA detects multiple combinations of Resource Types, which are required for SharePoint Site provisioning, an error is thrown. [sharepoint_site s_resource] [traffic_resourc e] [diskspace_resou rce] int int int ID of Resource Type, which is created on the basis of the SharePoint Sites Resource Class. For example, if a Subscription contains several such Resource Types, the ID of the required Resource Type should be specified. ID of Resource Type, which is created on the basis of the Traffic Resource Class. It should be specified, if a separate Resource Type is used to calculate traffic for SharePoint Sites. ID of Resource Type, which is created on the basis of the Diskspace Resource Class. It should be specified, if a separate Resource Type is used to calculate diskspace for SharePoint Sites. The method returns the array of structures: sharepoint_site_tem plate string Name of Site Template. language_code int Locale ID of Site Template (refer to http://www.microsoft.com/globaldev/reference/lcidall.mspx to obtain detailed information about Locale ID).

126 Parallels Operations Automation 5.0 Parallels This table represents a mapping between the sharepoint_site_template parameter value and the name of Site Template in UI: Parameter Value WSS 2.0 STS_0 STS_1 STS_2 MPS_0 MPS_1 MPS_2 MPS_3 MPS_4 Site Template Name in UI Team Site Blank Site Document Workspace Basic Meeting Workspace Blank Meeting Workspace Decision Meeting Workspace Social Meeting Workspace Multipage Meeting Workspace WSS 3.0 STS_1 STS_2 MPS_0 MPS_1 MPS_2 MPS_3 MPS_4 BLOG_0 WIKI_0 Blank Site Document Workspace Basic Meeting Workspace Blank Meeting Workspace Decision Meeting Workspace Social Meeting Workspace Multipage Meeting Workspace Blog Site Wiki Site

Public API Reference 127 pem.sharepoint.addsharepointuser This method is supported by POA starting from version 2.8 hotfix02 This method adds a Service User to all SharePoint Sites available in the Subscription. user_id int ID of Service User. subscription_id int ID of Subscription. [notification_email ] string E-mail address where notification from SharePoint Site(s) is sent. This e-mail address is common for all SharePoint Sites to which Service User is assigned or will be assigned. This parameter is optional. [role] string It defines the Role, which is assigned to the Service User. There are the following options: The method has no output parameters. none - Do not grant any Role. reader - Reader Role. contributor - Contributor Role. webdesigner - Web Designer Role. administrator - Site Administrator Role. This is an optional parameter. If it is not specified, the none Role is used. pem.sharepoint.removesharepointuser This method is supported by POA starting from version 2.8 hotfix02 This method removes a Service User from all SharePoint Sites available in the Subscription. user_id int ID of Service User. subscription_id int ID of Subscription. The method has no output parameters.

128 Parallels Operations Automation 5.0 Parallels Exchange Management This functional group allows to manage Exchange entities (Mailbox, Public Folder, Distribution List, and Contact). Exchange Mailbox Management pem.exchange.addmailbox This method is supported by POA starting from version 2.6.5 This method allows to create Exchange Mailbox. There are the following use-cases of the method: Create a Mailbox and assign the Mailbox to the existing Service User. In this case the user_id parameter should be specified. The new_user parameter should not be specified. Create a Service User, create a Mailbox, and then assign the Mailbox to the created Service User. In this case the new_user parameter should be specified. The user_id parameter should not be specified. [user_id] int ID of the existing Service User to which the Mailbox is assigned. Note: The user_id and new_user optional parameters are mutually exclusive. [new_user] struct It defines properties of new Service User. Note: The user_id and new_user optional parameters are mutually exclusive.

Public API Reference 129 subscription_id int The ID of Subscription. login string Login of Service User. Note: If Service User with the specified login already exists, POA will try to assign the Mailbox to the existing Service User. [password] string Password of Service User. If the parameter is not specified, a password is generated by POA. [display_name] string Display Name of Service User. If the parameter is not specified, a value of the login parameter is used as Display Name. alias string It defines the Mailbox alias. primary_email_address string It defines the primary e-mail address of the Mailbox. This address appears in the "From:" and "Reply-To:" fields of e-mail messages sent from the Mailbox. owa boolean Whether the Outlook Web Access (OWA) support is enabled. mapi boolean Whether the access over Outlook support is enabled. active_sync boolean Whether the Active Sync support is enabled. imap4 boolean Whether access to Mailbox over IMAP4 support is enabled. pop3 boolean Whether access to Mailbox over POP3 support is enabled. size_limit int It defines the maximum storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending and receiving more messages. [alt_email_addresses] array of string It defines the list of additional e-mail addresses of the Mailbox. These e-mail addresses should be based on domains, which belong to the Customer's Subscription. [skip_initialization] boolean Whether to skip the Mailbox initialization (Initialization is the setting of locale and creating the folders hierarchy for Mailbox). If parameter is omitted, the 0 value is used. [mark_migrated] boolean Whether to mark the Mailbox as migrated from external system. If this parameter is specified and its value is 1, the Mailbox is marked as migrated. The method has the following output parameters: mailbox_id int ID of created Mailbox.

130 Parallels Operations Automation 5.0 Parallels Note: This method can also be called under Reseller permissions. pem.exchange.disableforwarding This method is supported by POA starting from version 2.6.5 This method disables the e-mail forwarding support for the Mailbox. mailbox_id int ID of Mailbox. The method has no output parameters. Note: This method can also be called under Reseller permissions. Note: This method returns success result code, if method is applied to mailbox with forwarding disabled. pem.exchange.enableforwarding This method is supported by POA starting from version 2.6.5 This method enables the e-mail forwarding support for the Mailbox. mailbox_id int ID of Mailbox. forwarding_email_ad dress string Defines the e-mail address to forward to. store_messages_copy boolean Whether to store the forwarded messages in the Mailbox.

Public API Reference 131 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getemailaddresses This method is supported by POA starting from version 2.6.5 This method returns the list of assigned to Mailbox e-mail addresses. mailbox_id int ID of Mailbox. The method has the following output parameters: primary_email_addre ss string The name of primary e-mail address assigned to Mailbox. alt_email_addresses array of string The list of additional e-mail addresses assigned to Mailbox. Note: This method can also be called under Reseller permissions. pem.exchange.getmailboxbyemailaddress This method is supported by POA starting from version 2.6.5 This method returns the ID of Mailbox by the e-mail address specified. email_address string The e-mail address. The method has the following output parameters: mailbox_id int The ID of Mailbox. Note: This method can also be called under Reseller permissions.

132 Parallels Operations Automation 5.0 Parallels pem.exchange.getmailboxes This method is supported by POA starting from version 2.6.5 This method allows to get the list of all Mailboxes with their properties for the Subscription specified. subscription_id int The ID of Subscription. The method returns the array of structures: mailbox_id int Mailbox ID email_address string Primary e-mail address of the Mailbox size int Storage size (in Kilobytes) occupied by the mailbox contents user_id int The ID of Service User which corresponds to the Mailbox display_name string The "Display Name" property of Mailbox login string The login to access the Mailbox alias string Alias of Mailbox Note: This method can also be called under Reseller permissions. pem.exchange.getmailboxinfo This method is supported by POA starting from version 2.6.5 This method returns properties of Mailbox. mailbox_id int The ID of Mailbox. The method has the following output parameters: mailbox_id int The ID of Mailbox. user_id int The ID of Service User which corresponds to the Mailbox.

Public API Reference 133 login string The login to access the Mailbox. display_name string The "Display Name" property of Mailbox. alias string The alias of Mailbox. owa boolean Whether the Outlook Web Access (OWA) support is enabled. mapi boolean Whether the access over Outlook support is enabled. active_sync boolean Whether the Active Sync support is enabled. imap4 boolean Whether an access to Mailbox over IMAP4 support is enabled. pop3 boolean Whether an access to Mailbox over POP3 support is enabled. size int Storage size (in Kilobytes) occupied by the mailbox contents. warning_limit int Storage size (in Kilobytes) the mailbox can occupy before a warning message is sent to the mailbox owner. prohibit_send_limit int Storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending more messages. size_limit int Maximum storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending and receiving more messages. incoming_item_max_s ize outgoing_item_max_s ize recipient_list_max_ size int int int Maximum size of message (in Kilobytes) that can be received to the mailbox. Maximum size of message (in Kilobytes) that can be sent from the mailbox. Maximum number of recipients the mailbox owner can send a message to. message_retention int The period indicating how long the deleted items should be kept (days). show_in_address_boo k boolean Whether the "Show in address book" Mailbox property is enabled. If the property is disabled, the Mailbox will not be visible in the address books or search queries. status int Mailbox status. The list of possible values is the following: 0 - Ready. 1 - Creating. 2 - Deleting. 3 - Updating.

134 Parallels Operations Automation 5.0 Parallels primary_email_addre ss string Primary e-mail address of Mailbox. [pop3_server] string POP3 server DNS name of Mailbox. POP3 server DNS name is returned if POP3 is enabled for Mailbox. [imap_server] string IMAP server DNS name of Mailbox. IMAP server DNS name is returned if IMAP is enabled for Mailbox. [smtp_server] string SMTP server DNS name of Mailbox. SMTP server DNS name is returned if POP3 or IMAP is enabled for Mailbox. [exchange_home_serv er] [exchange_proxy_ser ver] string string Mail-store server NetBIOS name of Mailbox. Mailstore server NetBIOS name is returned if the Outlook access is enabled for Mailbox. Front-end (CAS) server DNS name of Mailbox. Front-end (CAS) server DNS name is returned if the Outlook access is enabled for Mailbox. [owa_url] string OWA URL of Mailbox. OWA URL is returned if OWA is enabled for Mailbox. windows_domain string Mailbox Windows Domain DNS name. exchange_version int Exchange server version. Possible values are the following: 2003 - MS Exchange 2003. 2007 - MS Exchange 2007. 2010 - MS Exchange 2010. store_display_name string Mailbox Store Display Name in the <host name>/<store name> format. [mailbox_template] string The name of the Mailbox Template. This parameter is returned, if a Mailbox was created on the basis of a certain Mailbox Template. Note: This method can also be called under Reseller permissions. pem.exchange.getmailboxstores This method is supported by POA starting from version 2.8 This method returns the list of Exchange Mailbox Stores with their properties. The method has no the input parameters. The method returns the array of structures: store_id int Store ID.

Public API Reference 135 name string Store Name. host_name string Name of host on which Store is located. is_ready boolean Whether the Store is Ready to Provide. reserved_size bigint Space allocated for mailboxes provisioned to this store (in Kilobytes). store_size bigint Maximum space that can be allocated for mailboxes in this store (in Kilobytes). used_size bigint Space occupied by contents of mailboxes provisioned to this store (in Kilobytes). sync_status int Status of Store. Possible values are the following: 0 - Ready. 1 - Creating. 2 - Deleting. 4 - Failed. entities_count bigint Number of mailboxes provisioned to this store. windows_domain string Windows Domain DNS name in which Store's Exchange server is participated. exchange_version int Exchange server version. Possible values are the following: [attributes] array of string 2003 - MS Exchange 2003. 2007 - MS Exchange 2007. 2010 - MS Exchange 2010. List of Store's Provisioning Attributes. pem.exchange.getusermailbox This method is supported by POA starting from version 2.6.5 This method returns the ID of Mailbox by the ID of Service User specified. user_id int The ID of Service User. The method has the following output parameters: mailbox_id int The ID of Mailbox.

136 Parallels Operations Automation 5.0 Parallels Note: This method can also be called under Reseller permissions. pem.exchange.modifymailbox This method is supported by POA starting from version 2.6.5 This method modifies the Mailbox properties. mailbox_id int ID of Mailbox. [alias] string Defines the Mailbox alias. [owa] boolean Whether the Outlook Web Access (OWA) support is enabled. [mapi] boolean Whether the access over Outlook support is enabled. [active_sync] boolean Whether the Active Sync support is enabled. [imap4] boolean Whether access to Mailbox over IMAP4 support is enabled. [pop3] boolean Whether access to Mailbox over POP3 support is enabled. [warning_limit] int Defines the storage size (in Kilobytes) the mailbox can occupy before a warning message is sent to the mailbox owner. [prohibit_send_limi t] int Defines the storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending more messages. [size_limit] int Defines the maximum storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending and receiving more messages. [incoming_item_max_ size] [outgoing_item_max_ size] [recipient_list_max _size] int int int Defines the maximum size of message (in Kilobytes) that can be received to the mailbox. Defines the maximum size of message (in Kilobytes) that can be sent from the mailbox. Defines the maximum number of recipients the mailbox owner can send a message to. [message_retention] int Defines how long to keep deleted items for (days). [show_in_address_bo ok] boolean Whether "Show in address book" Mailbox property is enabled. The Mailbox will be not visible in address books or search queries if disabled.

Public API Reference 137 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.movemailboxes This method is supported by POA starting from version 2.8 This method allows to move Mailboxes between Mail Stores. It returns a list of Mailboxes, which have not been moved, where error_code describes the reason. mailboxes array of int The list of Mailboxes' IDs. store int Destination Store ID. The method returns the array of structures: mailbox_id int The ID of Mailbox. error_code int The reason, why Mailbox cannot be moved. The following values are possible: 1 - Mailbox is deleting now. 2 - Mailbox and target Store belong to different Active Directory domains. 3 - Mailbox and target Store belong to Exchange servers with different versions. 4 - The source Store of Mailbox is failed. 5 - There is not enough free space on the destination Store. 6 - Mailbox is absent, possible it was removed already.

138 Parallels Operations Automation 5.0 Parallels pem.exchange.removemailbox This method is supported by POA starting from version 2.6.5 This method removes the Mailbox specified. mailbox_id int ID of Mailbox. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.addblackberry This method is supported by POA starting from version 2.8 hotfix02 This method adds BlackBerry account to the Mailbox specified. mailbox_id int ID of the Mailbox. [pin] string PIN of BlackBerry device. This account can be activated for device with this PIN only. activation_password string Activation password for BlackBerry device. activation_expires_ in_hrs int How long (in hours) activation password is actual. The maximum value is 720. owner_info string Miscellaneous information about the BlackBerry device owner, for example, a customer's name. send_activation_inf o boolean It defines, whether to send BlackBerry account activation URL and password to the Mailbox. There are the following options: 0 - Activation information will not be sent. 1 - Activation information will be sent. The method has the following output parameters: blackberry_account_ id int ID of BlackBerry account created.

Public API Reference 139 Note: This method can also be called under Reseller permissions. pem.exchange.addgoodlink This method is supported by POA starting from version 2.8 hotfix02 This method adds Good account to the Mailbox specified. mailbox_id int ID of the Mailbox. The method has the following output parameters: goodlink_account_id int ID of Good account created. Note: This method can also be called under Reseller permissions. pem.exchange.addmailboxwithtemplate This method is supported by POA starting from version 2.9 This method allows to create Exchange Mailbox on the basis of the specified Mailbox Template. There are the following use-cases of the method: Create a Mailbox and assign the Mailbox to the existing Service User. In this case the user_id parameter should be specified. The new_user parameter should not be specified. Create a Service User, create a Mailbox, and then assign the Mailbox to the created Service User. In this case the new_user parameter should be specified. The user_id parameter should not be specified. [user_id] int ID of the existing Service User to which the Mailbox is assigned. Note: The user_id and new_user optional parameters are mutually exclusive.

140 Parallels Operations Automation 5.0 Parallels [new_user] struct It defines properties of new Service User. Note: The user_id and new_user optional parameters are mutually exclusive. subscription_id int The ID of Subscription. login string Login of Service User. Note: If Service User with the specified login already exists, POA will try to assign the Mailbox to the existing Service User. [password] string Password of Service User. If the parameter is not specified, a password is generated by POA. [display_name] string Display Name of Service User. If the parameter is not specified, a value of the login parameter is used as Display Name. mailbox_template string The name of the Mailbox Template. alias string It defines the alias of the Mailbox. primary_email_addre ss [alt_email_addresse s] [skip_initializatio n] string array of string boolean It defines the primary e-mail address of the Mailbox. This address appears in the "From:" and "Reply-To:" fields of e-mail messages sent from the Mailbox. It defines the list of additional e-mail addresses of the Mailbox. These e-mail addresses should be based on domains, which belong to the Customer's Subscription. Whether to skip the Mailbox initialization (Initialization means setting up the locale and creating the folders hierarchy for a Mailbox). If the parameter is omitted, the 0 value is used. The method has the following output parameters: mailbox_id int Mailbox ID. Note: This method can also be called under Reseller permissions. pem.exchange.changemailboxtemplate This method is supported by POA starting from version 2.9 This method changes a Mailbox Template of the specified Mailbox. mailbox_id int Mailbox ID.

Public API Reference 141 mailbox_template string The name of the Mailbox Template. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getmailboxtemplates This method is supported by POA starting from version 2.9 This method returns the list of the Mailbox Templates for the specified Service User. These Mailbox Templates can be used in the following way: Creating a Mailbox on the basis of a certain Mailbox Template. Changing the Mailbox Template for the existing Mailbox. user_id int Service User ID. The method has the following output parameters: mailbox_templates array of string The names of the Mailbox Templates. Note: This method can also be called under Reseller permissions. pem.exchange.forcemailboxtemplatesusing This method is supported by POA starting from version 2.9 This method shows the way on how a Mailbox should be created for the specified Service User. user_id int Service User ID.

142 Parallels Operations Automation 5.0 Parallels The method has the following output parameters: result boolean It defines the way on how a Mailbox should be created for the specified Service User. There are the following options: 0 - The pem.exchange.addmailbox (on page 128) method should be used for creating a Mailbox. 1 - The pem.exchange.addmailboxwithtemplate (on page 139) method should be used for creating a Mailbox. Note: This method can also be called under Reseller permissions. pem.exchange.getoutlooklicense This method is supported by POA starting from version 2.9 This method returns the information about the Vendor's Outlook license for the specified mailbox. mailbox_id int Mailbox ID The method has the following output parameters: [license] struct Information about the Vendor's Outlook license. Note: This parameter is returned when Vendor's Outlook license is enabled for Mailbox. Otherwise, the license parameter is not returned. outlook_download _url string Outlook download URL serial_number string Outlook Serial Number Note: This method can also be called under Reseller permissions.

Public API Reference 143 pem.exchange.disableoutlooklicense This method is supported by POA starting from version 2.9 This method makes the Vendor's Outlook license disabled for the specified Mailbox. mailbox_id int Mailbox ID The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.enableoutlooklicense This method is supported by POA starting from version 2.9 This method makes the Vendor's Outlook license enabled for the specified Mailbox. mailbox_id int Mailbox ID The method has no output parameters. Note: This method can also be called under Reseller permissions. Exchange Distribution List Management pem.exchange.adddistributionlist This method is supported by POA starting from version 2.8 hotfix02 This method creates a Distribution List. subscription_id int ID of Subscription. alias string Alias of Distribution List. display_name string Display Name of Distribution List.

144 Parallels Operations Automation 5.0 Parallels primary_email_addre ss [show_in_address_bo ok] string boolean Primary E-mail Address of Distribution List. It defines whether to show Distribution List in the Address Book of organization. There are the following options: 0 - Distribution List is not shown in the Address Book of organization. 1 - Distribution List is shown in the Address Book of organization. This parameter is optional. If parameter is not specified, the 1 value is used. accept_mail_from int This parameter defines the type of accepted recipients. There are the following options: [additional_emails] array of string 1 From everyone. The method has the following output parameters: 2 From Distribution List members only. 3 From members of organization only. Additional E-mail Addresses of Distribution List. This parameter is optional. distribution_list_i d int ID of Distribution List created. Note: This method can also be called under Reseller permissions. pem.exchange.adddistributionlistmembers This method is supported by POA starting from version 2.8 hotfix02 This method adds members to Distribution List. distribution_list_i d int ID of Distribution List. members array of structures Array of objects to add. The mailbox_id, distribution_list_id, public_folder_id, and mail_contact_id parameters are mutually exclusive.

Public API Reference 145 [mailbox_id] int ID of Mailbox. [distribution_li st_id] [public_folder_i d] [mail_contact_id ] int int int ID of Distribution List. ID of Public Folder. ID of Contact. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getdistributionlists This method is supported by POA starting from version 2.9 hotfix03 This method returns all Distribution Lists for the specified Subscription. subscription_id int Subscription ID The method returns the array of structures: distribution_list_i d int Distribution List ID display_name string Display Name of Distribution List email_address string Primary E-mail Address of Distribution List alias string Alias of Distribution List accept_mail_from int This parameter defines the type of accepted recipients. There are the following options: 1 From everyone 2 From Distribution List members only 3 From Mailboxes which belong to this subscription only Note: This method can also be called under Reseller permissions.

146 Parallels Operations Automation 5.0 Parallels pem.exchange.removedistributionlistmembers This method is supported by POA starting from version 2.8 hotfix02 This method removes members from Distribution List. distribution_list_i d int ID of Distribution List. members array of structures Array of objects to remove. The mailbox_id, distribution_list_id, public_folder_id, and mail_contact_id parameters are mutually exclusive. [mailbox_id] int ID of Mailbox. [distribution_li st_id] [public_folder_i d] [mail_contact_id ] int int int ID of Distribution List. ID of Public Folder. ID of Contact. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.removedistributionlist This method is supported by POA starting from version 2.8 hotfix02 This method removes a Distribution List. distribution_list_i d int ID of Distribution List.

Public API Reference 147 The method has no output parameters. Note: This method can also be called under Reseller permissions. Exchange Public Folder Management pem.exchange.addpublicfolder This method is supported by POA starting from version 2.8 hotfix02 This method adds a Public Folder. subscription_id int ID of Subscription. public_folder_name string Public Folder name. items_type int This parameter defines the type of items, which are stored in the Public Folder. There are the following options: 0 - Mail Items. 1 - Contacts Items. 2 - Appointment Items. 3 - Note Items. 4 - Task Items. 5 - Journal Items. size_limit_mb int This parameter defines the maximum allowed Public Folder size in megabytes. default_role int This parameter defines the default role for Public Folder. There are the following options: 0 - None. 1 - Reviewer. 2 - Contributor. 3 - Non-Editing Author. 4 - Author. 5 - Publishing Author. 6 - Editor. 7 - Publishing Editor.

148 Parallels Operations Automation 5.0 Parallels [parent_folder_id] int ID of parent Public Folder. This parameter is optional. There are the following options: The method has the following output parameters: Parameter is specified. New Public Folder is created under the parent Public Folder. Parameter is not specified. New Top-level Public Folder is created. public_folder_id int ID of Public Folder created. Note: This method can also be called under Reseller permissions. pem.exchange.mailenablepublicfolder This method is supported by POA starting from version 2.8 hotfix02 This method makes a Public Folder mail-enabled. public_folder_id int ID of Public Folder. primary_email_addre ss [show_in_address_bo ok] string boolean Primary E-mail Address of Public Folder. It defines whether to show Public Folder in the Address Book of organization. There are the following options: 0 - Public Folder is not shown in the Address Book of organization. 1 - Public Folder is shown in the Address Book of organization. This parameter is optional. If parameter is not specified, the 1 value is used. accept_mail_from int This parameter defines the type of accepted recipients. There are the following options: 0 - System. 1 - From everyone. 3 - From members of organization only.

Public API Reference 149 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.maildisablepublicfolder This method is supported by POA starting from version 2.8 hotfix02 This method makes a Public Folder mail-disabled. public_folder_id int ID of Public Folder. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getrootfoldername This method is supported by POA starting from version 2.8 hotfix02 This method returns the name of the Root Public Folder for Subscription ID specified. Note: Root Public Folder contains Top-level Public Folders. It is created at the same time the first Top-level Public Folder is created. Thus, if there is no any Top-level Public Folder yet, method returns empty value. subscription_id int ID of Subscription. The method has the following output parameters: public_folder_name string Name of Root Public Folder. Note: This method can also be called under Reseller permissions.

150 Parallels Operations Automation 5.0 Parallels pem.exchange.getpublicfolders This method is supported by POA starting from version 2.9 hotfix03 This method returns all Public Folders for the specified Subscription. subscription_id int Subscription ID The method returns the array of structures: public_folder_id int Public Folder ID public_folder_name string Name of Public Folder items_type int This parameter defines the type of items, which are stored in the Public Folder. There are the following options: 0 - Mail Items 1 - Contacts Items 2 - Appointment Items 3 - Note Items 4 - Task Items 5 - Journal Items 255 - Unknown (internal type for imported and migrated Public Folders) size int Size of Public Folder (in kilobytes) [email_address] string Primary E-mail Address of mail-enabled Public Folder. This parameter is returned for Public Folder, which is mail-enabled. [parent_folder_id] int ID of parent Public Folder, This parameter is returned for sub-folders only. Note: This method can also be called under Reseller permissions.

Public API Reference 151 pem.exchange.removepublicfolder This method is supported by POA starting from version 2.8 hotfix02 This method removes a Public Folder. public_folder_id int ID of Public Folder. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.grantpublicfolderroles This method is supported by POA starting from version 5.0 This method grants the Roles to the Hosted Exchange Entities (Mailboxes or Distribution Lists) for the specified Public Folder. public_folder_id int Public Folder ID roles array This parameter defined the Hosted Exchange Entities (Mailboxes or Distribution Lists) and Roles, which are granted to the Hosted Exchange Entities (Mailboxes or Distribution Lists).

152 Parallels Operations Automation 5.0 Parallels entity_id struct Hosted Exchange Entity (Mailbox or Distribution List) [mailbox_id] int Mailbox ID [distribution_ list_id] int Distribution List ID role string Role of the Hosted Exchange Entity (Mailbox or Distribution List). There are the following options: none - The None Role, reviewer - The Reviewer Role, contributor - The Contributor Role, non-editing-author - The Non-Editing Author Role, author - The Author Role, publishing-author - The Publishing Author Role, editor - The Editor Role, publishing-editor - The Publishing Editor Role, owner - The Owner Role. Note: The mailbox_id and distribution_list_id optional parameters are mutually exclusive. If Hosted Exchange Entity is a Mailbox, the mailbox_id parameter should be specified. If Hosted Exchange Entity is a Distribution List, the distribution_list_id parameter should be specified. The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.revokepublicfolderroles This method is supported by POA starting from version 5.0 This method revokes the granted Roles from the Hosted Exchange Entities (Mailboxes or Distribution Lists) for the specified Public Folder. public_folder_id int Public Folder ID entities array of int IDs of Hosted Exchange Entities (Mailboxes or Distribution Lists)

Public API Reference 153 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.listpublicfolderroles This method is supported by POA starting from version 5.0 This method returns a list of Hosted Exchange Entities (Mailboxes or Distribution Lists), which have the Roles for the specified Public Folder. public_folder_id int Public Folder ID The method returns array of the following structures: entity_id struct Hosted Exchange Entity (Mailbox or Distribution List) [mailbox_id] int Mailbox ID [distribution_li st_id] int Distribution List ID entity_name string Name of Hosted Exchange Entity (Mailbox or Distribution List) entity_display_name string Display Name of Hosted Exchange Entity (Mailbox or Distribution List) role string Role of Hosted Exchange Entity (Mailbox or Distribution List). There are the following options: none - The None Role, reviewer - The Reviewer Role, contributor - The Contributor Role, non-editing-author - The Non-Editing Author Role, author - The Author Role, publishing-author - The Publishing Author Role, editor - The Editor Role, publishing-editor - The Publishing Editor Role, owner - The Owner Role.

154 Parallels Operations Automation 5.0 Parallels Note: The mailbox_id and distribution_list_id optional parameters are mutually exclusive. If Hosted Exchange Entity is a Mailbox, the mailbox_id parameter is returned. If Hosted Exchange Entity is a Distribution List, the distribution_list_id parameter is returned. Note: This method can also be called under Reseller permissions. Exchange Contact Management pem.exchange.addcontact This method is supported by POA starting from version 2.8 hotfix02 This method creates a Contact. subscription_id int ID of Subscription. alias string Alias of Contact. display_name string Display Name of Contact. target_email_addres s [show_in_address_bo ok] string boolean E-mail Address of Contact. It defines whether to show Contact in the Address Book of organization. There are the following options: 0 - Contact is not shown in the Address Book of organization. 1 - Contact is shown in the Address Book of organization. This parameter is optional. If parameter is not specified, the 1 value is used. The method has the following output parameters: mail_contact_id int ID of Contact created. Note: This method can also be called under Reseller permissions.

Public API Reference 155 pem.exchange.getcontacts This method is supported by POA starting from version 2.9 hotfix03 This method returns all Contacts of the specified Subscription. subscription_id int Subscription ID The method returns the array of structures: mail_contact_id int Contact ID display_name string Display Name of Contact alias string Alias of Contact [email_address] string Primary E-mail Address of Contact. This parameter is returned if Primary E-mail Address is defined for Contact. target_email_addres s string E-mail Address of Contact Note: This method can also be called under Reseller permissions. pem.exchange.removecontact This method is supported by POA starting from version 2.8 hotfix02 This method removes a Contact. mail_contact_id int ID of Contact.

156 Parallels Operations Automation 5.0 Parallels The method has no output parameters. Note: This method can also be called under Reseller permissions. Global Relay Archiving Management pem.global_relay.createarchive This method is supported by POA starting from version 2.8 hotfix02 This method creates a new Global Relay mail archive. subscription_id int Subscription ID. company_info struct Information about a company.

Public API Reference 157 title string The name of a company. country string The code of a country represented by two lowercased letters, like us, uk, etc. city string City. state string State, if applicable. postal_code string Postal code. address string Address. phone string Phone. fax string Fax. primary_domain string Primary domain. admin_email string Administrative e-mail address. admin_phone string Administrative phone. The method has no output parameters. See also: Activating Global Relay Archiving Support diagram (on page 303) Note: This method can also be called under Reseller permissions. pem.global_relay.disablearchive This method is supported by POA starting from version 2.8 hotfix02 This method makes a mail archive disabled. subscription_id int Subscription ID.

158 Parallels Operations Automation 5.0 Parallels The method has no output parameters. See also: pem.global_relay.enablearchive (on page 158) Note: This method can also be called under Reseller permissions. pem.global_relay.disablearchiving This method is supported by POA starting from version 2.8 hotfix02 This method makes archiving disabled for the specified recipients. subscription_id int Subscription ID. recipients array of int The list of the recipients. n/a int ID of the recipient. The method has no output parameters. See also: pem.global_relay.enablearchiving (on page 159) Note: This method can also be called under Reseller permissions. pem.global_relay.enablearchive This method is supported by POA starting from version 2.8 hotfix02 This method makes a mail archive enabled. subscription_id int Subscription ID.

Public API Reference 159 The method has no output parameters. See also: pem.global_relay.disablearchive (on page 157) Note: This method can also be called under Reseller permissions. pem.global_relay.enablearchiving This method is supported by POA starting from version 2.8 hotfix02 This method makes archiving enabled for the specified recipient candidates. subscription_id int Subscription ID. recipients array of struct The list of the recipients candidates.

160 Parallels Operations Automation 5.0 Parallels recipient_owner_ id external_recipie nt_id int int ID of the recipient candidate owner. It shows to which POA Hosting Module a recipient candidate corresponds. ID of the recipient candidate. recipient_type string Type of recipient candidate. There are the following options: The method has no output parameters. See also: mbx - Mailbox. dlist - Distribution List. pfolder - Public Folder. contact - Contact. pem.global_relay.disablearchiving (on page 158) Note: The dlist, pfolder, and contact recipient candidate types should not be used. They are reserved for future use. Note: This method can also be called under Reseller permissions. pem.global_relay.getarchive This method is supported by POA starting from version 2.8 hotfix02 This method returns the properties of a mail archive. subscription_id int Subscription ID. The method has the following output parameters: subscription_id int Subscription ID. company struct Information about a company.

Public API Reference 161 title string The name of a company. country string The code of a country represented by two lowercased letters, like us, uk, etc. city string City. state string State, if applicable. postal_code string Postal code. address string Address. phone string Phone. fax string Fax. admin struct Administrative account information. login string Administrative login. email string Administrative e-mail address. phone string Administrative phone. archive_all boolean This parameter shows, whether a new recipient candidates are added automatically to the list of the archive recipients. status string Status of a mail archive. There are the following options: [errors] array of struct r - Ready. c - Creating. u - Updating. d - Deleting. i - Importing. e - Error. The list of errors.

162 Parallels Operations Automation 5.0 Parallels operation string Type of operation. There are the following options: r - Ready. c - Creating. u - Updating. d - Deleting. i - Importing. e - Error. x - Disabled.? - Unknown. Operation can be restarted using the pem.global_relay.retryarchiveoperation method (on page 164). error int Error code. There are the following options: 0 - Success. 1 - Unknown. 2 - Value is empty. 3 - Operation in progress. 5 - Access denied. 100 - Invalid primary domain. 101 - Company already exists. 102 - Domain already exists. [domain] string Domain name, which is associated with the operation. Note: This method can also be called under Reseller permissions. pem.global_relay.getarchiverecipients This method is supported by POA starting from version 2.8 hotfix02 This method returns the list of the archive recipients. subscription_id int Subscription ID. The method returns the array of structures: subscription_id int Subscription ID. recipient_id int ID of a recipient.

Public API Reference 163 display_name string Display Name of a recipient. email string E-mail address of a recipient. status int Status of a recipient. There are the following options: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Deleting. 4 - Ready. 5 - Enabling. 6 - Disabling. 7 - Disabled. 8 - Detached. Note: This method can also be called under Reseller permissions. pem.global_relay.getarchiverecipientscandidates This method is supported by POA starting from version 2.8 hotfix02 This method returns the list of the archive recipient candidates. subscription_id int Subscription ID. The method returns the array of structures: recipient_owner_id int ID of the recipient candidate owner. It shows to which POA Hosting Module a recipient candidate corresponds. external_recipient_ id int ID of recipient candidate. recipient_type string Type of recipient candidate. There are the following options: mbx - Mailbox. dlist - Distribution List. pfolder - Public Folder. contact - Contact. Note: The dlist, pfolder, and contact recipient candidate types should not be used. They are reserved for future use.

164 Parallels Operations Automation 5.0 Parallels display_name string Display Name of a recipient candidate. email string E-mail address of a recipient candidate. status int Status of a recipient candidate. There are the following options: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Deleting. 4 - Ready. 5 - Enabling. 6 - Disabling. 7 - Disabled. 8 - Detached. Note: This method can also be called under Reseller permissions. pem.global_relay.retryarchiveoperation This method is supported by POA starting from version 2.8 hotfix02 This method restarts the mail archive operations for the specified Subscription. subscription_id int Subscription ID.

Public API Reference 165 The method has no output parameters. Note: This method can also be called under Reseller permissions. Delivery Permissions Management pem.exchange.getdeliverypermissions This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of Hosted Exchange entities (Mailboxes and Distribution Lists) which have the Send As or Send On Behalf delivery permissions for the specified Hosted Exchange entity (Mailbox, Distribution List, and Pubic Folder). [mailbox_id] int Mailbox ID [distribution_list_ id] int Distribution List ID [public_folder_id] int Public Folder ID Note: The mailbox_id, distribution_list_id, and public_folder_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. The method returns the array of structures: trustee struct Hosted Exchange entity which has the delivery permission. [mailbox_id] int Mailbox ID [distribution_li st_id] int Distribution List ID display_name string Display Name of Hosted Exchange entity permission int Delivery permission. There are the following options: 1 Send As 2 Send On Behalf

166 Parallels Operations Automation 5.0 Parallels Notes: 1. This method can also be called under Reseller permissions. 2. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity is returned. pem.exchange.getdeliverypermissionscandidates This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of Hosted Exchange entities (Mailboxes and Distribution Lists) to which the Send As or Send On Behalf delivery permissions can be granted for the specified Hosted Exchange entity (Mailbox, Distribution List, and Pubic Folder). [mailbox_id] int Mailbox ID [distribution_list_ id] int Distribution List ID [public_folder_id] int Public Folder ID Note: The mailbox_id, distribution_list_id, and public_folder_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. The method returns the array of structures: [mailbox_id] int Mailbox ID [distribution_list_ id] int Distribution List ID display_name string Display Name of Hosted Exchange entity Notes: 1. This method can also be called under Reseller permissions. 2. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity is returned.

Public API Reference 167 pem.exchange.grantdeliverypermissions This method is supported by POA starting from version 2.9 hotfix03 This method grants the Send As or Send On Behalf delivery permissions to the list of Hosted Exchange entities (Mailboxes and Distribution Lists) for the specified Hosted Exchange entity (Mailbox, Distribution List, and Pubic Folder). [mailbox_id] int ID of Mailbox [distribution_list_ id] int Distribution List ID [public_folder_id] int Public Folder ID permissions array of struct The list of Hosted Exchange entities to which the delivery permissions are granted.

168 Parallels Operations Automation 5.0 Parallels trustee struct Hosted Exchange entity (Mailbox and Distribution List) and its delivery permission [mailbox_id] int Mailbox ID [distribution_ list_id] int Distribution List ID [display_name] string Display Name of Hosted Exchange entity. This parameter is optional. It is ignored if the parameter is specified. permission int Delivery permission. There are the following options: Notes: 1 Send As 2 Send On Behalf 1. The mailbox_id, distribution_list_id, and public_folder_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. 2. The method can take the output of the pem.exchange.getdeliverypermissionscandidates method (on page 166). The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.revokedeliverypermissions This method is supported by POA starting from version 2.9 hotfix03 This method revokes the delivery permissions from the list of Hosted Exchange entities (Mailboxes and Distribution Lists) for the specified Hosted Exchange entity (Mailbox, Distribution List, and Pubic Folder). [mailbox_id] int ID of Mailbox [distribution_list_ id] int Distribution List ID [public_folder_id] int Public Folder ID trustees array of struct The list of Hosted Exchange entities from which the delivery permissions are revoked.

Public API Reference 169 [mailbox_id] int Mailbox ID [distribution_li st_id] int Distribution List ID [display_name] string Display Name of Hosted Exchange entity. This parameter is optional. It is ignored if the parameter is specified. Notes: 1. The mailbox_id, distribution_list_id, and public_folder_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. 2. The method can take the output of the pem.exchange.getdeliverypermissions method (on page 165). The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getmailboxpermissions This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of Hosted Exchange entities (Mailboxes and Distribution Lists) which have the Full Access delivery permission for the specified Mailbox. mailbox_id int Mailbox ID The method returns the array of structures: trustee struct [mailbox_id] int Mailbox ID [distribution_li st_id] int Distribution List ID display_name string Display Name of Hosted Exchange entity permission int Delivery permission (1 - Full Access).

170 Parallels Operations Automation 5.0 Parallels Notes: 1. This method can also be called under Reseller permissions. 2. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity is returned. pem.exchange.getmailboxpermissionscandidates This method is supported by POA starting from version 2.9 hotfix03 This method returns a list of Hosted Exchange entities (Mailboxes and Distribution Lists) to which the Full Access delivery permission can be granted for the specified Mailbox. mailbox_id int Mailbox ID The method returns the array of structures: [mailbox_id] int ID of Mailbox to which the delivery permission can be granted [distribution_li st_id] int ID of Distribution List to which the delivery permission can be granted display_name string Display Name of Hosted Exchange entity Notes: 1. This method can also be called under Reseller permissions. 2. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity is returned. pem.exchange.grantmailboxpermissions This method is supported by POA starting from version 2.9 hotfix03 This method grants the Full Access delivery permission to the list of Hosted Exchange entities (Mailboxes and Distribution Lists) for the specified Mailbox. mailbox_id int Mailbox ID

Public API Reference 171 permissions array of struct The list of Hosted Exchange entities to which the delivery permission is granted. trustee struct Hosted Exchange entity (Mailbox and Distribution List) and its delivery permission [mailbox_id] int Mailbox ID [distribution _list_id] int Distribution List ID [display_name ] string Display Name of Hosted Exchange entity. This parameter is optional. It is ignored if the parameter is specified. permission int Delivery permission (1 - Full Access). Notes: 1. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. 2. The method can take the output of the pem.exchange.getmailboxpermissionscandidates method (on page 170). The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.revokemailboxpermissions This method is supported by POA starting from version 2.9 hotfix03 This method revokes the Full Access delivery permission from the list of Hosted Exchange entities (Mailboxes and Distribution Lists) for the specified Mailbox. mailbox_id int Mailbox ID trustees array of struct The list of Hosted Exchange entities from which the delivery permission is revoked.

172 Parallels Operations Automation 5.0 Parallels [mailbox_id] int Mailbox ID [distribution_li st_id] int Distribution List ID [display_name] string Display Name of Hosted Exchange entity. This parameter is optional. It is ignored if the parameter is specified. Notes: 1. The mailbox_id and distribution_list_id optional parameters are mutually exclusive. The one Hosted Exchange entity should be specified. 2. The method can take the output of the pem.exchange.getmailboxpermissions method (on page 169). The method has no output parameters. Note: This method can also be called under Reseller permissions. Unified Messaging Management pem.exchange.enableunifiedmessaging This method is supported by POA starting from version 5.0 This method allows to make Unified Messaging enabled for the specified Exchange Mailbox. mailbox_id int Mailbox ID [phoneextension] string Extension of Phone Number. It is optional parameter. If the parameter is omitted, extension is generated by POA.

Public API Reference 173 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.disableunifiedmessaging This method is supported by POA starting from version 5.0 This method allows to make Unified Messaging disabled for the specified Exchange Mailbox. mailbox_id int Mailbox ID The method has no output parameters. Note: This method can also be called under Reseller permissions. Exchange Auxiliary Methods pem.exchange.addemailaddresses This method is supported by POA starting from version 2.6.5 This method adds additional e-mail addresses to Hosted Exchange entity (Mailbox, Distribution List, Contact, Pubic Folder). Note: The mailbox_id, distribution_list_id, public_folder_id, and mail_contact_id optional parameters are mutually exclusive. [mailbox_id] int ID of Mailbox. [distribution_list_ id] int ID of Distribution LIst. [public_folder_id] int ID of Public Folder. [mail_contact_id] int ID of Contact. email_addresses array of string Defines the list of additional e-mail addresses of the Hosted Exchange entity. These e-mail addresses should be based on domains, which belong to the Customer's Subscription.

174 Parallels Operations Automation 5.0 Parallels The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.changeprimaryemailaddress This method is supported by POA starting from version 2.6.5 This method sets the new primary e-mail address for Hosted Exchange entity (Mailbox, Distribution List, Contact, Pubic Folder). Two use-cases are possible: E-mail address already assigned to the Hosted Exchange entity. The method sets this e-mail address as primary e-mail address. E-mail address is not assigned to the Hosted Exchange entity. The method assigns this e-mail address to the Hosted Exchange entity and sets one as primary e-mail address. Note: The mailbox_id, distribution_list_id, public_folder_id, and mail_contact_id optional parameters are mutually exclusive. [mail_contact_id] int Contact ID. [public_folder_id] int Public Folder ID. [distribution_list_ id] int Distribution List ID. [mailbox_id] int Mailbox ID. email_address string Specifies the primary e-mail address for the Hosted Exchange entity. This e-mail address should be based on domains, which belong to the Customer's Subscription.

Public API Reference 175 The method has no output parameters. Note: This method can also be called under Reseller permissions. pem.exchange.getemaildomains This method is supported by POA starting from version 2.7 This method returns the list of Domains, on which Exchange Mail Hosting is installed. [domain_name] string The name of the Windows Active Directory Domain. If specified, only Domains related to Windows Active Directory Domain will be returned. If omitted, all the Domains will be returned. The method has the following output parameters: email_domains array of string The list of Domains, on which Exchange Mail Hosting is installed. Note: This method can also be called under Reseller permissions. pem.exchange.getsmtpfilters This method is supported by POA starting from version 2.8 hotfix02 This method returns the list of AntiVirus/AntiSpam/Archiving Filters, which are attached to Subscription. subscription_id int ID of Subscription. The method returns the array of structures: domain_name string Name of Domain, which is protected by Filter.

176 Parallels Operations Automation 5.0 Parallels filter_name string Name of Filter. There are the following possible values: GlobalRelay - Global Relay Email Archiving. MessageLabs - MessageLabs Email Security. MXLogic - MX Logic Email Security. Postini - Postini Email Security. Note: This method can also be called under Reseller permissions. pem.exchange.removeemailaddresses This method is supported by POA starting from version 2.6.5 This method removes the e-mail addresses from the list of assigned to Hosted Exchange entity e-mail addresses. Note: Hosted Exchange entity is a Mailbox/Public Folder/Distribution List/Contact. There is a peculiarity: if a non-assigned to Hosted Exchange entity e-mail address was specified in the list of e-mail addresses to remove, method call will ignore such e-mail address. Such behaviour is intended for the bulk e-mail addresses removal. Note: The mailbox_id, distribution_list_id, public_folder_id, and mail_contact_id optional parameters are mutually exclusive. [mailbox_id] int ID of Mailbox. [distribution_list_ id] int ID of Distribution List. [public_folder_id] int ID of Public Folder. [mail_contact_id] int ID of Contact. email_addresses array of string The list of e-mail addresses to remove.

Public API Reference 177 The method has no output parameters. Note: This method can also be called under Reseller permissions. Hosted OCS Management This functional group allows to manage OCS Hosting. pem.ocs.getphonenumberlist This method is supported by POA starting from version 5.0 This method returns a list of properties of the specified Phone Numbers. phoneslist array of string The method returns an array of the following structures: List of Phone Numbers. Phone Numbers are specified in the E.164 format. phonenumberid int Phone Number ID in POA. phonenumber string Phone Number in the E.164 format. resourcetype string Name of the Phone Number Resource Type. This Resource Type is created on the basis of the Hosted Office Communications Phone Number Resource Class. extensionallowed boolean Whether the Phone Number extensions are allowed. There are the following options: 0 - Phone Number extensions are not allowed. 1 - Phone Number extensions are allowed. subscriptionid int ID of Subscription where the Phone Number is allocated. If the Phone Number is not allocated, the 0 value is returned. ownerid int ID of Account, which is an owner of the Phone Number. start int It indicates the point in time when the Phone Number is allocated. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). If the Phone Number is not allocated, the 0 value is returned.

178 Parallels Operations Automation 5.0 Parallels Hosted CRM Management This functional group allows to manage Hosted CRM Organizations and Hosted CRM Users. pem.mscrm.createorg This method is supported by POA starting from version 2.8 This method creates Hosted CRM Organization. sub_id int ID of Subscription. mscrm_rt_id int ID of Resource Type, which is based on Hosted CRM Resource Class. This Resource Type should be included in Subscription. display_name string Organization Display Name. unique_name string Organization unique name. It is used as part of URL to access Hosted CRM web-based interface. currency_id int ID of Organization base currency. The method has the following output parameters: org_id int ID of Organization created. pem.mscrm.createuser This method is supported by POA starting from version 2.8 This method creates Hosted CRM User. org_id int ID of Organization.

Public API Reference 179 user_id int ID of existing Service User. security_roles_list array of int The list of Security Roles IDs to assign. business_unit_id int Business Unit ID. cal_type int Hosted CRM User Client Access License type. There are the following possible values: email_delivery_sett ings struct 1 - Full. User will have full access to any part of Hosted CRM that he or she has the security roles to access. 2 - Administrative. User will not have access to Sales, Marketing, and Service areas. This access mode allows you to create a user for administering and customizing Hosted CRM. 3 - Read-only. User will have read-only access to any part of Hosted CRM that he or she has the security roles to access. This parameter defines E-Mail Access Type for Hosted CRM User. The ext_settings, exchange_settings, none_settings, and outlook_settings parameters are optional to each other.

180 Parallels Operations Automation 5.0 Parallels [ext_settings] struct This parameter is used for External mail server E-Mail Access Type (Hosted CRM automatically tracks e- mail and delivers messages via user's mailbox at external POP3/SMTP mail server). It defines Hosted CRM User's mail delivery settings. pop3 struct POP3 protocol settings. use_ssl boolean Whether to use SSL. server string IP Address or hostname of incoming POP3 server. If the server uses non-standard port number, specify the port in the format of servername:port. login string POP3 server login. password string POP3 server password. smtp struct SMTP protocol settings. use_ssl boolean Whether to use SSL. server string IP Address or hostname of outgoing SMTP server. If the server uses non-standard port number, specify the port in the format of servername:port. login string SMTP server login. password string SMTP server password. primary_email string Hosted CRM User's Primary E-Mail Address. [exchange_settin gs] boolean This parameter is used for Exchange mailbox E-Mail Access Type (Hosted CRM automatically tracks and delivers e-mail messages via user's Exchange mailbox). It defines Hosted CRM User's mail delivery settings. The Primary E-Mail Address of Exchange Mailbox is used as Hosted CRM User's Primary E- Mail Address. Note: It is assumed that Service User has Exchange Mailbox. [none_settings] struct This parameter is used for None E-Mail Access Type (The user does not use Hosted CRM to automatically track e-mail messages). It defines Hosted CRM User's mail delivery settings. primary_email string Hosted CRM User's Primary E-Mail Address. [outlook_setting s] struct This parameter is used for Microsoft Dynamics CRM for Outlook E-Mail Access Type (E-mail messages are tracked and delivered with Microsoft Dynamics CRM plug-in for Outlook installed on user's computer). It defines Hosted CRM User's mail delivery settings. primary_email string Hosted CRM User's Primary E-Mail Address. The method has the following output parameters:

Public API Reference 181 crm_user_id int Hosted CRM User ID. pem.mscrm.disableorg This method is supported by POA starting from version 2.8 This method disables Organization specified. org_id int ID of Organization to disable. The method has no output parameters. pem.mscrm.enableorg This method is supported by POA starting from version 2.8 This method enables Organization specified. org_id int ID of Organization to enable. The method has no output parameters. pem.mscrm.getbusinessunits This method is supported by POA starting from version 2.8 This method returns a list of Business Units for Organization specified. org_id int The ID of Organization. The method returns the array of structures: business_unit_id int ID of Business Unit.

182 Parallels Operations Automation 5.0 Parallels display_name string Business Unit Display Name. enabled boolean Whether Business Unit is enabled. path string Full path to the Business Unit within Organization in the following format: <Parent Business Unit>\<Child Business Unit>. pem.mscrm.getcurrencies This method is supported by POA starting from version 2.8 This method returns a list of Currencies existing in Hosted CRM. The method has no input parameters. The method returns the array of structures: currency_id int ID of Currency. currency_name string Name of Currency. currency_code string Code of Currency. currency_symbol string Symbol of Currency. pem.mscrm.getorgbysubscription This method is supported by POA starting from version 2.8 This method retrieves properties of Organization by Subscription ID specified. sub_id int ID of Subscription. The method has the following output parameters: org_id int ID of Organization. display_name string Organization Display Name. unique_name string Organization unique name. It is used as part of URL to access Hosted CRM web-based interface.

Public API Reference 183 user_count int Quantity of existing Organization users. user_limit bigint Maximum number of users, which can be created within Organization. enabled boolean Whether Organization is enabled. currency_id int ID of Organization base Currency. state int State of Organization. There are the following possible values: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Ready. 4 - Deleting. 5 - Deleted. 6 - Failed. pem.mscrm.getorginfo This method is supported by POA starting from version 2.8 This method returns the properties of Hosted CRM Organization. org_id int ID of Organization. The method has the following output parameters: org_id int ID of Organization. display_name string Organization Display Name. unique_name string Organization unique name. It is used as part of URL to access Hosted CRM web-based interface. user_count int Quantity of existing Organization users. user_limit bigint Maximum number of users, which can be created within Organization. enabled boolean Whether Organization is enabled.

184 Parallels Operations Automation 5.0 Parallels state int State of Organization. There are the following possible values: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Ready. 4 - Deleting. 5 - Deleted. 6 - Failed. url string Organization Access Point URL. currency_id int ID of Organization base currency. pem.mscrm.getorglist This method is supported by POA starting from version 2.8 This method returns a list of all existing Organizations. The method has no input parameters. The method returns the array of structures: org_id int ID of Organization. display_name string Organization Display Name. unique_name string Organization unique name. It is used as part of URL to access Hosted CRM web-based interface. user_count int Quantity of existing Organization users. user_limit bigint Maximum number of users, which can be created within Organization. enabled boolean Whether Organization is enabled. state int State of Organization. There are the following possible values: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Ready. 4 - Deleting. 5 - Deleted. 6 - Failed.

Public API Reference 185 currency_id int ID of Organization's base currency. url string Organization Access Point URL. pem.mscrm.getorgusers This method is supported by POA starting from version 2.8 This method returns a list of Hosted CRM Users for Organization specified. org_id int The ID of Organization. The method returns the array of structures: user_id int ID of Service User. crm_user_id int ID of Hosted CRM User. display_name string Hosted CRM User Display Name. account_name string Hosted CRM User Account Name. business_unit_id int ID of Business Unit. security_roles_list array of int IDs of Security Roles, which are assigned to Hosted CRM User. state int State of Hosted CRM User. There are the following possible values: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Ready. 4 - Deleting. 6 - Failed.

186 Parallels Operations Automation 5.0 Parallels user_cal_type int Hosted CRM User Client Access License type. There are the following possible values: 1 - Full. User will have full access to any part of Hosted CRM that he or she has the security roles to access. 2 - Administrative. User will not have access to Sales, Marketing, and Service areas. This access mode allows you to create a user for administering and customizing Hosted CRM. 3 - Read-only. User will have read-only access to any part of Hosted CRM that he or she has the security roles to access. enabled boolean Whether Hosted CRM User is enabled. pem.mscrm.getsecurityroles This method is supported by POA starting from version 2.8 This method returns a list of Security Roles for Business Unit specified. business_unit_id int ID of Business Unit. The method returns the array of structures: sec_role_id int ID of Security Role. display_name string Security Role Display Name. pem.mscrm.getuserinfo This method is supported by POA starting from version 2.8 This method returns the properties of Hosted CRM User specified. crm_user_id int ID of Hosted CRM User.

Public API Reference 187 The method has the following output parameters: user_info struct Hosted CRM User's properties. user_id int ID of Service User. crm_user_id int ID of Hosted CRM User. display_name string Hosted CRM User Display Name. account_name string Hosted CRM User Account Name. business_unit_id int ID of Business Unit. security_roles_l ist array of int IDs of Security Roles, which are assigned to Hosted CRM User. state int State of Hosted CRM User. There are the following possible values: 0 - Unknown. 1 - Creating. 2 - Updating. 3 - Ready. 4 - Deleting. 6 - Failed. user_cal_type int Hosted CRM User Client Access License type. There are the following possible values: 1 - Full. User will have full access to any part of Hosted CRM that he or she has the security roles to access. 2 - Administrative. User will not have access to Sales, Marketing, and Service areas. This access mode allows you to create a user for administering and customizing Hosted CRM. 3 - Read-only. User will have read-only access to any part of Hosted CRM that he or she has the security roles to access. enabled int Whether Hosted CRM User is enabled. email_delivery_sett ings struct This parameter defines E-Mail Access Type for Hosted CRM User. The ext_settings, exchange_settings, none_settings, and outlook_settings parameters are optional to each other.

188 Parallels Operations Automation 5.0 Parallels [ext_settings] struct This parameter is used for External mail server E-Mail Access Type (Hosted CRM automatically tracks e- mail and delivers messages via user's mailbox at external POP3/SMTP mail server). It defines Hosted CRM User's mail delivery settings. pop3 struct POP3 protocol settings. use_ssl boolean Whether SSL is used. server string IP Address or hostname of incoming POP3 server. login string POP3 server login. password string POP3 server password. smtp struct SMTP protocol settings. use_ssl boolean Whether SSL is used. server string IP Address or hostname of outgoing SMTP server. login string SMTP server login. password string SMTP server password. primary_email string Hosted CRM User's Primary E-Mail Address. [exchange_settin gs] boolean This parameter is used for Exchange mailbox E-Mail Access Type (Hosted CRM automatically tracks and delivers e-mail messages via user's Exchange mailbox). It defines Hosted CRM User's mail delivery settings. The Primary E-Mail Address of Exchange Mailbox is used as Hosted CRM User's Primary E-Mail Address. [none_settings] struct This parameter is used for None E-Mail Access Type (The user does not use Hosted CRM to automatically track e-mail messages). It defines Hosted CRM User's mail delivery settings. primary_email string Hosted CRM User's Primary E-Mail Address. [outlook_setting s] struct This parameter is used for Microsoft Dynamics CRM for Outlook E-Mail Access Type (E-mail messages are tracked and delivered with Microsoft Dynamics CRM plug-in for Outlook installed on user's computer). It defines Hosted CRM User's mail delivery settings. primary_email string Hosted CRM User's Primary E-Mail Address.

Public API Reference 189 pem.mscrm.modifysecurityroles This method is supported by POA starting from version 2.8 This method modifies a set of Security Roles for Hosted CRM User specified. The old Security Roles will be unassigned and new ones will be assigned. crm_user_id int ID of Hosted CRM User. security_roles_list array of int The list of Security Roles IDs to assign. The method has no output parameters. pem.mscrm.moveuser This method is supported by POA starting from version 2.8 This method allows to move the Hosted CRM User between Business Units. crm_user_id int ID of Hosted CRM User to move. new_business_unit_i d int Destination Business Unit ID. security_roles_list array of int The list of Security Roles' IDs. Existing User's Security Roles will be unassigned and specified Security Roles will be assigned to User. The method has no output parameters. pem.mscrm.removeorg This method is supported by POA starting from version 2.8 This method removes the Hosted CRM Organization specified. org_id int ID of Organization to remove.

190 Parallels Operations Automation 5.0 Parallels The method has no output parameters. pem.mscrm.removeuser This method is supported by POA starting from version 2.8 This method removes the Hosted CRM User specified. crm_user_id int ID of Hosted CRM User. soft_delete boolean This parameter controls the specifics of Hosted CRM User removal. There are the following use cases of this parameter: The method has no output parameters. 0 - Hosted CRM user will be removed in POA and Hosted CRM. 1 - Hosted CRM user will be removed in POA and will be disabled in Hosted CRM. pem.mscrm.setexchangedeliverysettings This method is supported by POA starting from version 2.8 This method modifies mail delivery settings for the Hosted CRM User. E-Mail Access Type will be switched to the Exchange mailbox value after method invocation. The Primary E-Mail Address of Exchange Mailbox is used as Hosted CRM User's Primary E-Mail Address. Note: It is assumed that appropriate Service User has Exchange Mailbox. crm_user_id int ID of Hosted CRM User. The method has no output parameters.

Public API Reference 191 pem.mscrm.setexternaldeliverysettings This method is supported by POA starting from version 2.8 This method modifies mail delivery settings for the Hosted CRM User. E-Mail Access Type will be switched to the External mail server value after method invocation. crm_user_id int ID of Hosted CRM User. ext_delivery_settin gs struct pop3 struct POP3 protocol settings. use_ssl boolean Whether to use SSL. This parameter is used for External mail server E-Mail Access Type (Hosted CRM automatically tracks e- mail and delivers messages via user's mailbox at external POP3/SMTP mail server). It is defines Hosted CRM User's mail delivery settings. server string IP Address or hostname of incoming POP3 server. If the server uses non-standard port number, specify the port in the format of servername:port. login string POP3 server login. password string POP3 server password. smtp struct SMTP protocol settings. use_ssl boolean Whether to use SSL. server string IP Address or hostname of outgoing SMTP server. If the server uses non-standard port number, specify the port in the format of servername:port. login string SMTP server login. password string SMTP server password. primary_email string Hosted CRM User's Primary E-Mail Address. The method has no output parameters.

192 Parallels Operations Automation 5.0 Parallels pem.mscrm.setnonedeliverysettings This method is supported by POA starting from version 2.8 This method modifies mail delivery settings for the Hosted CRM User. E-Mail Access Type will be switched to the None value after method invocation. crm_user_id int ID of Hosted CRM User. primary_email string Hosted CRM User's Primary E-Mail Address. The method has no output parameters. pem.mscrm.setorgdisplayname This method is supported by POA starting from version 2.8 This method modifies Organization Display Name. org_id int ID of Organization. display_name string Organization Display Name. The method has no output parameters. pem.mscrm.setoutlookdeliverysettings This method is supported by POA starting from version 2.8 This method modifies mail delivery settings for the Hosted CRM User. E-Mail Access Type will be switched to the Microsoft Dynamics CRM for Outlook value after method invocation. crm_user_id int ID of Hosted CRM User.

Public API Reference 193 outlook_delivery_se ttings struct This parameter is used for Microsoft Dynamics CRM for Outlook E-Mail Access Type (E-mail messages are tracked and delivered with Microsoft Dynamics CRM plug-in for Outlook installed on user's computer). It defines Hosted CRM User's mail delivery settings. primary_email string Hosted CRM User's Primary E-Mail Address. The method has no output parameters. pem.mscrm.synchronizedata This method is supported by POA starting from version 2.8 This method synchronizes Organization's Business Units and Security Roles between POA and Hosted CRM. Business Units and Security Roles, which are created via Hosted CRM web-based interface, arrive to POA after method invocation. org_id int ID of Organization. The method has no output parameters. Database Management This functional group allows to manage Databases. pem.createdatabase This method is supported by POA starting from version 2.3. This method creates new database for specified subscription with specific type and default user. Please note, the process of creation a MS SQL database has peculiarities and contains the following sequence of methods calls: txn.begin (on page 267), pem.createdatabase, pem.mssql.setquota (on page 195), txn.commit (on page 268). subscription_id int The ID of the Subscription. name string Name for Database to create.

194 Parallels Operations Automation 5.0 Parallels type string Which RDBMS use to host a Database. Possible values: MYSQL PGSQL MSSQL user string Name of Database User. password string Password for Database User. [database_rt_id] int ID of Resource Type, which should be used for Database provisioning. If not specified, first suitable Resource Type is used. The method has the following output parameters: database_id int ID of created Database. name string Name of created Database. hostname string Name of host where Database will be located. pem.createdatabaseuser This method is supported by POA starting from version 2.3. This method creates new database user which can access specific database. One can create only one user with particular name so the user can access only one database. db_id int The ID of Database new User will be able to access user string The name of new User password string User's password Method will return an ID of created user. The method has the following output parameters: user_id int ID of the created User

Public API Reference 195 pem.mssql.setquota This method is supported by POA starting from version 2.6.5 This method allows to set a database quota for MS SQL databases (namely, for data and transaction log). database_id int Database ID to set the quota for. quota_rt_id int ID of the Resource Type to set the quota for data_quota bigint Quota for data file [log_quota] bigint optional, quota for transaction log file This method has no output parameters. pem.mysql.applymysqlactivationparams This method is supported by POA starting from version 2.9 This method applies the Activation Parameters of MySQL resources present in the specified Service Template to all existing Subscriptions based on this Service Template. Using this method one can, for example, apply the Create temporary tables privilege to already created databases. st_id int The ID of the Service Template. This method has no output parameters.

196 Parallels Operations Automation 5.0 Parallels QMail Mailbox Management This functional group allows to manage QMail Mailboxes and Mailnames. pem.cqmail.addmailbox This method is supported by POA starting from version 2.4. This method adds a Mailbox to a Mailname. There are the following use cases: Create a new Mailname and add a Mailbox to it. In this case POA creates a Mailname and adds a Mailbox to it. Note: 1. The Mailname password is required to create a Mailname, thus the password and password_crypted parameters are mandatory. 2. Use the pem.cqmail.editmailname (on page 202) method to change the password of an existing Mailname. Add a Mailbox to an existing Mailname. In this case POA adds a Mailbox to an existing Mailname. Note: 1. Password of an existing Mailname is used to create a Mailbox, thus the password and password_crypted parameters are optional. These parameters are ignored, if they are specified. 2. Use the pem.cqmail.editmailname (on page 202) method to change the password of an existing Mailname. Additionally, if a new Mailname is created, POA creates a Service User with the following properties: Display Name - Local part (e-mail address before the @ sign) of a Mailname is assigned. Login - Mailname is assigned. If an "All-Domains" Mailname is created, POA generates the Service User Login in the <Local part of mailname>@sub<subscription ID>.local form. Password - Mailname password is assigned. The E-mail Service is assigned to the Service User. subscription_id int The ID of Subscription. name string Local part (e-mail address before the @ sign).

Public API Reference 197 [domain_name] string Name of the Domain to create a Mailname for. There are the following use cases: This parameter is omitted. In this case POA creates an "All-Domains" Mailname. For example: name@<all-domains>. This parameter is specified. In this case POA creates a Mailname for Domain specified. For example: name@domain.com. If the domain_name parameter is specified, method checks that the following requirements are satisfied: CQMail hosting is added to Domain. [password] string Mailname password. CQMail hosting corresponds to Subscription specified. Method returns error, if one of requirements is not satisfied. [password_crypted] boolean Whether the password is passed in the encrypted form (DES or BSD MD5). There are the following possible values: 0 - password is passed in the plain text form. 1 - password is passed in the encrypted form. quota int Mailbox quota (in Kilobytes). There are the following options: If this parameter is 0, the Maximum quota for a mailbox in Kb Activation Parameter's value is used to set a Mailbox quota. If value of the quota parameter does not exceed value of the Maximum quota for a mailbox in Kb Activation Parameter, value of quota parameter is used to set a Mailbox quota. If value of the quota parameter exceeds value of the Maximum quota for a mailbox in Kb Activation Parameter, error is returned. [mail_to_notify] string E-mail address to send notification when the Mailbox is created. [antispam] boolean Defines whether a mail sent to this Mailbox is filtered through SPAM protection system. There are the following options: 0 - Filtering through SPAM protection system is disabled. This is the default value. 1 - Filtering through SPAM protection system is enabled. [antivirus] struct Defines whether a mail of this Mailbox is filtered through AntiVirus protection system.

198 Parallels Operations Automation 5.0 Parallels check_in boolean Whether to check incoming mail. There are the following options: 0 - Filtering of incoming mail through AntiVirus protection system is disabled. This is the default value. 1 - Filtering of incoming mail through AntiVirus protection system is enabled. check_out boolean Whether to check outgoing mail. There are the following options: 0 - Filtering of outgoing mail through AntiVirus protection system is disabled. This is the default value. 1 - Filtering of outgoing mail through AntiVirus protection system is enabled. notify_sender boolean Whether a notification is sent to the sender if a virus is found. There are the following options: notify_recepient s boolean The method has no output parameters. 0 - Sending of notification to the sender is disabled. This is the default value. 1 - Sending of notification to the sender is enabled. Whether a notification is sent to the recipient(s) if a virus is found. There are the following options: 0 - Sending of notification to the recipient(s) is disabled. This is the default value. 1 - Sending of notification to the recipient(s) is enabled. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.cqmail.addmailforwarding This method is supported by POA starting from version 2.5. This method associates forwarding e-mail address with Mailname. There are the following use cases: Create a new Mailname and associate forwarding e-mail address with it. In this case POA creates a Mailname and associates forwarding e-mail address with it. Note: 1. The Mailname password is required to create a Mailname, thus the password and password_crypted parameters are mandatory. 2. Use the pem.cqmail.editmailname (on page 202) method to change the password of an existing Mailname.

Public API Reference 199 Associate forwarding e-mail address with existing Mailname. In this case POA associates forwarding e-mail address with existing Mailname. Note: 1. Password of an existing Mailname is used, thus the password and password_crypted parameters are optional. These parameters are ignored, if they are specified. 2. Use the pem.cqmail.editmailname (on page 202) method to change the password of an existing Mailname. Additionally, if a new Mailname is created, POA creates a Service User with the following properties: Display Name - Local part (e-mail address before the @ sign) of a Mailname is assigned. Login - Mailname is assigned. If an "All-Domains" Mailname is created, POA generates the Service User Login in the <Local part of mailname>@sub<subscription ID>.local form. Password - Mailname password is assigned. The E-mail Service is assigned to the Service User. subscription_id int ID of Subscription. name string Local part (e-mail address before the @ sign). [domain_name] string Name of the Domain to create a Mailname for. There are the following use cases: This parameter is omitted. In this case POA creates an "All-Domains" Mailname. For example: name@<all-domains>. This parameter is specified. In this case POA creates a Mailname for Domain specified. For example: name@domain.com. If the domain_name parameter is specified, method checks that the following requirements are satisfied: CQMail hosting is added to Domain. CQMail hosting corresponds to Subscription specified. Method returns error, if one of requirements is not satisfied. forward_to string E-mail address to forward mail to. [password] string Mailname password.

200 Parallels Operations Automation 5.0 Parallels [password_crypted] boolean Whether the password is passed in the encrypted form (DES or BSD MD5). There are the following possible values: The method has no output parameters. 0 - password is passed in the plain text form. 1 - password is passed in the encrypted form. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.cqmail.addmailname This method is supported by POA starting from version 2.6.4 This method creates new Mailname. Additionally, a Service User is created with the following properties: Display Name - Local part (e-mail address before the @ sign) of a Mailname is assigned. Login - Mailname is assigned. If an "All-Domains" Mailname is created, POA generates the Service User Login in the <Local part of mailname>@sub<subscription ID>.local form. Password - Mailname password is assigned. The E-mail Service is assigned to the Service User. subscription_id int ID of Subscription. [domain_name] string Name of the Domain to create a Mailname for. There are the following use cases: This parameter is omitted. In this case POA creates an "All-Domains" Mailname. For example: name@<all-domains>. This parameter is specified. In this case POA creates a Mailname for Domain specified. For example: name@domain.com. If the domain_name parameter is specified, method checks that the following requirements are satisfied: CQMail hosting is added to Domain. CQMail hosting corresponds to Subscription specified. Method returns error, if one of requirements is not satisfied. name string Local part (e-mail address before the @ sign).

Public API Reference 201 password string Mailname password. password_is_crypted boolean Whether the password is passed in the encrypted form (DES or BSD MD5). There are the following possible values: 0 - password is passed in the plain text form. 1 - password is passed in the encrypted form. The method has no output parameters. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.cqmail.delmailname This method is supported by POA starting from version 2.6.4 This method deletes a Mailname. Additionally, this method removes the E-mail Service from the appropriate Service User. subscription_id int ID of Subscription. [domain_name] string Name of the Domain to delete a Mailname from. There are the following scenarios: Remove the "All-Domains" Mailname. In this scenario the domain_name parameter should be omitted. Remove the Mailname from certain Domain. In this scenario the domain_name parameter should be specified. name string Local part (e-mail address before the @ sign).

202 Parallels Operations Automation 5.0 Parallels The method has no output parameters. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.cqmail.editmailname This method is supported by POA starting from version 2.6.4 This method allows to edit a Mailname. Additionally, this method changes a password of a Service User, which is mapped to the Mailname. subscription_id int ID of Subscription. [domain_name] string Name of the Domain to edit a Mailname for. There are the following scenarios: Edit the "All-Domains" Mailname. In this scenario the domain_name parameter should be omitted. Edit the Mailname for certain Domain. In this scenario the domain_name parameter should be specified. name string Local part (e-mail address before the @ sign). new_password string New password of Mailname. new_password_is_cry pted boolean Whether the password is passed in the encrypted form (DES or BSD MD5). There are the following possible values: 0 - password is passed in the plain text form. 1 - password is passed in the encrypted form.

Public API Reference 203 The method has no output parameters. Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions. pem.spam_assassin.additems This method is supported by POA starting from version 5.0 This method adds e-mail addresses into the white or black list of QMail Mailbox, which is protected by the SpamAssassin service. login string Login name of Service User, which is an owner of the QMail Mailbox. This parameter specifies the required QMail Mailbox. list string This parameter defines the list, where the e-mail addresses are added. There are the following options: items array of strings The method has no output parameters. white - white list of senders, black - black list of senders. List of e-mail addresses. Notes: 1. The wildcards? and * can be used. For instance: *@example.com 2. When e-mail address is added into one list, this e- mail address is removed from another list. pem.spam_assassin.deleteitems This method is supported by POA starting from version 5.0 This method removes e-mail addresses from the white or black list of QMail Mailbox, which is protected by the SpamAssassin service. login string Login name of Service User, which is an owner of the QMail Mailbox. This parameter specifies the required QMail Mailbox.

204 Parallels Operations Automation 5.0 Parallels list string This parameter defines the list, from which the e- mail addresses are removed. There are the following options: items array of strings The method has no output parameters. white - white list of senders, black - black list of senders. List of e-mail addresses. pem.spam_assassin.getitems This method is supported by POA starting from version 5.0 This method returns e-mail addresses from the white or black list of QMail Mailbox, which is protected by the SpamAssassin service. login string Login name of Service User, which is an owner of the QMail Mailbox. This parameter specifies the required QMail Mailbox. list string This parameter defines the list for which the e-mail addresses are returned. There are the following options: The method has the following output parameters: white - white list of senders, black - black list of senders. items array of strings List of e-mail addresses.

Public API Reference 205 Resource Accounting This functional group allows to manage Resource Types, Resources Limits, and retrieve resource usage statistics pem.addresourcetype This method is supported by POA starting from version 2.6.3. This method allows to add new Resource Type into system. resclass_name string Name of the Resource Class to base new Resource Type name string Name of the new Resource Type [descr] string New Resource Type description [attrs] array of string Attributes to attach to new Resource Type [act_params] array Resource Type Activation Parameters var_name string Name of the Activation Parameter var_value string Activation Parameter value The method has the following output parameters: resource_type_id int ID of the created Resource Type

206 Parallels Operations Automation 5.0 Parallels pem.addresourcetypetoservicetemplate This method is supported by POA starting from version 2.6.5 This method adds certain Resource Type to Service Template. owner_id int ID of account on whose behalf the operation will be performed st_id int ID of the Service Template to add the Resource Type [source_sub_id] int The source subscription containing Resource Type. There may be cases when owner of a Service Template is subscribed to more than one subscription that contain the specified Resource Type. In order to resolve this ambiguity one should specify source_sub_id parameter designating concrete subscription to take resource from. rt_id int ID of the resource Type to be added This method has no output parameters. pem.getresourceusage This method is supported by POA starting from version 2.3. This method returns the limits and up-to-date usage statistics for Resource Types within the specified Subscription. subscription_id int ID of Subscription. It indicates the Subscription the resource usage is returned for. resource_type_ids array of int IDs of Resource Types. It contains IDs of Resource Types the resource usage is requested for. The method has the following output parameters: subscription_id int ID of Subscription. It indicates the Subscription the resource usage is returned for.

Public API Reference 207 resource_type_usages array of struct Resource Types usage statistics. It contains resource usages for each requested Resource Type. resource_type_id int Resource Type ID. It indicates the Resource Type the usage statistics is returned for. usage int It represents the absolute value of resource s usage at the moment defined by the last_checkpoint parameter. The usage is specified in units the Resource Type is measured in. usage64 bigint 64bit analog of the usage parameter. limit bigint Resource Type limit defined in the Subscription. Note: -1 value means that resource's usage is not limited. last_checkpoint int It indicates the point in time when the usage of the resource was measured last time. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). See also: pem.getresourceusageforperiod method (on page 208). pem.getcustomersubscriptionsresources This method is supported by POA starting from version 2.9 hotfix01. This method returns the limits and up-to-date usage statistics for Resource Types of the specified vendor's Account (Provider's or Reseller's Account). vendor_account_id int Vendor's Account ID (ID of Provider's or Reseller's Account). resource_type_ids array of int IDs of Resource Types. It contains IDs of Resource Types the resource usage is requested for. The method returns array of the following structures: account_id int ID of direct child Account (ID of Reseller's or Customer's Account). resources array of struct Resource Types usage statistics for each Subscription of direct child Account.

208 Parallels Operations Automation 5.0 Parallels subscription_id int ID of Subscription where the requested Resource Types are resides. resource_type_usag es array of struct Resource Types usage statistics. It contains resource usages for each requested Resource Type in Subscription identified by the subscription_id parameter. resource_type_i d int Resource Type ID. It indicates the Resource Type the usage statistics is returned for. usage int It represents the absolute value of resource s usage at the moment defined by the last_checkpoint parameter. The usage is specified in units the Resource Type is measured in. usage64 bigint 64bit analog of the usage parameter. limit bigint Resource Type limit, which is defined in the Subscription identified by the subscription_id parameter. Note: -1 value means that resource's usage is not limited. last_checkpoint int It indicates the point in time when the usage of the resource was measured last time. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). pem.getresourceusageforperiod This method is supported by POA starting from version 2.3. This method returns usage statistics for Resource Types within the specified Subscription for a given period of time. It is complimentary to the pem.getresourceusage method (on page 206). subscription_id int ID of Subscription. It indicates the Subscription the resource usage is returned for. resource_type_ids array of int IDs of Resource Types in request. from_time int It indicates the start time of the period the resource usage is returned for. Must be specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format).

Public API Reference 209 to_time int It indicates the end time of the period the resource usage is returned for. Must be specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). The method has the following output parameters: resource_type_usages array of struct It contains resource usages for each requested Resource Type. usage_statistics struct The usage statistics for Resource Type identified by the resource_type_id parameter. n/a array of struct It contains the information on changes of resource's usage. delta int It contains the actual change of the resource s usage. The value of the change may be negative depending on the Resource Type. delta64 bigint 64bit analog of the delta parameter. time int It indicates the point in time when the usage of the resource was changed. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). parent_resource _type_id int It indicates the parent Resource Type of the Resource Type the usage statistics is returned for. This value can be used to group usage statistics for related Resource Types. initial_usage int It represents the absolute value of resource s usage at the start of the requested period. The usage is specified in units the Resource Rype is measured in. resource_type_i d int It indicates the Resource Type the usage statistics is returned for. initial_usage64 bigint 64bit analog of the initial_usage parameter. actual_period struct It indicates the actual period the resource usages are returned for. For the description of what the actual period is, see the note below.

210 Parallels Operations Automation 5.0 Parallels from_time int It indicates the actual start time of the period the resource usages are returned for. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). to_time int It indicates the actual end time of the period the resource usages are returned for. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). Note: The caller may request usage statistics for a period of time for which there are no statistics in the system at all or there exist statistics for a part of the requested period only. The actual_period returned parameter serves the purposes to address such situations. Depending on the values of input from_time and to_time parameters and the period of time for which the statistics exist in the system, the actual_period returned parameter can take values described in the table below. from_time in history from_time in history from_time > history_end & & & actual_period to_time in history to_time > history_end to_time > history_end from_time from_time from_time history_end to_time to_time history_end history_end Here "history_end" represents the point time when the given request for statistics is served (current time at callee side). "in history" means point in time that is earlier than "history_end". See also: pem.getresourceusage method (on page 206). pem.resetresourceusage (internal) This method is supported by POA starting from version 2.3. This internal method resets the usage counter in POA for specified resource types under the given subscription. subscription_id int Indicates the Subscription, which the resource usage is reset for.

Public API Reference 211 resource_type_ids array (int) Contains IDs of Resource Types, which the resource usage is reset for. The method has no output parameters. pem.setresourcetypelimit This method is supported by POA starting from version 2.6.1 This method sets limits on a Resource Type within given Subscription. subscription_id int ID of the Subscription resource_type_id int ID of the Resource type [limit] int New Resource Type limit. Note: Use -1 value to make a resource unlimited. [limit64] bigint 64bit analog of the limit parameter; has higher priority. Note: Use -1 value to make a resource unlimited. [autoprovide] boolean If the actual provisioning/un-provisioning should proceed If autoprovide flag is set to 1 (true), than the method performs the following additional tasks: If a particular resource either added or changed its limit from zero to any non-zero value, then it will be auto-provided. If limit of a particular resource is changed from non-zero value to zero, then it will be automatically un-provided. Note: POA does not allow to set the limit lower than usage of Resource, method returns an error in such case. Note: POA resource type structure has a tree-like form, so auto-provisioning of leaf resources is impossible without provisioning of root ones. Be aware of what resources to send with this method to get predictable results.

212 Parallels Operations Automation 5.0 Parallels pem.setresourcetypelimits This method is supported by POA starting from version 2.6.1 The pem.setresourcetypelimits method is responsible for changing limits of set of Resource Types in a specific Subscription. This method also can control resource provisioning status according to their new limits. subscription_id int Subscription ID [autoprovide] boolean If the actual provisioning/un-provisioning should proceed. resource_limits array of structs

Public API Reference 213 resource_type_id int Resource Type ID. limit bigint New limit for specific Resource Type. This method has no output parameters. Note: Use -1 value to make a resource unlimited. The method can include new resource types into current subscription's resource type tree. If autoprovide flag is set to 1 (true), than the method performs the following additional tasks: If a particular resource either added or changed its limit from zero to any non-zero value, then it will be auto-provided. If limit of a particular resource is changed from non-zero value to zero, then it will be automatically un-provided. Note: POA does not allow to set the limit lower than usage of Resource, method returns an error in such case. Note: POA resource type structure has a tree-like form, so auto-provisioning of leaf resources is impossible without provisioning of root ones. Be aware of what resources to send with this method to get predictable results. pem.setrtattributes This method is supported by POA starting from version 2.6.3. This method allows to add new Attributes to the Resource Type. rt_id int ID of the Resource Type to add/replace Attribute(s) attr array of string This method has no output parameters. New Attributes to add to Resource Types

214 Parallels Operations Automation 5.0 Parallels pem.statistics.getstatisticsreport This method is supported by POA starting from version 5.0 This method returns resource usage reports. The table below provides a list of the available reports. Report Name poaversion ADSync totaldomains parkeddomains domainslinux Description POA version Example of the report: name: poaversion value: 5.0 Total amount of enabled 'Active Directory Synchronization' services. Example of the report: name: Active Directory Synchronization value: 1000 Total number of active domains (domains are in the Enabled state in POA) Example of the report: name: totaldomains value: 1000 Total number of parked domains. Domain is included into the report when the following conditions are satisfied: DNS Hosting only is installed on domain OR DNS Hosting and Domain Parking Hosting only are installed on domain Example of the report: name: parkeddomains value: 1000 Total number of domains with Linux-based Hostings. Domain is included into the report when the following conditions are satisfied: Domain has one or more Linux-based Hostings installed AND Domain has no Windows-based Hostings installed Example of the report: name: domainslinux value: 1000

Public API Reference 215 Report Name domainswindows mailboxeslinux mailboxeswindows PPPServersLinux PPPServersWindows PVCServersLinux PVCServersWindows Description Total number of domains with Windows-based Hostings. Domain is included into the report when the following conditions are satisfied: Domain has one or more Windows-based Hostings installed AND Domain has no Linux-based Hostings installed Example of the report: name: domainswindows value: 1000 Total number of CQMail Mailboxes Example of the report: name: mailboxeslinux value: 1000 Total number of Exchange Mailboxes Example of the report: name: mailboxeswindows value: 1000 Total number of Parallels Plesk Panel Servers on Linux (Parallels Plesk Panel is installed on Hardware Node or VPS) Example of the report: name: PPPServersLinux value: 1000 Total number of Parallels Plesk Panel Servers on Windows (Parallels Plesk Panel is installed on Hardware Node or VPS) Example of the report: name: PPPServersWindows value: 1000 Total number of Linux-based VPS Hardware Nodes Example of the report: name: PVCServersLinux value: 1000 Total number of Windows-based VPS Hardware Nodes Example of the report: name: PVCServersWindows value: 1000

216 Parallels Operations Automation 5.0 Parallels Report Name PVCContainersLinux PVCContainersWindows PSBSitesLinux PSBSitesWindows Resellers ActiveAccounts ActiveSubscriptions Domains Description Total number of Linux-based VPSs (Shared or Dedicated) Example of the report: name: PVCContainersLinux value: 1000 Total number of Windows-based VPSs (Shared or Dedicated) Example of the report: name: PVCContainersWindows value: 1000 Total number of Linux-based Parallels Plesk Sitebuilder Sites Example of the report: name: PSBSitesLinux value: 1000 Total number of Windows-base Parallels Plesk Sitebuilder Sites Example of the report: name: PSBSitesWindows value: 1000 Total number of active Reseller Accounts (accounts are in the Enabled state in POA) Example of the report: name: Resellers value: 1000 Total number of active Accounts (accounts are in the Enabled state in POA) Example of the report: name: Active accounts value: 1000 Total number of active Subscriptions (Subscriptions are in the Enabled state in POA) Example of the report: name: Active subscriptions value: 1000 Total number of active domains (domains are in the Enabled state in POA) Example of the report: name: Domains value: 1000

Public API Reference 217 Report Name DomainsWithParkingHosting DomainsWithSH DomainsWithWSH ExchangeMailboxes QmailMailboxes Description Total number of parked domains. Domain is included into the report when the following conditions are satisfied: Domain Parking Hosting only is installed on domain OR Domain Parking Hosting and Linux-based/Windows-based Hostings are installed on domain Example of the report: name: Parked domains value: 1000 Total number of domains with Linux-based Hostings. Domain is included into the report when the following conditions are satisfied: Domain has one or more Linux-based Hostings installed OR Linux-based Hostings and Windows-based Hostings are installed on domain Example of the report: name: Domains (with shared hosting) value: 1000 Total number of domains with Windows-based Hostings. Domain is included into the report when the following conditions are satisfied: Domain has one or more Windows-based Hostings installed OR Domain has Windows-based Hostings and Linux-based Hostings installed Example of the report: name: Domains (Windows Shared) value: 1000 Total number of Exchange Mailboxes Example of the report: name: Mailboxes (Hosted Exchange) value: 1000 Total number of CQMail Mailboxes Example of the report: name: Mailboxes (Qmail) value: 1000

218 Parallels Operations Automation 5.0 Parallels Report Name WSSUsers SBPublishedSites ServersWeb Description Total number of SharePoint users Example of the report: name: SharePoint Users value: 1000 Total number of published Parallels Plesk Sitebuilder sites Example of the report: name: SiteBuilder (Published Sites) value: 1000 Total number of web servers (VPSs and Hardware Nodes). Server is included into the report when the following conditions are satisfied: IIS service is installed on server and there are more than 5 IIS Web Hostings provided by this service OR WinFileManager service is installed on server and there is one or more webspaces served by this service OR Apache service is installed on server and there are more than 5 Apache Web Hostings provided by this service OR AWStats service is installed on server OR Urchin service is installed on server Note: If one or more different (by type) services are installed on the same server, it is included into the report only once. Example of the report: name: Servers (Web) value: 1000

Public API Reference 219 Report Name ServersMail ServersDB ExchangeLight Description Total number of mail servers (VPSs and Hardware Nodes). Server is included into the report when the following conditions are satisfied: clustered-qmail service is installed on server OR DrWeb daemon service is installed on server OR SpamAssassin service is installed on server and there is one or more Mailboxes protected by this service Notes: 1. If one or more different (by type) services are installed on the same server, it is included into the report only once. 2. If QMail is deployed in the cluster mode, each cluster node is included into the report. Example of the report: name: Servers (Qmail) value: 1000 Total number of database servers (VPSs and Hardware Nodes). Server is included into the report when the following conditions are satisfied: MySQL service is installed on server and there is one or more customer databases hosted by this service OR PgSQL service is installed on server and there is one or more customer databases hosted by this service OR MS SQL service is installed on server and there is one or more customer databases hosted by this service Note: If one or more different (by type) services are installed on the same server, it is included into the report only once. Example of the report: name: Servers (databases) value: 1000 Total number of Exchange Mailboxes where the MAPI protocol is in the disabled state (Outlook access is in the disabled state in CCP). Example of the report: name: Exchange Light value: 1000

220 Parallels Operations Automation 5.0 Parallels Report Name ExchangeFull Description Total number of Exchange Mailboxes where the MAPI protocol is in the enabled state (Outlook access is in the enabled state in CCP). Example of the report: name: Exchange Full value: 1000

Public API Reference 221 Report Name VPSDistribution Description This report provides information how VPSs are distributed on VPS Hardware Nodes according to specified thresholds. Thresholds are defined in the following format: number1,...,numbern There are the following intervals: [0,number1], (number1,number2],...,(numbern,infinity). For example: when 5 and 10 thresholds are defined, there are the following intervals: [0,5], (5,10], (10,infinity). Example of the report for 5 and 10 thresholds: name: 10 VZ VPS value: 13 - the total number of VPSs distributed among VPS Hardware Nodes of Total VZ servers with up to 10 VZ VPS class name: 5 VZ VPS value: 9 - the total number of VPSs distributed among VPS Hardware Nodes of Total VZ servers with up to 5 VZ VPS class name: >10 VZ VPS value: 35 - the total number of VPSs distributed among VPS Hardware Nodes of Total VZ servers with more than 10 VZ VPS class name: Total VZ servers with more than 10 VZ VPS value: 1 - total number of VPS Hardware Nodes where a number of VPSs > 10 name: Total VZ servers with up to 10 VZ VPS value: 2 - total number of VPS Hardware Nodes where a number of VPSs > 5 and number of VPSs <= 10 name: Total VZ servers with up to 5 VZ VPS value: 7 - total number of VPS Hardware Nodes where a number of VPSs <= 5 Note: Thresholds are mandatory report's parameters. VPSLinuxNoPlesk Total number of Linux-based VPSs without Parallels Plesk Panel Example of the report: name: Active Linux VPSes without Plesk value: 1000

222 Parallels Operations Automation 5.0 Parallels Report Name VPSWindowsNoPlesk VPSLinuxPlesk VPSWindowsPlesk SPLA Description Total number of Windows-based VPSs without Parallels Plesk Panel Example of the report: name: Active Windows VPSes without Plesk value: 1000 Total number of Linux-based VPSs with Parallels Plesk Panel Example of the report: name: Active Linux VPSes with Plesk value: 1000 Total number of Windows-based VPSs with Parallels Plesk Panel Example of the report: name: Active Windows VPSes with Plesk value: 1000 Exchange SPLA report (at the beginning of the current month) Example of the report: name: Hosted Exchange Basic SAL value: 10 name: Hosted Exchange Enterprise Plus SAL value: 20 name: Hosted Exchange Enterprise SAL value: 30 name: Hosted Exchange Standard Plus SAL value: 40 Blackberry name: Hosted Exchange Standard SAL value: 50 Total usage of Blackberry resource Example of the report: name: Blackberry value: 1000

Public API Reference 223 Report Name Goodlink MessageLabs GlobalRelay OCS OCS-Users OCS-Phones OCS-LocationProfiles OCS-UsersStandard Description Total usage of Good Mobile Messaging resource Example of the report: name: GoodLink value: 1000 Total usage of MessageLabs resource Example of the report: name: MessageLabs value: 1000 Total usage of Global Relay Archiving resource Example of the report: name: GlobalRelay value: 1000 Total number of OCS organizations in enabled subscriptions (active OCS organizations). Example of the report: name: Office Communications: Organizations value: 1000 Total number of enabled OCS users in active OCS organizations. Example of the report: name: Office Communications: Users value: 1000 Total number of OCS phones attached to active OCS organizations. Example of the report: name: Office Communications: Phone Numbers value: 1000 Total number of location profiles in active OCS organizations. Example of the report: name: Office Communications: Location Profiles value: 1000 Total number of enabled standard OCS users in active OCS organizations. Example of the report: name: Office Communications: Standard Users value: 1000

224 Parallels Operations Automation 5.0 Parallels Report Name OCS-UsersEnterprise OCS-UsersEnterpriseVA Description Total number of enabled enterprise OCS users in active OCS organizations. Example of the report: name: Office Communications: Enterprise Users value: 1000 Total number of enabled enterprise OCS users with voice access of any type in active OCS organizations. Example of the report: name: Office Communications: Enterprise Users with Voice value: 1000 Notes: 1. Resource usage is returned for active Subscriptions only (Subscriptions are in the Enabled state in POA). 2. There are the following Linux-based Hostings: Apache Web Hosting, Separate oscommerce Hosting, and CQMail Hosting. 3. There are the following Windows-based Hostings: IIS Web Hosting, Exchange Hosting, and SharePoint Services Hosting. 4. Each POA Hosting Module provides a set of reports. When a report is requested for notinstalled Hosting Module, POA returns empty result for this report. 5. The ability to request several reports with equal names is not supported. reports array of struct List of reports to produce

Public API Reference 225 name string Name of report value string Report's parameters, which can be specified in the following formats: The method returns the array of the following structures: ParameterName1=Value1, ParameterName2=Value2, etc. ParameterValue1, ParameterValue2, etc. Note: The list of parameters depends on report. name string Name of report value string Resource usage pem.uploadlicense This method is supported by POA starting from version 5.0 This method installs Open Fusion license into POA. If license with the same key ID exists in POA, it is replaced with the new one. license base64 The content of the license This method has no output parameters.

226 Parallels Operations Automation 5.0 Parallels Service Template Management This functional group allows to manage Service Templates. pem.activatest This method is supported by POA starting from version 2.6.4 This method allows to activate a Service Template. st_id int ID of the Service Template to activate The method has no output parameters. See also pem.deactivate.st (on page 227). pem.addservicetemplate This method is supported by POA starting from version 2.6.3. This method allows to create new Service Template. owner_id int Specifies the ID of the owner of the new Service Template. name string Name of the new Service Template. [descr] string Description of the new Service Template. resources array of struct Array of resources, which are included to Service Template.

Public API Reference 227 resource_type_id int ID of Resource Type. [subscription_id] int ID of the Subscription to take the Resource Types from. The method has the following output parameters: st_id int ID of the created Service Template pem.cloneservicetemplate This method is supported by POA starting from version 5.0 This method creates a copy of Service Template. service_template_id int ID of the original Service Template. name string Name of new Service Template. [description] string Description of new Service Template. This parameter is optional. If the parameter is omitted, the description of the original Service Template is used. The method has the following output parameters: st_id int ID of new Service Template. pem.deactivatest This method is supported by POA starting from version 2.6.4 This method allows to deactivate a Service Template. st_id int ID of the Service Template to deactivate

228 Parallels Operations Automation 5.0 Parallels The method has no output parameters. See also pem.activate.st (on page 226). pem.getservicetemplate This method is supported by POA starting from version 2.6.1 The pem.getservicetemplate allows to retrieve information about specific POA Service Template. st_id int Service Template ID. get_resources boolean If method should return ST resources along with general information. [get_full_info] boolean If one specifies get_full_info together with get_resources parameters and set them to 1 (true), then additional information about Resource Types that included into Service Template would be returned. Namely, Provisioning Attributes and Activation Parameters (both Resource Type and Service Template specific). Important Note: pem.getservicetemplate being called with get_full_info parameter may consume significantly more time to be executed because of lot of loop calls. It should be rarely called this way. Only if someone actually needs comprehensive information about Service Template contents. This method has the following output parameters: st_id int Service Template ID. version int Service Template version. name string Service Template name. owner_id int ID of Account that own the Service Template. is_active boolean Is Service Template active (can be subscribed). autoprovidable boolean Is the Subscription based on this Service Template can be auto-provided?

Public API Reference 229 [resource_types] array of structs name string Name of Resource Type. resource_type_id int ID of the Resource Type. [parent_resource _type_id] int ID of parent Resource Type (if any). measurement_unit string Unit that used for measurement of resource quantity. limit bigint Limit set for specific Resource Type. [usage] bigint Current usage of the Resource Type. [attributes] array of strings [act_params] array of strings Provisioning Attributes attached to this Resource Type. Activation Parameters of this Resource Type. var_name string Name of the Activation Parameter. var_value string Activation Parameter value. [st_act_params] array of strings Service Template Activation Parameters. var_name string Name of the Service Template Activation Parameter. var_value Value of the Service Template Activation Parameter. The resource_types output parameter will be present only if get_resources input parameter is set to 1 (true). Note: POA Resource Types are organizing tree-like structure. The pem.getservicetemplate method returns plain list of Resource Types in a sake of simplicity. However, the actual resource type tree can be reproduced using parent_resource_type_id member. pem.setstactivationparams This method is supported by POA starting from version 2.6.3. This method allows to set Service Template specific Resource Type Activation Parameters. st_id int ID of the Service Template res_act_params array

230 Parallels Operations Automation 5.0 Parallels rt_id int ID of the Resource Type to set Activation Parameters to. act_params array var_name string Activation parameter name var_value string Activation Parameter value pem.setstrtlimits This method is supported by POA starting from version 2.6.3. This method sets Resource Type limits at Service Template level. st_id int ID of Service Template limits array of struct resource_id int Resource Type ID [resource_limit] int New limit for specific Resource Type. Note: Use -1 value to make a resource unlimited. [resource_limit64] bigint New limit for specific Resource Type (64bit analog of the limit parameter). This method has no output parameters. Note: Use -1 value to make a resource unlimited.

Public API Reference 231 Provisioning Attributes Management This functional group allows to manage Provisioning Attributes. pem.addprovisioningattributes This method is supported by POA starting from version 2.6.3 This method adds Provisioning Attributes to specific POA Account. If account_id is not specified, then the Provisioning Attributes would be added to the Provider's Account. [account_id] int ID of the account to add the Provisioning Attributes to. attrs array of string name string Attribute name. descr string Attribute description. pem.getprovisioningattributes This method is supported by POA starting from version 2.6.3 This method returns the list of Provisioning Attributes created under specific POA Account. If account_id is not specified, then the Provider's Provisioning Attributes would be returned. [account_id] int ID of the account to get the Provisioning Attributes The method has the following output parameters: attrs array of string

232 Parallels Operations Automation 5.0 Parallels name string Attribute name descr string Attribute description pem.sethostattributes This method is supported by POA starting from version 2.6.3 This method sets Provisioning Attributes to specific POA host. host_id int ID of the host to set attributes to attr array of string pem.unsethostattributes This method is supported by POA starting from version 2.6.3 This method removes Provisioning Attributes from specific POA host. host_id int ID of the host to set attributes to attr array of string

Public API Reference 233 IP Pools Management This functional group allows to manage IP Pools. pem.assignippool This method is supported by POA starting from version 2.6.5. This method assigns IP Pool to specific account. account_id int ID of the account to assign IP Pool to pool_id int ID of the Pool to be assigned The method has no output parameters. See also pem.revokeippool (on page 235). pem.attachippool This method is supported by POA starting from version 2.6.3. This method attaches IP Pool to specific host. pool_id int ID of the Pool to attach to the host host_id int ID of the host to attach the IP Pool to The method has no output parameters.

234 Parallels Operations Automation 5.0 Parallels pem.bindippool This method is supported by POA starting from version 2.6.3. This method binds IP Pool to specific host net interface. pool_id int ID of the Pool to bind to the host interface_id int POA Network interface on POA Node identifier The method has no output parameters. pem.createippool This method is supported by POA starting from version 2.6.3. This method creates IP Pool. name string Name of the new IP Pool startip string IPv4 initial IP address endip string IPv4 final IP address netmask string IPv4 netmask [sharing] string Availability of the IP addresses from this IP Pool for. The possible values are the following: 'c' - Customers only 'o' - Owner only 'n' - Specified Customers 'a' - Everyone The method has the following output parameters: If this parameter is not specified, then the IP Pool is available for everyone. pool_id int ID of the created IP Pool

Public API Reference 235 pem.detachippool This method is supported by POA starting from version 2.6.3. This method detaches IP Pool from host. pool_id int ID of the Pool host_id int ID of the host The method has no output parameters. pem.revokeippool This method is supported by POA starting from version 2.6.5. This method revokes IP Pool from specific account. account_id int ID of the account to revoke IP Pool from pool_id int ID of the Pool to be revoked The method has no output parameters. See also pem.assignippool (on page 233). pem.unbindippool This method is supported by POA starting from version 2.6.3. This method unbinds IP Pool from host net interface. pool_id int ID of the Pool to unbind from the host host_id int ID of the host to unbind the IP Pool from The method has no output parameters.

236 Parallels Operations Automation 5.0 Parallels Native Package Management pem.packaging.native_repository.createrepository This method is supported by POA starting from version 2.6. This method allows to create new native repository. repo_type struct The structure that defines the type of packages that will be stored within repository. arch string Hardware architecture, eg. i386 opsys string Name of operating system osrel string Version of operating system pkg_manager int Native package manager's ID: 0-YUM [host_id] int If this parameter is specified, the manageable native repository will be created on particular POA host. [is_local] boolean This parameter determines whether manageable repository is the local one or is hosted by PPM Mirror. [url] string This parameter specifies either the URI of external repository or the path for local repository. The method has the following output parameters: repo_id int ID of created native repository url string The URL of the repository is_created boolean Defines wether all background work related to creating native repository is finished. is_ready boolean Defines whether native repository has been ever reindexed or it is external one.

Public API Reference 237 pem.packaging.native_repository.getrepository This method is supported by POA starting from version 2.6. This method returns all the information necessary to connect to specific native repository. repo_id int ID of particular native repository This method has the following output parameters: repo_id int ID of particular native repository url string The URL of the requested repository is_created boolean Defines wether all background work related to creating native repository is finished. is_ready boolean Defines whether native repository has been ever reindexed or it is external one. pem.packaging.native_repository.reindex This method is supported by POA starting from version 2.6. This method re-creates package manager's specific database within the repository. In case of YUM, this method causes the calling of "yum-arch" or "createrepo" utility depending on YUM version installed on host. One must call this method (or its UI analog) each time when the actual content of repository is changed. repo_id int ID of particular native repository This method has no output parameters.

238 Parallels Operations Automation 5.0 Parallels pem.packaging.native_repository.removerepository This method is supported by POA starting from version 2.6. This method causes the removal of native repository. repo_id int ID of particular native repository This method has no output parameters. Branding Management pem.branddomain This method is supported by POA starting from version 2.6. This method creates a Brand on the existing Domain. domain_name string Name of the existing domain with apache server hosting to create branding for. [brand_subscription _id] int Subscription ID. This parameter defines the Subscription, which contains the Resource Type created on the basis of the Branding access points Resource Class. It is optional parameter. If parameter is not specified, the required Subscription is chosen by POA. [brand_name] string Name of the brand to be created. If not issued, brand name will be the same as the name of the domain. [path_prefix] string This prefix will be added to the branded URL path. For example, http://mydomain.com/path_prefix/. If not issued, no prefix will be added.

Public API Reference 239 [logo_url] string The URL of the logo to be inserted to the control panel. If not issued, the default logo will be used. [skin] string Name of the skin to be installed to control panels. If not issued, the default skin will be used. [access_type] string Access type to the branded domain. There are the following options: s - stands for SSL access h - non-ssl b - will provide both access types [skin_editable] boolean The parameter determines whether the skin can be customized. If not issued, skin editing will not be allowed. [has_bm] boolean The parameter determines whether Billing Manager is installed. [shop_id] int The ID of the PBA Online Store. If not issued, the Online Store will not be created. Note: Starting from POA 2.9, method creates Brand with SSL access type only and the access_type parameter is deprecated (parameter is ignored, if it is passed). This method has no output parameters. pem.getdomainsforbrandcreation This method is supported by POA starting from version 5.0 This method returns the list of Domains, which can be used for branding. account_id int Account ID (ID of Provider's or Reseller's Account) The method returns array of the following structures: name string Name of Domain domain_id int ID of Domain

240 Parallels Operations Automation 5.0 Parallels pem.unbranddomain This method is supported by POA starting from version 2.6. This method removes the branding from the existing domain. domain_name string Name of the existing domain to remove the branding from. Parallels Plesk Panel Management pem.installplesklicense This method is supported by POA starting from version 2.6.5 This method allows to install Parallels Plesk Panel license or license of service managed by Parallels Plesk Panel. subscription_id int The ID of the Subscription, which the Parallels Plesk Panel in VPS is provisioned under. license base64 The content of the license. [async] boolean Whether to perform license installation asynchronously. There are the following options: 0 - Install a license synchronously. 1 - Install a license asynchronously. If parameter is not set, 0 (false) value is used by default. Note: If POA is integrated with PBA and the method is executed asynchronously, then POA notifies PBA about the result of installing a license using PBA Public API (POA does not check that PBA is a caller of this method). If you wish to install a license using this method directly (not through PBA Control Panel), execute it synchronously (async = 0).

Public API Reference 241 [is_addon] boolean Defines the type of the license: This method has no output parameters. 0 - Parallels Plesk Panel license. 1 - License of service managed by Parallels Plesk Panel. If parameter is not set, 0 (false) value is used by default. pem.revokeplesklicense This method is supported by POA starting from version 2.6. This method allows to revoke Parallels Plesk Panel license. subscription_id int The ID of the Subscription, which the Parallels Plesk Panel in VPS is provisioned under. [async] boolean Whether to perform license uninstallation asynchronously. There are the following options: This method has no output parameters. 0 - Uninstall a license synchronously. 1 - Uninstall a license asynchronously. If parameter is not set, 0 (false) value is used by default. Parallels Virtuozzo Containers Management This functional group allows to manage Parallels Virtuozzo Containers. pem.virtuozzo.attachvps This method is supported by POA starting from version 2.6.5 This method allows to attach VPS to the specified Customer's Subscription. vps_host_id int The host ID of VPS. subscription_id int The ID of Customer's Subscription.

242 Parallels Operations Automation 5.0 Parallels [plesk_admin_passwo rd] string Parallels Plesk Panel administrator password. If Parallels Plesk Panel is installed to VPS, this parameter should be specified. This method has no output parameters. pem.virtuozzo.importtemplate This method is supported by POA starting from version 2.6.3. This method allows to import Parallels Virtuozzo Containers Template. platform string Platform identification. There are the following options: Linux - Linux platform, url string Template URL Output parameter: Windows - Windows platform. template_id int Template ID in POA pem.virtuozzo.installtemplate This method is supported by POA starting from version 2.6.3. This method allows to install Parallels Virtuozzo Containers Template on the specified VPS. template_id int Template ID in POA vps_id int VPS ID to install the Template to The method has no output parameters.

Public API Reference 243 pem.virtuozzo.installtemplates This method is supported by POA starting from version 5.0 This method allows to install Parallels Virtuozzo Containers Templates on the specified VPS. vps_id int ID of VPS, where the PVC Templates are installed. template_ids array of int IDs of PVC Templates, which are installed on the specified VPS. The method has no output parameters. pem.virtuozzo.updateeztemplates This method is supported by POA starting from version 5.0 This method allows to update the specified Parallels Virtuozzo Containers EZ Templates on the required VPS. vps_id int ID of VPS, where the specified PVC EZ Templates are updated. template_ids array of int Template IDs. The method has no output parameters.

244 Parallels Operations Automation 5.0 Parallels pem.virtuozzo.removetemplates This method is supported by POA starting from version 5.0 This method removes the specified Parallels Virtuozzo Containers Templates from POA. PVC Template is removed in the following way: 1 If the Template is installed on VPSs, POA schedules tasks, which remove the Template from the VPSs. 2 If the Template is installed on VPS Hardware Nodes, POA schedules tasks, which remove the Template from the VPS Hardware Nodes. 3 When the Template is removed from VPSs and VPS Hardware Nodes, this Template is removed from POA. template_ids array of int Template IDs The method has no output parameters. pem.virtuozzo.registerhwnode This method is supported by POA starting from version 2.7 This method allows to register VPS Hardware Node in POA. node struct [sub_id] int The ID of Subscription which will be used for VPS Hardware Node registration. Provider Account's Subscription with ID = 1 is used by default. rt_id int The ID of Resource Type which will be used for VPS Hardware Node registration. This Resource Type should be based on the VPS Hardware Nodes Resource Class. pool_id int IP Pool which will be used to obtain an IP Address for POA Agent VPS. ip_address string Service VPS IP Address. passwd string vzagent0 user's password.

Public API Reference 245 The method has the following output parameters: host_id int The host ID of registered VPS Hardware Node. Hardware Node Management pem.registersharednode This method is supported by POA starting from version 5.0 This method allows to register Linux-based Hardware Node in POA. host string BackNet IP Address or hostname of Hardware Node. Important: The specified hostname should be resolved via DNS to the BackNet IP Address of the Hardware Node. login string Login of the root or non-privileged user, which is used for Hardware Node registration. [private_key] struct SSH Private Key for SSH Public-Key Authentication. key base64 SSH Private Key password string Password of SSH Private Key. Don't specify this parameter, if SSH Private Key is not protected by password. [password] string Password of the root or non-privileged user for Password-Based Authentication. [resource_type_id] int ID of Resource Type, which is created on the basis of the Hardware nodes Resource Class. It is optional parameter. If the parameter is omitted, the Resource Type is automatically found by POA. [new_hostname] string Custom hostname for Hardware Node. It is optional parameter. If it is specified, the Hardware Node is registered with custom hostname and this hostname is displayed in POA Control Panel.

246 Parallels Operations Automation 5.0 Parallels [network_config] struct Network configuration of Hardware Node. It is optional parameter. If it is not specified, the Communication and Shared IP Addresses are automatically found by POA. communication_ip string This parameter defines the Hardware Node's IP Address, which is used as Communication IP Address. shared_ip string This parameter defines the Hardware Node's IP Address, which is used as Shared IP Address. Note: The private_key and password optional parameters are mutually exclusive. If SSH Public-Key Authentication is used, the private_key parameter should be specified. If Password-Based Authentication is used, the password parameter should be specified. The method has the following output parameters: host_id int Host ID of the registered Hardware Node. Application Management This functional group allows provider to manage Applications. Note: Application is packaged with the using of the APS standard. Refer to the http://www.apsstandard.org website to obtain the detailed information about the APS standard. pem.aps.getapplicationinstance This method is supported by POA starting from version 2.9 hotfix01 This method returns the list of properties of the specified Application Instance. application_instanc e_id int Application Instance ID

Public API Reference 247 The method has the following output parameters: application_instanc e_id int Application Instance ID application_id int Application ID package_version string Version of Application url string URL of Application Instance status string Status of Application Instance. There are the following options: rt_id int Resource Type ID Provisioning - Application Instance is installing. Provisioning Service - Service of Application Instance is installing. Ready - Application Instance is installed. Backing Up - Backup operation for Application Instance is in progress. Restoring - Restore operation for Application Instance is in progress. Configuring Service - Service of Application Instance is configuring. Upgrading - Upgrade operation for Application Instance is in progress. Disabling Service - Disable Service of Application Instance operation is in progress. Disabled - Application Instance is disabled. Enabling Service - Enable Service of Application Instance operation is in progress. Unprovisioning Service - Remove Service of Application Instance operation is in progress. Unprovisioning - Remove Application Instance operation is in progress.

248 Parallels Operations Automation 5.0 Parallels pem.aps.getapplicationinstancesettings This method is supported by POA starting from version 2.9 hotfix01 This method returns the list of Application Instance settings. application_instanc e_id int The method returns array of structures: Application Instance ID name string Name of Application Instance setting value string Value of Application Instance setting pem.aps.getapplicationsettings This method is supported by POA starting from version 2.9 hotfix01 This method returns the list of Application settings. application_id int Application ID [package_version] string Version of Application. It is optional parameter. The most current version is used if the parameter is omitted. The method returns array of structures: setting_id string Setting ID value_type string Type of setting. It is optional parameter. [class_name] string Class of setting. It is optional parameter. [default_value] string Default value of setting. It is optional parameter. [constraints] struct The list of restrictions for setting. It is optional parameter.

Public API Reference 249 min string Minimum acceptable value max string Maximum acceptable value min_length string Minimum acceptable length in Unicode characters max_length string Maximum acceptable length in Unicode characters regex string Regular expression enum_choices array of struct One of supplied identifiers choice_id string Choice ID name string Choice name Note: To obtain the information on data types of Application in APS format, refer to Application Packaging Standard (APS) Format Specification v1.1 (http://www.apsstandard.org/providers/documentation/). pem.aps.getpackage This method is supported by POA starting from version 2.9 hotfix01 This method returns a status of Application. package_reference struct It defines Application and the Application version.

250 Parallels Operations Automation 5.0 Parallels application_id int Application ID application_vers ion string Application version The method has the following output parameters: status string Application status. There are the following options: Downloading - Downloading Application to the Application repository on the Management Node. Downloading error - Download error. Metadata importing - Importing Application metadata file (APP-META.xml). Importing includes the following operations: retrieving metadata file, parsing metadata file, and storing metadata in the POA system database. Metadata error - Metadata import error. Content importing - Importing Application content. This operation occurs if Application contains PVC Template(s). Content error - Content import error. Ready - Application is added to POA. Removing - Removing Application instances and Application itself.

Public API Reference 251 pem.aps.getprovisioningsettings This method is supported by POA starting from version 2.9 hotfix01 This method allows to check a mapping between the settings of Application Instance and the properties of POA Account/Staff Member. The table below provides the mapping between the settings of Application and the properties of POA Account/Staff Member: Application Setting Class login email password locale locality country-name region street-address postal-code given-name family-name title post-office-box work fax cell home organization-name POA Account/Staff Member Property login email password locale city country state street zip_code first_name last_name title po_box phone fax mobile home_phone company

252 Parallels Operations Automation 5.0 Parallels url note organization-unit web_page description department subscription_id int Subscription ID rt_id int Resource Type ID [package_version] string Version of Application. It is optional parameter. The most current Application version is used if parameter is omitted. user_properties array of struct name string Name of property value string Value of property The method returns array of structures: The list of POA Account/Staff Member properties name string Name of Application Instance setting value string Value of Application Instance setting pem.aps.getsubscriptionapplicationinstances This method is supported by POA starting from version 2.9 hotfix01 This method returns the list of Application Instances for specified Subscription. subscription_id int Subscription ID [rt_id] int Resource Type ID. It is optional parameter. [application_id] int Application ID. It is optional parameter. [domain_name] string Name of Domain. It is optional parameter.

Public API Reference 253 Note: The rt_id, application_id, and domain_name parameters can be specified to filter the returned information. The method returns array of structures: application_instanc e_id int Application Instance ID application_id int Application ID package_version string Version of Application url string URL of Application Instance status string Status of Application Instance. There are the following options: rt_id int Resource Type ID Provisioning - Application Instance is installing. Provisioning Service - Service of Application Instance is installing. Ready - Application Instance is installed. Backing Up - Backup operation for Application Instance is in progress. Restoring - Restore operation for Application Instance is in progress. Configuring Service - Service of Application Instance is configuring. Upgrading - Upgrade operation for Application Instance is in progress. Disabling Service - Disable Service of Application Instance operation is in progress. Disabled - Application Instance is disabled. Enabling Service - Enable Service of Application Instance operation is in progress. Unprovisioning Service - Remove Service of Application Instance operation is in progress. Unprovisioning - Remove Application Instance operation is in progress.

254 Parallels Operations Automation 5.0 Parallels pem.aps.importpackage This method is supported by POA starting from version 2.9 hotfix01 This method imports Application into POA. package_url string URL to download Application from [disable_package] boolean Whether to make the version of Application disabled. It is optional parameter. There are the following options: The method has the following output parameters: 1 - Version of Application is disabled. 0 - Version of Application is enabled. If parameter is omitted, the 0 is used by default. application_id int Application ID package_version string Version of Application pem.aps.provideapplicationinstance This method is supported by POA starting from version 2.9 hotfix01 This method provides Application Instance. subscription_id int Subscription ID rt_id int Resource Type ID [package_version] string Version of Application. It is optional parameter. If the parameter is omitted, the most current version of Application is used. [domain_name] string Name of Domain. It is optional parameter. [url_path] string URL path. It is optional parameter.

Public API Reference 255 [settings] array of struct Settings of Application Instance. It is optional parameter. name string Name of Application Instance setting value string Value of Application Instance setting [attrs] array of string The list of Provisioning Attributes. They are used to find out the auxiliary Resource Types, which define where the instance of Application is provisioned. This is optional parameter. The method has the following output parameters: application_instanc e_id int Application Instance ID pem.aps.removeapplication This method is supported by POA starting from version 2.9 hotfix01 This method removes Application from POA. application_id int Application ID The method has no output parameters. pem.aps.setapplicationinstancesettings This method is supported by POA starting from version 2.9 hotfix01 This method sets Application Instance settings. application_instanc e_id int Application Instance ID settings array of struct Settings of Application Instance

256 Parallels Operations Automation 5.0 Parallels name string Name of setting value string Value of setting The method has no output parameters. pem.aps.unimportpackage This method is supported by POA starting from version 2.9 hotfix01 This method removes the specified version of Application from POA. package_reference struct It defines Application and Application version. application_id int Application ID package_version string Version of Application The method has no output parameters. pem.aps.unprovideapplicationinstance This method is supported by POA starting from version 2.9 hotfix01 This method removes the specified Application Instance. application_instanc e_id int The method has no output parameters. Application Instance ID

Public API Reference 257 pem.aps.upgradeapplicationinstance This method is supported by POA starting from version 2.9 hotfix01 This method performs upgrade of the specified Application Instance. application_instanc e_id int Application Instance ID [package_version] string Version of Application. It is optional parameter. If the parameter is omitted, the most current version is used. The method has no output parameters. pem.aps.getapplicationlicenseinfo This method is supported by POA starting from version 2.9 hotfix04 This method returns a list of the supported licenses for the specified Application. application_id int Application ID [package_version] string Version of Application. It is optional parameter. If the parameter is omitted, the most current version of Application is used. The method returns array of the following structures: license_id string License ID license_type string Type of license need_query boolean Whether a license activation data are required. There are the following options: 0 - License activation data are not required. 1 - License activation data are required.

258 Parallels Operations Automation 5.0 Parallels mandatory boolean Whether a license is mandatory. There are the following options: See also: 0 - License is not mandatory. 1 - License is mandatory. Application License Management diagram (on page 305) Note: To obtain information about the application licensing, refer to the APS Format 1.2: Licensing Aspect specification (http://www.apsstandard.org/r/doc/aspect-licensing- 1.2/index.html). pem.aps.getapplicationinstancelicenseactivationdata This method is supported by POA starting from version 2.9 hotfix04 This method returns license activation data for the specified Application Instance. application_instanc e_id int Application Instance ID license_type string Type of license The method has the following output parameters: n/a base64 License activation data in the Base64 format

Public API Reference 259 See also: Application License Management diagram (on page 305) Note: To obtain information about the application licensing, refer to the APS Format 1.2: Licensing Aspect specification (http://www.apsstandard.org/r/doc/aspect-licensing- 1.2/index.html). pem.aps.installapplicationinstancelicense This method is supported by POA starting from version 2.9 hotfix04 This method allows to install or update a license for the specified Application Instance. Note: License is installed or updated in the asynchronous mode. The method creates a task and returns task identifier. application_instanc e_id int Application Instance ID license_type string Type of license license_envelope base64 Content of license The method has the following output parameters: n/a int ID of Task, which installs or updates the license.

260 Parallels Operations Automation 5.0 Parallels See also: Application License Management diagram (on page 305) Note: To obtain information about the application licensing, refer to the APS Format 1.2: Licensing Aspect specification (http://www.apsstandard.org/r/doc/aspect-licensing- 1.2/index.html). pem.aps.removeapplicationinstancelicense This method is supported by POA starting from version 2.9 hotfix04 This method allows to uninstall a license for the specified Application Instance. Note: The process of the license deinstallation is performed in the asynchronous mode. The method creates a task and returns task identifier. application_instance_id int Application Instance ID license_type string Type of license The method has the following output parameters: n/a int ID of Task, which performs the deinstallation of the license.

Public API Reference 261 See also: Application License Management diagram (on page 305) Note: To obtain information about the application licensing, refer to the APS Format 1.2: Licensing Aspect specification (http://www.apsstandard.org/r/doc/aspect-licensing- 1.2/index.html). External System Management This functional group manages External Systems. pem.getexternalsystemlist This method is supported by POA starting from version 2.9 This method returns the list of registered External Systems. The method has no input parameters. The method has the following output parameters: system_names array of string Array of the registered External Systems. The members of array contain the names of External Systems.

262 Parallels Operations Automation 5.0 Parallels pem.registerexternalsystem This method is supported by POA starting from version 2.9 This method registers an External System in POA. Notes: 1. Configuration properties are validated by the corresponding External System plug-in. 2. External System plug-in may not have the configuration properties. Thus, the system_config parameter should not be specified for such plug-ins. 3. POA tries to authenticate provided credentials against all registered External Systems (order is undefined). POA does not check that the same External System is registered twice. You should avoid multiple registration of the same External System because it leads to repeated authentication attempts against the same External System. system_name string The name of the External System. This parameter is used as reference key to the External System. The name of the External System should be unique in POA, otherwise an error is returned. system_type string Type of the External System. The name of plug-in, which supports the External Systems of this type, should be passed. To obtain the name of plug-in, refer to the plug-in documentation. The plug-in, which supports the External Systems of this type, should be installed in POA, otherwise an error is returned. [system_config] array of struct Array of configuration properties. A property is a pair of the name and value parameters. The set of possible configuration properties is defined by specific External System plug-in. To obtain information about these properties, refer to the plugin documentation. This parameter is optional if an External System plug-in does not require a configuring. name string Configuration property name. value string Configuration property value. The method has no output parameters.

Public API Reference 263 pem.setexternalsystemconfig This method is supported by POA starting from version 2.9 This method changes a configuration of the External System specified. Notes: 1. Configuration properties are validated by the corresponding External System plug-in. 2. External System plug-in may not have the configuration properties. Thus, this method should not be used for such plug-ins. system_name string The name of the External System. system_config array of struct Array of configuration properties. A property is a pair of the name and value parameters. The set of possible configuration properties is defined by specific External System plug-in. To obtain information about these properties, refer to the plugin documentation. name string Configuration property name. value string Configuration property value. The method has no output parameters. pem.unregisterexternalsystem This method is supported by POA starting from version 2.9 This method unregisters an External System. Note: All Accounts and Staff Members, which are associated with the External System should be removed first. system_name string The name of the External System to unregister. If the External System is associated with POA Accounts and POA Staff Members, an error is returned.

264 Parallels Operations Automation 5.0 Parallels The method has no output parameters.

Public API Reference 265 Transactional Extension This group provides a helper methods to call a sequence of methods within context of transaction. Every POA operation that modifies POA state is one (or, rarely, several) transaction. A number of operations (i.e. create Account, create Staff Member for the Account, subscribe created Account to Service Template, schedule provisioning of website) can be combined into one transactional operation. For this purpose there exist the following methods: txn.begin (on page 267), txn.commit (on page 268). To be able to rollback any transaction, use txn.rollback (on page 268) method. Each transaction has the txn_id parameter, that can be specified when beginning transaction. If txn_id is not specified, POA generates it. The txn_id parameter should be unique, it is used to further reference the transaction. The txn_id parameter can be specified with every POA Public API method (except pem.batchrequest (on page 265) or pem.getrequeststatus (on page 266)). It will mean that such method belongs to a transaction. After the transaction is commited or is rolled back, its txn_id parameter becomes invalid and cannot be used for further operations. To obtain the overall status of tasks scheduled after transaction commit or after the pem.batchrequest (on page 265) execution, the pem.getrequeststatus (on page 266) method can be used. pem.batchrequest This method is supported by POA starting from version 2.3. This method executes the set of specified Public API methods in a single POA transaction. This method is introduced for external system that does not have the own transaction mechanism or mechanism which handles POA interaction statuses. The methods go through XML-RPC params array and for each parameter execute corresponding operation which is described in value. All operations are executed in a single POA transaction. Requested operations are executed in order they are specified. On the first operation failure, POA rollbacks transaction and returns the result of the first failed operation. Each XML-RPC param has the following input parameters: operation string Indicates name of Public API method that should be executed.

266 Parallels Operations Automation 5.0 Parallels parameters array Parameters that should be passed to requested method as for usual XML-RPC call. OR [request_id] string The identifier of request, to be further used by the pem.getrequeststatus (on page 266) method. Note, that this parameter must go in the first place in your XML RPC request because the request_id parameter affects only operations that are after it. This method has no output parameters. For the XML-RPC sample of this method refer to the pem.batchrequest sample section (on page 282). pem.getrequeststatus This method is supported by POA starting from version 2.6.2 This method allows to obtain the information on the result of any request previously issued to POA via Public API. There are the following use cases of this method: Retrieving the overall status of tasks that are scheduled after the pem.batchrequest (on page 265) method execution. Retrieving the overall status of tasks that are scheduled after that transaction is committed. request_id string The identifier of request (that was previously set by the pem.batchrequest (on page 265) or the txn.begin (on page 267) methods).

Public API Reference 267 Output parameters: request_status int The status of the request. status_messages See also: array of strings Using Transactions diagram (on page 304) 0 - Succeeded. This value is returned in the following cases: Tasks are executed. Tasks do not scheduled. 1 - Running. This value is returned in the following cases: There are tasks having Rescheduled Status. There are tasks having Unprocessed Status. There are tasks having Running Status. 2 - Failed. There are tasks having Failed Status. There are tasks having Canceled Status. The reason of failure. txn.begin This method is supported by POA starting from version 2.6.3. This method begins the transaction. Use the txn.commit (on page 268) method to commit the transaction or use the txn.rollback (on page 268) method to rollback the transaction. [txn_id] string Transaction ID. This is optional parameter. If it is omitted, parameter is generated by POA. [timeout] int Defines transaction timeout (in seconds). This is optional parameter. Timeout is unlimited by default. [request_id] string Request ID. It is used to track the overall status of tasks scheduled by the transaction, if specified. Use the pem.getrequeststatus (on page 266) method to obtain the overall status of tasks scheduled after transaction commit.

268 Parallels Operations Automation 5.0 Parallels The method has the following output parameters: txn_id string Transaction ID. See also: Using Transactions diagram (on page 304) txn.commit This method is supported by POA starting from version 2.6.3. This method commits the transaction. Use the txn.begin (on page 267) method to begin the operation. txn_id string Transaction ID. The method has no output parameters. See also: Using Transactions diagram (on page 304) txn.rollback This method is supported by POA starting from version 2.6.3. This method rolls the transaction back. txn_id string Transaction ID. The method has no output parameters.

C H A P T E R 9 XML-RPC Samples This section provides examples of using POA Public API for several most important methods. The samples are presented in terms of XML-RPC requests and responses. Important: Use only UTF-8 encoding in your xml requests! In This Chapter Common Response Codes... 270 pem.addaccount Sample... 272 pem.addaccountmember Sample... 276 pem.activatesubscription Sample... 279 pem.adddomain Sample... 282 pem.batchrequest Sample... 282

270 Parallels Operations Automation 5.0 Parallels Common Response Codes Each XML-RPC call contains of a request and a response. Structures of requests depend on the particular method and described in corresponding sections below. As to responses, there can be two types of them: response indicating successful completion of the call, and response indicating failure. The following subsections depict the structure of these types of responses for XML-RPC methods constituting POA Public API. Success Response The structure of success response for a method depends on whether this method has output parameters or not. The following XML snippet shows the structure of success response for a method that does not have output parameters: <methodresponse> <params> <param> <value> <struct> <name>status</name> <value><int>0</int></value> </struct> </value> </param> </params> </methodresponse> The following XML snippet shows the structure of success response for a method that has one or more output parameters: <methodresponse> <params> <param> <value> <struct> <name>status</name> <value><int>0</int></value> <name>result</name> <value> <struct>... </struct> </value> </struct> </value> </param>

XML-RPC Samples 271 </params> </methodresponse> In this case the response contains additional member result, which has a value of struct type. The structure contains members, each representing a single output parameter for the method. The exact type of each output parameter depends on the particular method and is described in corresponding sections below in this document. Failure Response The structure of failure response for a method has the same form independently on whether this method has output parameters or not. <methodresponse> <params> <param> <value> <struct> <name>status</name> <value><int>-1</int></value> <name>module_id</name> <value>${errordomain}</value> <name>extype_id</name> <value><int>${exceptiontype}</int></value> <name>error_message</name> <value>${theerrormessage}</value> </struct> </value> </param> </params> </methodresponse> Negative status field indicates fault response. Fields module_id, extype_id identify actual error condition: module_id - identifies some logical domain an error condition belongs to; extype_id - uniquely identifies concrete error condition within its domain. Field error_message contains descriptive message for specific error condition. This message is in English only and can not be localized.

272 Parallels Operations Automation 5.0 Parallels pem.addaccount Sample The following XML snippet shows the structure of sample request for XML-RPC call for this method: <?xml version="1.0"?> <methodcall> <methodname>pem.addaccount</methodname> <params> <param> <value> <struct> <name>branded_domain_name</name> <value> <string>${branded_domain_name}</string> </value> <name>account_id</name> <value> <i4>${account_id}</i4> </value> <name>account_type</name> <value> <string>${account_type}</string> </value> <name>parent_account_id</name> <value> <i4>${parent_account_id}</i4> </value> <name>fax</name> <value> <struct> <name>country_code</name> <value> <string>${country_code}</string> </value> <name>area_code</name> <value> <string>${area_code}</string> </value>

XML-RPC Samples 273 <name>ext_num</name> <value> <string>${ext_num}</string> </value> <name>phone_num</name> <value> <string>${phone_num}</string> </value> </struct> </value> <name>phone</name> <value> <struct> <name>country_code</name> <value> <string>${country_code}</string> </value> <name>area_code</name> <value> <string>${area_code}</string> </value> <name>ext_num</name> <value> <string>${ext_num}</string> </value> <name>phone_num</name> <value> <string>${phone_num}</string> </value> </struct> </value> <name>subscription_id</name> <value> <i4>${subscription_id}</i4> </value>

274 Parallels Operations Automation 5.0 Parallels <name>locale</name> <value> <struct> <name>country_code</name> <value> <string>${country_code}</string> </value> <name>variant</name> <value> <string>${variant}</string> </value> <name>language_code</name> <value> <string>${language_code}</string> </value> </struct> </value> <name>address</name> <value> <struct> <name>city</name> <value> <string>${city}</string> </value> <name>house_num</name> <value> <string>${house_num}</string> </value> <name>street_name</name> <value> <string>${street_name}</string> </value> <name>address2</name> <value> <string>${address2}</string> </value> <name>zipcode</name>

XML-RPC Samples 275 <value> <string>${zipcode}</string> </value> <name>country</name> <value> <string>${country}</string> </value> <name>state</name> <value> <string>${state}</string> </value> </struct> </value> <name>email</name> <value> <string>${email}</string> </value> <name>person</name> <value> <struct> <name>company_name</name> <value> <string>${company_name}</string> </value> <name>title</name> <value> <string>${title}</string> </value> <name>first_name</name> <value> <string>${first_name}</string> </value> <name>last_name</name> <value> <string>${last_name}</string> </value>

276 Parallels Operations Automation 5.0 Parallels <name>middle_name</name> <value> <string>${middle_name}</string> </value> </struct> </value> </struct> </value> </param> </params> </methodcall> pem.addaccountmember Sample The following XML snippet shows the structure of sample request for XML-RPC call for this method: <?xml version="1.0"?> <methodcall> <methodname>pem.addaccountmember</methodname> <params> <param> <value> <struct> <name>account_id</name> <value><int>${theaccountid}</int></value> <name>user_id</name> <value><int>${thememberid}</int></value> <name>login</name> <value>${theloginname}</value> <name>auth</name> <value> <struct> <name>login</name> <value>${theloginname}</value> <name>password</name> <value>${thepassword}</value> </struct> </value>

XML-RPC Samples 277 <name>person</name> <value> <struct> <name>title</name> <value>${thetitle}</value> <name>first_name</name> <value>${thefirstname}</value> <name>middle_name</name> <value>${themiddlename}</value> <name>last_name</name> <value>${thelastname}</value> <name>company_name</name> <value>${thecompanyname}</value> </struct> </value> <name>address</name> <value> <struct> <name>street_name</name> <value>${thestreetname}</value> <name>house_num</name> <value>${thehousenumber}</value> <name>address2</name> <value>${thesecondaddress}</value> <name>zipcode</name> <value>${thepostalcode}</value> <name>city</name> <value>${thecityname}</value> <name>country</name>

278 Parallels Operations Automation 5.0 Parallels <value>${thecountrycode}</value> <name>state</name> <value>${thestateorprovincename}</value> </struct> </value> <name>phone</name> <value> <struct> <name>country_code</name> <value>${thecountrycode}</value> <name>area_code</name> <value>${theareacode}</value> <name>phone_num</name> <value>${thephonenumber}</value> <name>ext_num</name> <value>${theextensionnumber}</value> </struct> </value> <name>fax</name> <value> <struct> <name>country_code</name> <value>${thecountrycode}</value> <name>area_code</name> <value>${theareacode}</value> <name>phone_num</name> <value>${thefaxnumber}</value> <name>ext_num</name> <value>${theextensionnumber}</value> </struct> </value>

XML-RPC Samples 279 <name>email</name> <value>${theemailaddress}</value> </struct> </value> </param> </params> </methodcall> pem.activatesubscription Sample The following XML snippet shows the structure of sample request for XML-RPC call for this method: <?xml version="1.0"?> <methodcall> <methodname>pem.activatesubscription</methodname> <params> <param> <value> <struct> <name>subscription_id</name> <value><int>${thesubscriptionid}</int></value> <name>service_template_id</name> <value><int>${theservicetemplateid}</int></value> <name>account_id</name> <value><int>${theaccountid}</int></value> <name>resource_limits</name> <value> <array> <data> <value> <struct> <name>resource_id</name> <value>${rt_id1}</value> <name>resource_limit</name> <value>${limit_1}</value> </struct> </value>

280 Parallels Operations Automation 5.0 Parallels... <value> <struct> <name>resource_id</name> <value>${rt_idn}</value> <name>var_value</name> <value>${limit_n}</value> </struct> </value> </data> </array> </value> <name>parameters</name> <value> <array> <data> <value> <struct> <name>var_name</name> <value>${name_1}</value> <name>var_value</name> <value>${value_1}</value> </struct> </value>... <value> <struct> <name>var_name</name> <value>${name_n}</value> <name>var_value</name> <value>${value_n}</value> </struct> </value> </data> </array> </value> <name>provisioned_resource_types</name> <value> <array>

XML-RPC Samples 281 <data> <value> <struct> <name>resource_type_id</name> <value> <int>${theresourcetypeid_1}</int> </value> <name>amount</name> <value><int>${theamount_1}</int></value> </struct> </value> <value> <struct> <name>resource_type_id</name> <value> <int>${theresourcetypeid_2}</int> </value> <name>amount</name> <value><int>${theamount_2}</int></value> </struct> </value>... <value> <struct> <name>resource_type_id</name> <value> <int>${theresourcetypeid_n}</int> </value> <name>amount</name> <value><int>${theamount_n}</int></value> </struct> </value> </data> </array> </value> </struct> </value> </param> </params> </methodcall>

282 Parallels Operations Automation 5.0 Parallels pem.adddomain Sample The following XML snippet shows the structure of sample request for XML-RPC call for this method: <?xml version="1.0"?> <methodcall> <methodname>pem.adddomain</methodname> <params> <param> <value> <struct> <name>subscription_id</name> <value><int>${thesubscriptionid}</int></value> <name>domain_name</name> <value><string>${thedomainname}</string></value> <name>registrar_status</name> <value><int>${theregistrarstatus}</int></value> <name>hosting_type</name> <value><int>${thehostingtype}</int></value> <name>path</name> <value><string>${thepath}</string></value> <name>tld_name</name> <value><string>${thetldname}</string></value> </struct> </value> </param> </params> </methodcall> pem.batchrequest Sample

XML-RPC Samples 283 The following XML snippet shows the structure of sample request for XML-RPC call for this method. It performs an account creation through pem.addaccount method (on page 33), then add user to the account by pem.addaccountmember (on page 37) and then provides a subscription for the account by pem.activatesubscription method in one XML- RPC request i.e. one POA transaction. <?xml version="1.0"?> <methodcall> <methodname>pem.batchrequest</methodname> <params> <param> <value> <struct> <name>operation</name> <value>pem.addaccount</value> <name>parameters</name> <value> <array> <data> <value> <struct> <name>account_id</name> <value> <int>${account_id_here}</int> </value> <name>account_type</name> <value>c</value> <name>parent_account_id</name> <value> <int>1</int> </value> <name>person</name> <value> <struct> <name>title</name> <value> <string>mr.</string> </value> <name>first_name</name> <value> <string>${first_name_here}</string>

284 Parallels Operations Automation 5.0 Parallels </value> <name>middle_name</name> <value> <string>${middle_name_here}</string> </value> <name>last_name</name> <value> <string>${last_name_here}</string> </value> <name>company_name</name> <value>${company_name_here}</value> </struct> </value> <name>address</name> <value> <struct> <name>street_name</name> <value> <string>${street_name_here}</string> </value> <name>house_num</name> <value> <string>${house_num_here}</string> </value> <name>address2</name> <value> <string>${second_address_here}</string> </value> <name>zipcode</name> <value> <string>${zipcode_here}</string> </value> <name>city</name> <value> <string>${city_here}</string> </value>

XML-RPC Samples 285 <name>country</name> <value> <string>${two_char_code_here}</string> </value> <name>state</name> <value> <string>${state_here}</string> </value> </struct> </value> <name>phone</name> <value> <struct> <name>country_code</name> <value> <string>${country_code_here}</string> </value> <name>area_code</name> <value> <string>${area_core_here}</string> </value> <name>phone_num</name> <value> <string>${phone_num_here}</string> </value> <name>ext_num</name> <value> <string>${ext_num_here}</string> </value> </struct> </value> <name>fax</name> <value> <struct> <name>country_code</name> <value>

286 Parallels Operations Automation 5.0 Parallels <string>${country_code_here}</string> </value> <name>area_code</name> <value> <string>${area_code_here}</string> </value> <name>phone_num</name> <value> <string>${phone_num_here}</string> </value> <name>ext_num</name> <value> <string>${ext_num_here}</string> </value> </struct> </value> <name>email</name> <value> <string>${email_here}</string> </value> </struct> </value> </data> </array> </value> </struct> </value> </param> <param> <value> <struct> <name>operation</name> <value>pem.addaccountmember</value> <name>parameters</name> <value> <array> <data> <value> <struct> <name>account_id</name>

XML-RPC Samples 287 <value> <int>${account_id_here}</int> </value> <name>auth</name> <value> <struct> <name>login</name> <value> <string>${account_login_here}</string> </value> <name>password</name> <value> <string>${account_passwd_here}</string> </value> </struct> </value> <name>person</name> <value> <struct> <name>title</name> <value> <string>mr.</string> </value> <name>first_name</name> <value> <string>${first_name_here}</string> </value> <name>middle_name</name> <value> <string>${middle_name_here}</string> </value> <name>last_name</name> <value> <string>${last_name_here}</string> </value> <name>company_name</name> <value>

288 Parallels Operations Automation 5.0 Parallels <string>${company_name_here}</string> </value> </struct> </value> <name>address</name> <value> <struct> <name>street_name</name> <value> <string>${street_name_here}</string> </value> <name>house_num</name> <value> <string>${house_num_here}</string> </value> <name>address2</name> <value> <string>${second_address_here}</string> </value> <name>zipcode</name> <value> <string>${zipcode_here}</string> </value> <name>city</name> <value> <string>${city_here}</string> </value> <name>country</name> <value> <string>${two_char_code_here}</string> </value> <name>state</name> <value> <string>${state_here}</string> </value> </struct> </value>

XML-RPC Samples 289 <name>phone</name> <value> <struct> <name>country_code</name> <value> <string>${country_code_here}</string> </value> <name>area_code</name> <value> <string>${area_code_here}</string> </value> <name>phone_num</name> <value> <string>${phone_num_here}</string> </value> <name>ext_num</name> <value> <string>${ext_num_here}</string> </value> </struct> </value> <name>fax</name> <value> <struct> <name>country_code</name> <value> <string>${country_code_here}</string> </value> <name>area_code</name> <value> <string>${area_code_here}</string> </value> <name>phone_num</name> <value> <string>${phone_num_here}</string> </value>

290 Parallels Operations Automation 5.0 Parallels <name>ext_num</name> <value> <string>${ext_num_here}</string> </value> </struct> </value> <name>email</name> <value> <string>${email_here}</string> </value> </struct> </value> </data> </array> </value> </struct> </value> </param> <param> <value> <struct> <name>operation</name> <value>pem.activatesubscription</value> <name>parameters</name> <value> <array> <data> <value> <struct> <name>account_id</name> <value> <int>${account_id_here}</int> </value> <name>service_template_id</name> <value> <int>${service_template_id_here}</int> </value> <name>subscription_id</name> <value> <int>${subscription_id_here}</int> </value>

XML-RPC Samples 291 <name>parameters</name> <value> <array> <data> <value> <struct> <name>var_name</name> <value>domain_name</value> <name>var_value</name> <value>${domain_name_here}</value> </struct> </value> <value> <struct> <name>var_name</name> <value>domain_id</value> <name>var_value</name> <value>${domain_id_here}</value> </struct> </value> <value> <struct> <name>var_name</name> <value>registrar_status</value> <name>var_value</name> <value>${registrar_status_here}</value> </struct> </value> </data> </array> </value> </struct> </value> </data> </array> </value> </struct> </value> </param>

292 Parallels Operations Automation 5.0 Parallels </params> </methodcall>

C H A P T E R 10 Diagrams This section contains diagrams explaining complex scenarios involving several methods of POA Public API. In This Chapter Provisioning Model Version 1... 294 Domain and Hosting Provisioning Model Version 2... 295 Domain Provisioning Model Version 2... 298 Service Cancellation... 300 Creating Service User and Exchange Mailbox... 300 Creating Service User and Hosted CRM User... 301 Creating MS SQL Database... 302 Activating Global Relay Archiving Support... 303 Using Transactions... 304 Application License Management... 305

294 Parallels Operations Automation 5.0 Parallels Provisioning Model Version 1 The following diagram shows the sequence of calls, which external system shall perform to create Account, Account's Staff Member, Subscription, and Domain in POA: Figure 2: Provisioning Model 1 pem.addaccount (on page 33) creates Account in POA. 2 pem.addaccountmember (on page 37) creates Account's Staff Member in POA. 3 pem.activatesubscription (on page 53) creates Subscription in POA. External system can override the Subscription limits, which are defined in Service Template by specifying resource_limits parameter. After Subscription is created in POA, method provides resources accordingly Subscription. 4 pem.adddomain (on page 66) creates Domain in POA. 5 pem.getnameservers (on page 80) returns the list of POA Name Servers' names, which hosts DNS Zone of Domain. External system uses these Name Servers to register Domain in Domain Registrar. 6 Domain Registrar registers Domain. External system uses pem.setdomainregistrarstatus (on page 85) to set Domain Registrar Status as Registered in POA.

Diagrams 295 Domain and Hosting Provisioning Model Version 2 The following diagram shows the sequence of calls, which external system shall perform to create Account, Account's Staff Member, Domain Subscription (it contains DNS Hosting), Domain, Hosting Subscription (it contains hosting services), and to provision hosting services in POA:

296 Parallels Operations Automation 5.0 Parallels Figure 3: Domain and Hosting Provisioning Model

Diagrams 297 1 External System calls pem.addaccount (on page 33) method to create Account in POA. 2 External System calls pem.addaccountmember (on page 37) method to create Account's Staff Member in POA. 3 External System calls pem.activatesubscription (on page 53) to create Domain Subscription in POA. This Subscription must contain DNS Hosting. Also, it may contain other hosting services, which are planned to sell as add-ins to Domain registration. 4 External System calls pem.adddomainrequest (on page 69) to create Domain Request in POA. If Domain with the same name as Domain Request name does not exist, POA creates DNS Zone according to Subscription, created on step 3. Otherwise, POA uses DNS Zone of existing Domain for Domain Request. 5 External System calls pem.getnameservers (on page 80) method to retrieve DNS Servers, which host DNS Zone of Domain Request created on step 4. 6 External System sends Domain registration request to Domain Registrar. DNS Servers, which are obtained on step 5, are used to register Domain in Domain Registrar. 7 External System calls pem.adddomain (on page 66) method to create Domain in POA. On this step force parameter's value is set to 0 (if Domain with the same name exists, the error is thrown) and registrar_status is set to 0 (Domain check result is undefined). 8 External System calls pem.activatesubscription (on page 53) to create Hosting Subscription in POA. 9 If Domain is created on step 7, External System calls pem.bindservicestodomain (on page 73) method to provision hosting services from Hosting Subscription. Otherwise, External System will wait confirmation of Domain registration from Domain Registrar. 10 Domain Registrar confirms Domain registration. 11 External System calls pem.adddomain (on page 66) method to create Domain in POA. On this step force parameter's value is set to 1 (if Domain with the same name exists, method removes one and create new one) and registrar_status is set to 2 (Domain is registered). If Domain is created on step 7, pem.adddomain (on page 66) method modifies Registrar Status of Domain only. 12 External System calls pem.bindservicestodomain (on page 73) method to provision hosting services from Hosting Subscription.

298 Parallels Operations Automation 5.0 Parallels Domain Provisioning Model Version 2 The following diagram shows the sequence of calls, which external system shall perform to create Account, Account's Staff Member, Domain Subscription (it contains DNS Hosting), and Domain in POA: Figure 4: Domain Provisioning Model Diagram 1 External System calls pem.addaccount (on page 33) method to create Account in POA.

Diagrams 299 2 External System calls pem.addaccountmember (on page 37) method to create Account's Staff Member in POA. 3 External System calls pem.activatesubscription (on page 53) to create Domain Subscription in POA. This Subscription must contain DNS Hosting. Also, it may contain other hosting services, which are planned to sell as add-ins to Domain registration. 4 External System calls pem.adddomainrequest (on page 69) to create Domain Request in POA. If Domain with the same name as Domain Request name does not exist, POA creates DNS Zone according to Domain Subscription, created on step 3. Otherwise, POA uses DNS Zone of existing Domain for Domain Request. 5 External System calls pem.getnameservers (on page 80) method to retrieve DNS Servers, which host DNS Zone of Domain Request created on step 4. 6 External System sends Domain registration request to Domain Registrar. DNS Servers, which are obtained on step 5, are used to register Domain in Domain Registrar. 7 External System calls pem.adddomain (on page 66) method to create Domain in POA. On this step force parameter's value is set to 0 (if Domain with the same name exists, the error is thrown) and registrar_status is set to 0 (Domain check result is undefined). 8 Domain Registrar confirms Domain registration. 9 External System calls pem.adddomain (on page 66) method to create Domain in POA. On this step force parameter's value is set to 1 (if Domain with the same name exists, method removes one and create new one) and registrar_status is set to 2 (Domain is registered). If Domain is created on step 7, pem.adddomain (on page 66) method modifies Registrar Status of Domain only.

300 Parallels Operations Automation 5.0 Parallels Service Cancellation The following diagram shows the sequence of calls, which external system shall perform to remove Subscription, remove Account and Account's Staff Member in POA: Figure 5: Service Cancellation 1 pem.removesubscription (on page 62) unprovides resources and removes Subscription. 2 pem.removeaccount (on page 45) removes Account's Staff Members and removes Account. Creating Service User and Exchange Mailbox The following diagram shows the sequence of calls, which external system shall perform to create a Service User and Exchange Mailbox in POA: Figure 6: Service User and Exchange Mailbox Creating 1 pem.adduser (on page 97) creates a Service User. 2 pem.exchange.addmailbox (on page 128) creates Exchange Mailbox for Service User specified.

Diagrams 301 Creating Service User and Hosted CRM User The following diagram shows the sequence of calls, which external system shall perform to create a Service User and Hosted CRM User in POA: Figure 7: Service User and Hosted CRM User Creating 1 pem.adduser (on page 97) creates a Service User. 2 pem.exchange.addmailbox (on page 128) creates Exchange Mailbox. This step is optional. It is required in case of Exchange mailbox E-Mail Access Type using. 3 pem.mscrm.createuser (on page 178) creates Hosted CRM User for Service User specified.

302 Parallels Operations Automation 5.0 Parallels Creating MS SQL Database The following diagram shows the sequence of calls, which external system shall perform to create a MS SQL Database in POA: Figure 8: MS SQL Database Creating 1 txn.begin (on page 267) opens a transaction. 2 pem.createdatabase creates MS SQL Database and creates Database User. 3 pem.mssql.setquota (on page 195) sets diskspace limits on database and database's log files. 4 txn.commit (on page 268) closes a transaction.

Diagrams 303 Activating Global Relay Archiving Support The following diagram shows the sequence of calls, which external system shall perform to activate the support of Global Relay Archiving in POA: Figure 9: Activating Global Relay Archiving Support Diagram 1 pem.global_relay.createarchive (on page 156) creates a mail archive for the Subscription specified. 2 pem.global_relay.getarchiverecipientscandidates (on page 163) returns the list of the recipient candidates. 3 pem.global_relay.enablearchiving (on page 159) makes archiving enabled for the specified recipient candidates.

304 Parallels Operations Automation 5.0 Parallels Using Transactions The following diagram shows the sequence of calls, which external system shall perform for the following purposes: To execute the POA Public API methods within the bounds of transaction. To obtain the overall status of tasks scheduled after transaction commit. Figure 10: Using Transaction 1 txn.begin (on page 267) opens a transaction. 2 On this step external system calls a set of POA Public API methods. 3 txn.commit (on page 268) closes a transaction. POA schedules and runs a set of tasks. 4 pem.getrequeststatus (on page 266) retrieves the overall status of tasks scheduled on previous step.

Diagrams 305 Application License Management The following diagram shows the sequence of calls, which external system shall perform for the following purposes: To install or update the Application license To remove the Application license Note: Application can support several licenses. In this case External System should process separately each license. Figure 11: Application License Management 1 External System calls the pem.aps.getapplicationlicenseinfo method (on page 257) to obtain the information about the Application license. Note: This method is called only once per Application. The obtained information about the Application license is used for each Application instance. 2 If the Application license's activation data is required to install or update the license, External System calls the pem.aps.getapplicationinstancelicenseactivationdata method (on page 258). POA returns the required activation data for the installed Application instance. 3 External System installs or updates the prepared license using the pem.aps.installapplicationinstancelicense method (on page 259). 4 To remove the installed license from Application instance, External System calls the pem.aps.removeapplicationinstancelicense method (on page 260).

306 Index A Activating Global Relay Archiving Support 303 Application License Management 305 Application Management 246 B Backward Compatibility Issues 22 Big Integer Support 21 Branding Management 238 C Common Response Codes 270 Creating MS SQL Database 302 Creating Service User and Exchange Mailbox 300 Creating Service User and Hosted CRM User 301 D Database Management 193 Definitions, Acronyms, and Abbreviations 14 Delivery Permissions Management 165 Diagrams 293 Documentation Conventions 9 Domain and Hosting Provisioning Model Version 2 295 Domain Provisioning Model Version 2 298 Domains Management 65 E Exchange Auxiliary Methods 173 Exchange Contact Management 154 Exchange Distribution List Management 143 Exchange Mailbox Management 128 Exchange Management 128 Exchange Public Folder Management 147 Executing Public API Methods 18 Executing Public API Methods with curl Utility 19 External System Management 261 F Failure Response 271 Feedback 11 G General Conventions 11 Global Relay Archiving Management 156 H Hardware Node Management 245 Hosted CRM Management 178 Hosted OCS Management 177 I IIS Application Mappings Management 103 IIS Management 103 IIS Website Users Management 116 Introduction 12 IP Pools Management 233 M Management of Accounts and Account's Staff Members 33 N Native Package Management 236 O Obtaining POA XML-RPC Server Properties 19 Overall Description 15 Overview 14 P Parallels Plesk Panel Management 240 Parallels Virtuozzo Containers Management 241 pem.activatest 226 pem.activatesubscription 53 pem.activatesubscription Sample 279 pem.addaccount 33

Index 307 pem.addaccount Sample 272 pem.addaccountmember 37 pem.addaccountmember Sample 276 pem.adddnshosting 65 pem.adddomain 66 pem.adddomain Sample 282 pem.adddomainrequest 69 pem.adddomaintoaccount 70 pem.addprovisioningattributes 231 pem.addptrrecord 71 pem.addresourcetype 205 pem.addresourcetypetoservicetemplate 206 pem.addservicetemplate 226 pem.addsubdomain 71 pem.addsubscription 56 pem.adduser 97 pem.apache.turnwebstatprocessingoff 95 pem.apache.turnwebstatprocessingon 94 pem.apache.updatelimits 86 pem.aps.getapplicationinstance 246 pem.aps.getapplicationinstancelicenseactivati ondata 258 pem.aps.getapplicationinstancesettings 248 pem.aps.getapplicationlicenseinfo 257 pem.aps.getapplicationsettings 248 pem.aps.getpackage 249 pem.aps.getprovisioningsettings 251 pem.aps.getsubscriptionapplicationinstances 252 pem.aps.importpackage 254 pem.aps.installapplicationinstancelicense 259 pem.aps.provideapplicationinstance 254 pem.aps.removeapplication 255 pem.aps.removeapplicationinstancelicense 260 pem.aps.setapplicationinstancesettings 255 pem.aps.unimportpackage 256 pem.aps.unprovideapplicationinstance 256 pem.aps.upgradeapplicationinstance 257 pem.assignippool 233 pem.assignrolestomember 51 pem.attachippool 233 pem.batchrequest 265 pem.batchrequest Sample 282 pem.bindippool 234 pem.bindservicestodomain 73 pem.branddomain 238 pem.changeuserpassword 98 pem.checkpassword 40 pem.cloneservicetemplate 227 pem.cqmail.addmailbox 196 pem.cqmail.addmailforwarding 198 pem.cqmail.addmailname 200 pem.cqmail.delmailname 201 pem.cqmail.editmailname 202 pem.createdatabase 193 pem.createdatabaseuser 194 pem.creatednsrecord 73 pem.createippool 234 pem.deactivatest 227 pem.deletednsrecord 75 pem.detachippool 235 pem.disableaccount 41 pem.disableaccountmember 41 pem.disablednsrecord 75 pem.disabledomain 76 pem.disablesubscription 57 pem.disableuser 98 pem.enableaccount 42 pem.enableaccountmember 42 pem.enablednsrecord 76 pem.enabledomain 77 pem.enablesubscription 57 pem.enableuser 99 pem.exchange.addblackberry 138 pem.exchange.addcontact 154 pem.exchange.adddistributionlist 143 pem.exchange.adddistributionlistmembers 144 pem.exchange.addemailaddresses 173 pem.exchange.addgoodlink 139 pem.exchange.addmailbox 128 pem.exchange.addmailboxwithtemplate 139 pem.exchange.addpublicfolder 147 pem.exchange.changemailboxtemplate 140 pem.exchange.changeprimaryemailaddress 174 pem.exchange.disableforwarding 130 pem.exchange.disableoutlooklicense 143 pem.exchange.disableunifiedmessaging 173 pem.exchange.enableforwarding 130 pem.exchange.enableoutlooklicense 143 pem.exchange.enableunifiedmessaging 172 pem.exchange.forcemailboxtemplatesusing 141 pem.exchange.getcontacts 155 pem.exchange.getdeliverypermissions 165 pem.exchange.getdeliverypermissionscandidate s 166

Index 308 pem.exchange.getdistributionlists 145 pem.exchange.getemailaddresses 131 pem.exchange.getemaildomains 175 pem.exchange.getmailboxbyemailaddress 131 pem.exchange.getmailboxes 132 pem.exchange.getmailboxinfo 132 pem.exchange.getmailboxpermissions 169 pem.exchange.getmailboxpermissionscandidate s 170 pem.exchange.getmailboxstores 134 pem.exchange.getmailboxtemplates 141 pem.exchange.getoutlooklicense 142 pem.exchange.getpublicfolders 150 pem.exchange.getrootfoldername 149 pem.exchange.getsmtpfilters 175 pem.exchange.getusermailbox 135 pem.exchange.grantdeliverypermissions 167 pem.exchange.grantmailboxpermissions 170 pem.exchange.grantpublicfolderroles 151 pem.exchange.listpublicfolderroles 153 pem.exchange.maildisablepublicfolder 149 pem.exchange.mailenablepublicfolder 148 pem.exchange.modifymailbox 136 pem.exchange.movemailboxes 137 pem.exchange.removecontact 155 pem.exchange.removedistributionlist 146 pem.exchange.removedistributionlistmembers 146 pem.exchange.removeemailaddresses 176 pem.exchange.removemailbox 138 pem.exchange.removepublicfolder 151 pem.exchange.revokedeliverypermissions 168 pem.exchange.revokemailboxpermissions 171 pem.exchange.revokepublicfolderroles 152 pem.getaccountdomains 79 pem.getaccountinfo 43 pem.getaccountmemberbylogin 43 pem.getaccountmemberroles 51 pem.getaccountroles 50 pem.getaccountsubscriptions 44 pem.getcustomersubscriptions 64 pem.getcustomersubscriptionsresources 207 pem.getdomainbyname 77 pem.getdomainlist 78 pem.getdomainnameservers 81 pem.getdomainsforbrandcreation 239 pem.getdomainsubscription 79 pem.getexternalsystemlist 261 pem.getftpuser 87 pem.getnameservers 80 pem.getprovisioningattributes 231 pem.getrequeststatus 266 pem.getrequirednameservers (internal) 82 pem.getresourceusage 206 pem.getresourceusageforperiod 208 pem.getservicetemplate 228 pem.getsubscription 58 pem.getsubscriptionwebspaces 87 pem.getuserbylogin 99 pem.getuserinfo 99 pem.getusers 100 pem.getvendorcustomers 50 pem.getwebspaceslist 88 pem.global_relay.createarchive 156 pem.global_relay.disablearchive 157 pem.global_relay.disablearchiving 158 pem.global_relay.enablearchive 158 pem.global_relay.enablearchiving 159 pem.global_relay.getarchive 160 pem.global_relay.getarchiverecipients 162 pem.global_relay.getarchiverecipientscandidat es 163 pem.global_relay.retryarchiveoperation 164 pem.iis.adddomainmapping 103 pem.iis.addsystemmapping 104 pem.iis.applysystemmappingstohosts 105 pem.iis.bulkadddomainmapping 106 pem.iis.deletesystemmapping 107 pem.iis.getauthorizedwebaccessdomainsforus er 116 pem.iis.getauthorizedwebaccessusersfordoma in 117 pem.iis.getdomainengines 107 pem.iis.getdomainmapping 107 pem.iis.getdomainmappings 108 pem.iis.getftpaccessstatusesfordomain 118 pem.iis.getftpaccessstatusforuser 117 pem.iis.getsubscriptionsharepointsites 88 pem.iis.getsubscriptionwebsites 89 pem.iis.getsystemengines 109 pem.iis.getsystemmapping 110 pem.iis.getsystemmappings 111 pem.iis.getwebspacefeaturesinfo 90 pem.iis.getwebspacesinfo 91 pem.iis.grantauthorizedwebaccess 116 pem.iis.grantftpaccesstowebsite 119 pem.iis.resetdomainmapping 112 pem.iis.revokeauthorizedwebaccess 116 pem.iis.revokeftpaccessfromwebsite 119

Index 309 pem.iis.setdomainmappingenabled 113 pem.iis.setwebspacefeaturesinfo 91 pem.iis.updatedomainmapping 113 pem.iis.updatelimits 93 pem.iis.updatephpextensionslist 93 pem.iis.updatesystemengine 114 pem.iis.updatesystemmapping 115 pem.importcertificate 82 pem.installplesklicense 240 pem.migratesubscription (deprecated) 59 pem.modifyuser 101 pem.mscrm.createorg 178 pem.mscrm.createuser 178 pem.mscrm.disableorg 181 pem.mscrm.enableorg 181 pem.mscrm.getbusinessunits 181 pem.mscrm.getcurrencies 182 pem.mscrm.getorgbysubscription 182 pem.mscrm.getorginfo 183 pem.mscrm.getorglist 184 pem.mscrm.getorgusers 185 pem.mscrm.getsecurityroles 186 pem.mscrm.getuserinfo 186 pem.mscrm.modifysecurityroles 189 pem.mscrm.moveuser 189 pem.mscrm.removeorg 189 pem.mscrm.removeuser 190 pem.mscrm.setexchangedeliverysettings 190 pem.mscrm.setexternaldeliverysettings 191 pem.mscrm.setnonedeliverysettings 192 pem.mscrm.setorgdisplayname 192 pem.mscrm.setoutlookdeliverysettings 192 pem.mscrm.synchronizedata 193 pem.mssql.setquota 195 pem.mysql.applymysqlactivationparams 195 pem.ocs.getphonenumberlist 177 pem.ordersubscription (deprecated) 60 pem.packaging.native_repository.createreposito ry 236 pem.packaging.native_repository.getrepository 237 pem.packaging.native_repository.reindex 237 pem.packaging.native_repository.removereposit ory 238 pem.proftpd.createcustomftpuser 95 pem.proftpd.deletecustomftpuser 96 pem.proftpd.getcustomftpuserslist 96 pem.promotetoreseller 44 pem.provisionsubscription (deprecated) 61 pem.registerexternalsystem 262 pem.registersharednode 245 pem.removeaccount 45 pem.removeaccountmember 45 pem.removednshosting 83 pem.removedomain 83 pem.removedomainrequest 84 pem.removeptrrecord 84 pem.removesubscription 62 pem.removeuser 101 pem.resetresourceusage (internal) 210 pem.revokeippool 235 pem.revokeplesklicense 241 pem.revokerolesfrommember 52 pem.setaccountauthdata 45 pem.setaccountinfo 46 pem.setdomainregistrarstatus 85 pem.setexternalsystemconfig 263 pem.setftppassword 94 pem.sethostattributes 232 pem.setmemberinfo 47 pem.setmemberpassword 48 pem.setresourcetypelimit 211 pem.setresourcetypelimits 212 pem.setrtattributes 213 pem.setstactivationparams 229 pem.setstrtlimits 230 pem.setsubscriptionname 63 pem.setsystemproperty 49 pem.sharepoint.addsharepointuser 127 pem.sharepoint.createsharepointsite 120 pem.sharepoint.createsharepointsiteinsharedap plication 122 pem.sharepoint.deletesharepointsite 124 pem.sharepoint.getavailablesharepointsitetem plates 124 pem.sharepoint.removesharepointuser 127 pem.spam_assassin.additems 203 pem.spam_assassin.deleteitems 203 pem.spam_assassin.getitems 204 pem.statistics.getstatisticsreport 214 pem.syncnameservers (internal) 85 pem.unbindippool 235 pem.unbindservicesfromdomain 86 pem.unbranddomain 240 pem.unregisterexternalsystem 263 pem.unsethostattributes 232 pem.updateaccountandaccountmember (deprecated) 50 pem.upgradesubscription 63 pem.uploadlicense 225

Index 310 pem.virtuozzo.attachvps 241 pem.virtuozzo.importtemplate 242 pem.virtuozzo.installtemplate 242 pem.virtuozzo.installtemplates 243 pem.virtuozzo.registerhwnode 244 pem.virtuozzo.removetemplates 244 pem.virtuozzo.updateeztemplates 243 Preface 9 Provisioning Attributes Management 231 Provisioning Model Version 1 294 Provisioning Models 52 Public API Data Types 16 Public API Reference 23 Public API Security 17 Purpose 13 Q QMail Mailbox Management 196 R References 13 Resource Accounting 205 S Scope 13 Service Cancellation 300 Service Template Management 226 Service Users Management 97 Service User's Properties 102 SharePoint Management 120 Specification Rules 21 Subscriptions Management 52 Success Response 270 T Transactional Extension 265 txn.begin 267 txn.commit 268 txn.rollback 268 Typographical Conventions 9 U Unified Messaging Management 172 Using Transactions 304 W Webspace Management 86 X XML-RPC Samples 269