Description

This function initiates the conversion process for an addon domain into a cPanel account.


For information about the data that the system migrates when you convert an addon domain, read our Addon Domain Conversion List documentation.

Examples




https://hostname.example.com:2087/cpsess##########/json-api/convert_addon_initiate_conversion?api.version=1&domain=example.com&username=username&copymysqldb-olddatabase=newdatabase&movemysqldb=exampledb2&movemysqluser=dbuser




https://hostname.example.com:2087/cpsess##########/xml-api/convert_addon_initiate_conversion?api.version=1&domain=example.com&username=username&copymysqldb-olddatabase=newdatabase&movemysqldb=exampledb2&movemysqluser=dbuser




whmapi1 convert_addon_initiate_conversion domain=example.com user=username copymysqldb-olddatabase=newdatabase movemysqldb=exampledb2 movemysqluser=dbuser



{
   "metadata" : {
      "version" : 1,
      "reason" : "OK",
      "result" : 1,
      "command" : "convert_addon_initiate_conversion"
   },
   "data" : {}
}




<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <command>convert_addon_initiate_conversion</command>
        <reason>OK</reason>
    </metadata>
    <data></data>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
usernamestring

Required

The username for a specified account.

A valid cPanel user account.username
domainstring

Required

The addon domain to convert into an account's main domain.

A valid addon domain.example.com
pkgnamestring

The hosting package that you want to assign to the new account.

This value defaults to default.

A valid package name.default
copymysqldbstring

Copy a MySQL database from the source account to the new account with a new database name.

To copy multiple databases, call this parameter with the copymysqldb-olddatabase=newdatabase format. For example, to copy two separate databases, use the copymysqldb-olddatabase1=newdatabase1 copymysqldb-olddatabase2=newdatabase2 format.

If you do not specify this parameter, the system does not copy any MySQL databases to the new account.

A valid MySQL database.
olddatabase=newdatabase
movemysqldbstring

Move the specified MySQL database from the source account to the new account.

To move multiple databases, use the movemysqldb-# format, where # represents an increment value. For example, to move two databases, you would use the movemysqldb-1 and movemysqldb-2 format.

If you do not specify this parameter, the system does not move any MySQL databases to the new account.

A valid MySQL database.exampledb2
movemysqluserstring

Move the specified MySQL database user from the source account into the new MySQL database account.

To move multiple database users, use the movemysqluser-# format, where # represents an increment value. For example, to move two database users, you would use the movemysqluser-1=dbuser1 movemysqluser-2=dbuser2 format.

If you do not specify this parameter, the system does not move any MySQL database users to the new account.

A valid MySQL database username.dbuser

Returns

This function only returns metadata.