Child pages
  • WHM API 1 Functions - convert_addon_initiate_conversion

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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


Note
titleNote:

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

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledWebServerRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
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



Expand
titleXML API


Code Block
languagexml
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



Expand
titleCommand Line


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

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
   "metadata" : {
      "version" : 1,
      "reason" : "OK",
      "result" : 1,
      "command" : "convert_addon_initiate_conversion"
   },
   "data" : {}
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <command>convert_addon_initiate_conversion</command>
        <reason>OK</reason>
    </metadata>
    <data></data>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


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.

Note
titleNote:

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.

Note
titleNote:

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.

Note
titleNote:

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.