Child pages
  • WHM API 1 Functions - changepackage

Versions Compared

Key

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

Description

Excerpt

This function changes a cPanel account's hosting plan (package).


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/changepackage?api.version=1&user=username&pkg=package1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/changepackage?api.version=1&user=username&pkg=package1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 changepackage user=username pkg=package1

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "metadata":{  
      "output":{  
         "raw":"<pre>\nChanging the account bandwidth limit from "unlimited" to "524288000".\nChanging Feature List to default\nChanging the maximum email accounts from "7" to "5".\nChanging the maximum SQL databases from "unlimited" to "5".\nChanging the maximum FTP accounts from "unlimited" to "5".\nChanging the maximum mailing lists from "unlimited" to "5".\nChanging the maximum subdomains from "5" to "unlimited".\nChanging the maximum email quota from "500" to "unlimited"...\nChanging \"Maximum Hourly Email by Domain Relayed\" from unlimited to unlimited\nChanging \"Maximum percentage of failed or deferred messages a domain may send per hour\" from unlimited to unlimited\nChanging the maximum parked domains from "5" to "unlimited".\nChanging the maximum addon domains from "3" to "unlimited".\nShell Access Set Correctly\nChanging cPanel theme from paper_lantern to paper_lantern\nChanging plan from extensions_username_username_username to package\nBandwidth limit (524288000) is lower than (unlimited) (all limits removed)<br /><blockquote><div style='float:left;'>Enabling...</div><div style='float:left;'>...addondomain.com...</div><div style='float:left;'>...example.com...</div><div style='float:left;'>Done</div></blockquote><br /><div class='clearit' style='clear:both; width:80%;'>&nbsp;</div>Setting quota to "500".\n<span class=\"b2\">Warning, this will not change shared IP accounts to dedicated IP accounts, or the reverse.</span>\n<span class=\"b2\">Warning: Changing a user's package does not affect their Digest Authentication settings.</span>\n"
      },
      "result":1,
      "command":"changepackage",
      "reason":"Account Upgrade/Downgrade Complete for username",
      "version":1
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <version>1</version>
        <reason>Account Upgrade/Downgrade Complete for username</reason>
        <output>
            <raw>
                 <pre>Changing the account bandwidth limit from "524288000" to "524288000". Changing Feature List to default Changing the maximum email accounts from "5" to "5". Changing the maximum SQL databases from "5" to "5". Changing the maximum FTP accounts from "5" to "5". Changing the maximum mailing lists from "5" to "5". Changing the maximum subdomains from "unlimited" to "unlimited". Changing the maximum email quota from "500" to "unlimited"... Changing "Maximum Hourly Email by Domain Relayed" from unlimited to unlimited Changing "Maximum percentage of failed or deferred messages a domain may send per hour" from unlimited to unlimited Changing the maximum parked domains from "unlimited" to "unlimited". Changing the maximum addon domains from "unlimited" to "unlimited". Shell Access Set Correctly Changing cPanel theme from paper_lantern to paper_lantern Changing plan from package to package Bandwidth limit (524288000) is lower than (unlimited) (all limits removed)<br /><blockquote><div style='float:left;'>Enabling...</div><div style='float:left;'>...addondomain.com...</div><div style='float:left;'>...example.com...</div><div style='float:left;'>Done</div></blockquote><br /><div class='clearit' style='clear:both; width:80%;'>&nbsp;</div>Setting quota to "500". <span class="b2">Warning, this will not change shared IP accounts to dedicated IP accounts, or the reverse.</span> <span class="b2">Warning: Changing a user's package does not affect their Digest Authentication settings.</span>
            </raw>
        </output>
        <result>1</result>
        <command>changepackage</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   


Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The cPanel account's username.

A valid cPanel account on the server.username
pkgstring

Required

The hosting plan's name.

An existing hosting plan name on the server.

package1

Returns

This function only returns metadata.