Difference: XmlApi (1 vs. 61)

Revision 6123 May 2013 - Main.GeorgeAlpizar

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 494 to 494
  Check for SNI Support (is_sni_supported) — This function allows WHM users to see if the server supports SNI, which allows for multiple SSL certificates per IP address and port number. This function is only available in version 11.38+.
Added:
>
>

Service SSL functions

Install a Certificate on a Service (install_service_ssl_certificate) — This function allows WHM users to install a new certificate on a service. These services are =ftp, exim, dovecot, courier, and cpanel. This function is only available in version 11.38+.

Reset a Certificate on a Service (reset_service_ssl_certificate) — This function allows WHM users to regenerate a self-signed certificate and assign the certificate to a service. These services are ftp, exim, dovecot, courier, and cpanel. This function is only available in version 11.38+.

Retrieve a List of Services and Corresponding Certificates (fetch_service_ssl_components) — This function allows WHM users to retrieve a list of services and their corresponding certificates. These services are ftp, exim, dovecot, courier, and cpanel. This function is only available in version 11.38+.

 

Resources

Revision 6021 May 2013 - Main.GeorgeAlpizar

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 492 to 492
  Set the Primary Domain (set_primary_servername) — This function allows WHM users to set the primary domain on an IP address and port type for their accounts' sites. This function is only available in version 11.38+.
Changed:
<
<
Check for SNI Support (is_sni_supported) — his function allows WHM users to see if the server supports SNI, which allows for multiple SSL certificates per IP address and port number. This function is only available in version 11.38+.
>
>
Check for SNI Support (is_sni_supported) — This function allows WHM users to see if the server supports SNI, which allows for multiple SSL certificates per IP address and port number. This function is only available in version 11.38+.
 

Revision 5910 May 2013 - Main.GeorgeAlpizar

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 491 to 491
 List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.

Set the Primary Domain (set_primary_servername) — This function allows WHM users to set the primary domain on an IP address and port type for their accounts' sites. This function is only available in version 11.38+.

Added:
>
>
Check for SNI Support (is_sni_supported) — his function allows WHM users to see if the server supports SNI, which allows for multiple SSL certificates per IP address and port number. This function is only available in version 11.38+.
 

Resources

Revision 5810 May 2013 - Main.LaurenceSimon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 148 to 148
 

woops, ordering error: got an ENDTWISTY before seeing a TWISTY

Added:
>
>

How to batch function calls

You can combine multiple API calls with the batch function.

For example, you can combine the gethostname and version function calls with the following:

http://example.com:2087/SESSIONID/xml-api/batch?api.version=1&command=gethostname&command=version

This will provide the following output:

Show Hide

<--/twistyPlugin twikiMakeVisibleInline-->

<-- SyntaxHighlightingPlugin -->
<result>
    <data>
        <result>
            <data>
                <hostname>hostname.example.com</hostname>
            </data>
            <metadata>
                <version>1</version>
                <reason>OK</reason>
                <result>1</result>
                <command>gethostname</command>
            </metadata>
        </result>
        <result>
            <data>
                <version>11.38.0.6</version>
            </data>
            <metadata>
                <version>1</version>
                <reason>OK</reason>
                <result>1</result>
                <command>version</command>
            </metadata>
        </result>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>batch</command>
    </metadata>
</result>
<-- end SyntaxHighlightingPlugin -->

The following is the same batch function call in JSON format:

<-- SyntaxHighlightingPlugin -->
{
  "data": {
    "result": [
      {
        "data": {
          "hostname": "hostname.example.com"
        },
        "metadata": {
          "version": 1,
          "reason": "OK",
          "result": 1,
          "command": "gethostname"
        }
      },
      {
        "data": {
          "version": "11.38.0.6"
        },
        "metadata": {
          "version": 1,
          "reason": "OK",
          "result": 1,
          "command": "version"
        }
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "batch"
  }
}
<-- end SyntaxHighlightingPlugin -->

<--/twistyPlugin-->

If the function call takes arguments, you will need to format the input as URI (Uniform Resource Identifier) encoding.

For example, you can add the killdns function call to the earlier example:

http://example.com:2087/SESSIONID/xml-api/batch?api.version=1&command=gethostname&command=version&command=killdns%3Fdomain%3Dexample.com%0A=
 

Functions

Revision 5724 Apr 2013 - Main.StacyWyatt

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 193 to 193
  Has Digest Authentication (has_digest_auth) — This function will check whether a cPanel user has digest authentication enabled. Windows® Vista, Windows® 7, and Windows® 8 require Digest Authentication support be enabled in order to access the Web Disk over a clear text, unencrypted connection. This function is only available in version 11.34+.
Changed:
<
<
Restore Queue Add Task (restore_queue_add_task) — This function allows you to restore a user's account from a backup file.
>
>
Restore Queue Add Task (restore_queue_add_task) — This function allows you to restore a user's account from a backup file. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Activate (restore_queue_activate) — This function allows you to activate the restore queue and trigger a process to restore all queued accounts.
>
>
Restore Queue Activate (restore_queue_activate) — This function allows you to activate the restore queue and trigger a process to restore all queued accounts. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Is Active (restore_queue_is_active) — This function allows you to see if the queue is actively processing restore jobs.
>
>
Restore Queue Is Active (restore_queue_is_active) — This function allows you to see if the queue is actively processing restore jobs. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue List Pending (restore_queue_list_pending) — This function allows you to list all queued accounts to be restored.
>
>
Restore Queue List Pending (restore_queue_list_pending) — This function allows you to list all queued accounts to be restored. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue List Active (restore_queue_list_active) — This function allows you to list all accounts currently being restored.
>
>
Restore Queue List Active (restore_queue_list_active) — This function allows you to list all accounts currently being restored. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue List Completed (restore_queue_list_completed) — This function allows you to list all completed restorations along with the success or failure of the restore and the restore log.
>
>
Restore Queue List Completed (restore_queue_list_completed) — This function allows you to list all completed restorations along with the success or failure of the restore and the restore log. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear Pending Task (restore_queue_clear_pending_task) — This function allows you to clear a single pending account from the Restoration Queue.
>
>
Restore Queue Clear Pending Task (restore_queue_clear_pending_task) — This function allows you to clear a single pending account from the Restoration Queue. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear All Pending Tasks (restore_queue_clear_all_pending_tasks) — This function allows you to clear all pending accounts from the Restore Queue.
>
>
Restore Queue Clear All Pending Tasks (restore_queue_clear_all_pending_tasks) — This function allows you to clear all pending accounts from the Restore Queue. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear Completed Task (restore_queue_clear_completed_task) — This function allows you to clear a single, completed account from the Restoration Queue.
>
>
Restore Queue Clear Completed Task (restore_queue_clear_completed_task) — This function allows you to clear a single, completed account from the Restoration Queue. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear All Completed Tasks (restore_queue_clear_all_completed_tasks) — This function allows you to clear all successfully completed tasks from the Restoration Queue.
>
>
Restore Queue Clear All Completed Tasks (restore_queue_clear_all_completed_tasks) — This function allows you to clear all successfully completed tasks from the Restoration Queue. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear All Failed Tasks (restore_queue_clear_all_failed_tasks) — This function allows you to clear all failed tasks from the Restoration Queue.
>
>
Restore Queue Clear All Failed Tasks (restore_queue_clear_all_failed_tasks) — This function allows you to clear all failed tasks from the Restoration Queue. This function is only available in version 11.38+.
 
Changed:
<
<
Restore Queue Clear All Tasks (restore_queue_clear_all_tasks) — This function allows you to clear the Restoration Queue of all jobs, no matter the status.
>
>
Restore Queue Clear All Tasks (restore_queue_clear_all_tasks) — This function allows you to clear the Restoration Queue of all jobs, no matter the status. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Config Get (backup_config_get) — This function allows you to receive detailed data from your backup destination config file.
>
>
Backup Config Get (backup_config_get) — This function allows you to receive detailed data from your backup destination config file. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Config Set (backup_config_set) — This function allows you to save the data from the backup config page and put the data in /var/cpanel/backups/config
>
>
Backup Config Set (backup_config_set) — This function allows you to save the data from the backup config page and put the data in /var/cpanel/backups/config This function is only available in version 11.38+.
 
Changed:
<
<
Backup Skip Users All (backup_skip_users_all) — This function allows you to save the configuration for a given backup type. You can enable or disable backups all users.
>
>
Backup Skip Users All (backup_skip_users_all) — This function allows you to save the configuration for a given backup type. You can enable or disable backups all users. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Skip Users All Status (backup_skip_users_all_status) — This function allows you to retrieve the value from the status log file in the backup_skip_users_all api call.
>
>
Backup Skip Users All Status (backup_skip_users_all_status) — This function allows you to retrieve the value from the status log file in the backup_skip_users_all api call. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Set List (backup_set_list) — This function allows you to find all backup files available on the server. This function also returns a list of users and dates so that the Restore Account(s) feature in WHM can show them.
>
>
Backup Set List (backup_set_list) — This function allows you to find all backup files available on the server. This function also returns a list of users and dates so that the Restore Account(s) feature in WHM can show them. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Date List (backup_date_list) — This function allows you to retrieve a list of all dates that have backups.
>
>
Backup Date List (backup_date_list) — This function allows you to retrieve a list of all dates that have backups. This function is only available in version 11.38+.
 
Changed:
<
<
Backup User List (backup_user_list) — This function allows you to list all users with a backup file on a specific date.
>
>
Backup User List (backup_user_list) — This function allows you to list all users with a backup file on a specific date. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination Validate (backup_destination_validate) — This function allows you to run a validation routine on a specified backup destination.
>
>
Backup Destination Validate (backup_destination_validate) — This function allows you to run a validation routine on a specified backup destination. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination Add (backup_destination_add) — This function allows you to create a backup destination and save it to a config file.
>
>
Backup Destination Add (backup_destination_add) — This function allows you to create a backup destination and save it to a config file. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination Set (backup_destination_set) — This function allows you to modify the setup and data for a backup destination. The information is saved to the config file of the backup destination.
>
>
Backup Destination Set (backup_destination_set) — This function allows you to modify the setup and data for a backup destination. The information is saved to the config file of the backup destination. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination Delete (backup_destination_delete) — This function allows you to remove the backup destination config file.
>
>
Backup Destination Delete (backup_destination_delete) — This function allows you to remove the backup destination config file. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination Get (backup_destination_get) — This function allows you to retrieve detailed data for a specific backup destination from the backup destination config file.
>
>
Backup Destination Get (backup_destination_get) — This function allows you to retrieve detailed data for a specific backup destination from the backup destination config file. This function is only available in version 11.38+.
 
Changed:
<
<
Backup Destination List (backup_destination_list) — This function allows you to list all backup destinations, including their configuration information.
>
>
Backup Destination List (backup_destination_list) — This function allows you to list all backup destinations, including their configuration information. This function is only available in version 11.38+.
 

DNS functions

Revision 5623 Apr 2013 - Main.JenniferDoubrava

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 392 to 392
  List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
Changed:
<
<
>
>
Set the Primary Domain (set_primary_servername) — This function allows WHM users to set the primary domain on an IP address and port type for their accounts' sites. This function is only available in version 11.38+.
 

Resources

Revision 5522 Apr 2013 - Main.StacyWyatt

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 193 to 193
  Has Digest Authentication (has_digest_auth) — This function will check whether a cPanel user has digest authentication enabled. Windows® Vista, Windows® 7, and Windows® 8 require Digest Authentication support be enabled in order to access the Web Disk over a clear text, unencrypted connection. This function is only available in version 11.34+.
Added:
>
>
Restore Queue Add Task (restore_queue_add_task) — This function allows you to restore a user's account from a backup file.

Restore Queue Activate (restore_queue_activate) — This function allows you to activate the restore queue and trigger a process to restore all queued accounts.

Restore Queue Is Active (restore_queue_is_active) — This function allows you to see if the queue is actively processing restore jobs.

Restore Queue List Pending (restore_queue_list_pending) — This function allows you to list all queued accounts to be restored.

Restore Queue List Active (restore_queue_list_active) — This function allows you to list all accounts currently being restored.

Restore Queue List Completed (restore_queue_list_completed) — This function allows you to list all completed restorations along with the success or failure of the restore and the restore log.

Restore Queue Clear Pending Task (restore_queue_clear_pending_task) — This function allows you to clear a single pending account from the Restoration Queue.

Restore Queue Clear All Pending Tasks (restore_queue_clear_all_pending_tasks) — This function allows you to clear all pending accounts from the Restore Queue.

Restore Queue Clear Completed Task (restore_queue_clear_completed_task) — This function allows you to clear a single, completed account from the Restoration Queue.

Restore Queue Clear All Completed Tasks (restore_queue_clear_all_completed_tasks) — This function allows you to clear all successfully completed tasks from the Restoration Queue.

Restore Queue Clear All Failed Tasks (restore_queue_clear_all_failed_tasks) — This function allows you to clear all failed tasks from the Restoration Queue.

Restore Queue Clear All Tasks (restore_queue_clear_all_tasks) — This function allows you to clear the Restoration Queue of all jobs, no matter the status.

Backup Config Get (backup_config_get) — This function allows you to receive detailed data from your backup destination config file.

Backup Config Set (backup_config_set) — This function allows you to save the data from the backup config page and put the data in /var/cpanel/backups/config

Backup Skip Users All (backup_skip_users_all) — This function allows you to save the configuration for a given backup type. You can enable or disable backups all users.

Backup Skip Users All Status (backup_skip_users_all_status) — This function allows you to retrieve the value from the status log file in the backup_skip_users_all api call.

Backup Set List (backup_set_list) — This function allows you to find all backup files available on the server. This function also returns a list of users and dates so that the Restore Account(s) feature in WHM can show them.

Backup Date List (backup_date_list) — This function allows you to retrieve a list of all dates that have backups.

Backup User List (backup_user_list) — This function allows you to list all users with a backup file on a specific date.

Backup Destination Validate (backup_destination_validate) — This function allows you to run a validation routine on a specified backup destination.

Backup Destination Add (backup_destination_add) — This function allows you to create a backup destination and save it to a config file.

Backup Destination Set (backup_destination_set) — This function allows you to modify the setup and data for a backup destination. The information is saved to the config file of the backup destination.

Backup Destination Delete (backup_destination_delete) — This function allows you to remove the backup destination config file.

Backup Destination Get (backup_destination_get) — This function allows you to retrieve detailed data for a specific backup destination from the backup destination config file.

Backup Destination List (backup_destination_list) — This function allows you to list all backup destinations, including their configuration information.

 

DNS functions

note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.

Revision 5425 Mar 2013 - Main.JenniferDoubrava

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 346 to 346
 

Resources

These resources can help you interact with the XML and JSON APIs:

Changed:
<
<
>
>
 

Revision 5302 Oct 2012 - Main.JenniferDoubrava

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 320 to 320
 Retrieve a Tweak Settings option's value (get_tweaksetting) — You can use this function to retrieve the value of an option available on the WHM Tweak Settings screen. This function is only available in version 11.32+.

Set a Tweak Settings option's value (set_tweaksetting) — You can use this function to change the value of an option available on the WHM Tweak Settings screen. This function is only available in version 11.32+.

Added:
>
>
Retrieve Delivery Records (emailtrack_search) — This function retrieves delivery records. This function can return a large amount of data. You should filter and paginate results. This function is only available in version 11.32+.
 

Service functions

Revision 5225 Sep 2012 - Main.JenniferDoubrava

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 189 to 189
  Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.28+.
Added:
>
>
Set Digest Authentication (set_digest_auth) — This function enables or disables Digest Authentication for a user account. Windows® Vista, Windows® 7, and Windows® 8 require Digest Authentication support be enabled in order to access the Web Disk over a clear text, unencrypted connection. This function is only available in version 11.34+.

Has Digest Authentication (has_digest_auth) — This function will check whether a cPanel user has digest authentication enabled. Windows® Vista, Windows® 7, and Windows® 8 require Digest Authentication support be enabled in order to access the Web Disk over a clear text, unencrypted connection. This function is only available in version 11.34+.

 

DNS functions

note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.

Revision 5115 Feb 2012 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 187 to 187
  Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.28+.
 

DNS functions

Line: 215 to 215
  Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
Changed:
<
<
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.
>
>
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.28+.
 
Changed:
<
<
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.
>
>
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.28+.
 
Changed:
<
<
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.
>
>
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.28+.
 

Package functions

Line: 231 to 231
  List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
Changed:
<
<
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
>
>
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.28+.
 

Reseller functions

Line: 275 to 275
  Display the Server's Load Average (loadavg) — This function displays your server's load average.
Changed:
<
<
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
>
>
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.28+.
  View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
Line: 301 to 301
  Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
Changed:
<
<
Generate or Retrieve an Access Hash (accesshash) — This function allows you to retrieve an access hash for the root user.
>
>
Generate or Retrieve an Access Hash (accesshash) — This function allows you to retrieve an access hash for the root user. This function is only available in version 11.32+.
 
Changed:
<
<
Retrieve Documentation about a Specified Key (fetch_doc_key) — This function call allows you to retrieve documentation about a key referenced within a specified module.
>
>
Retrieve Documentation about a Specified Key (fetch_doc_key) — This function call allows you to retrieve documentation about a key referenced within a specified module. This function is only available in version 11.32+.
 
Changed:
<
<
Validate Exim's Configuration File Syntax (validate_exim_configuration_syntax) — This function will evaluate and validate Exim configuration file syntax.
>
>
Validate Exim's Configuration File Syntax (validate_exim_configuration_syntax) — This function will evaluate and validate Exim configuration file syntax. This function is only available in version 11.32+.
 
Changed:
<
<
Validate the Current Exim Configuration (validate_current_installed_exim_config) — This function validates the system's current Exim configuration.
>
>
Validate the Current Exim Configuration (validate_current_installed_exim_config) — This function validates the system's current Exim configuration. This function is only available in version 11.32+.
 
Changed:
<
<
Check and Repair the Exim Configuration (exim_configuration_check) — This function will check and, if it encounters any errors, attempt to repair your Exim configuration.
>
>
Check and Repair the Exim Configuration (exim_configuration_check) — This function will check and, if it encounters any errors, attempt to repair your Exim configuration. This function is only available in version 11.32+.
 
Changed:
<
<
Remove Exim Dry Run Configuration Files (remove_in_progress_exim_config_edit) — This function allows you to remove dry run files after a failed Exim update attempt.
>
>
Remove Exim Dry Run Configuration Files (remove_in_progress_exim_config_edit) — This function allows you to remove dry run files after a failed Exim update attempt. This function is only available in version 11.32+.

Retrieve a Tweak Settings option's value (get_tweaksetting) — You can use this function to retrieve the value of an option available on the WHM Tweak Settings screen. This function is only available in version 11.32+.

Set a Tweak Settings option's value (set_tweaksetting) — You can use this function to change the value of an option available on the WHM Tweak Settings screen. This function is only available in version 11.32+.

 

Service functions

Line: 319 to 323
  Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
Changed:
<
<
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager? .
>
>
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager.
 

SSL functions

Line: 331 to 335
  List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
Deleted:
<
<

Tweak Settings

Retrieve a Tweak Settings option's value (get_tweaksetting) — You can use this function to retrieve the value of an option available on the WHM Tweak Settings screen.

 
Deleted:
<
<
Set a Tweak Settings option's value (set_tweaksetting) — You can use this function to change the value of an option available on the WHM Tweak Settings screen.
 

Resources

Revision 5014 Feb 2012 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 307 to 307
  Validate Exim's Configuration File Syntax (validate_exim_configuration_syntax) — This function will evaluate and validate Exim configuration file syntax.
Added:
>
>
Validate the Current Exim Configuration (validate_current_installed_exim_config) — This function validates the system's current Exim configuration.

Check and Repair the Exim Configuration (exim_configuration_check) — This function will check and, if it encounters any errors, attempt to repair your Exim configuration.

Remove Exim Dry Run Configuration Files (remove_in_progress_exim_config_edit) — This function allows you to remove dry run files after a failed Exim update attempt.

 

Service functions

Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.

Revision 4914 Feb 2012 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 301 to 301
  Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
Changed:
<
<
Generate or Retrieve an Access Hash (accesshash) — This function allows you to retrieve an access hash for the root user.
>
>
Generate or Retrieve an Access Hash (accesshash) — This function allows you to retrieve an access hash for the root user.

Retrieve Documentation about a Specified Key (fetch_doc_key) — This function call allows you to retrieve documentation about a key referenced within a specified module.

Validate Exim's Configuration File Syntax (validate_exim_configuration_syntax) — This function will evaluate and validate Exim configuration file syntax.

 

Service functions

Revision 4814 Feb 2012 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 321 to 321
  List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
Added:
>
>

Tweak Settings

Retrieve a Tweak Settings option's value (get_tweaksetting) — You can use this function to retrieve the value of an option available on the WHM Tweak Settings screen.

Set a Tweak Settings option's value (set_tweaksetting) — You can use this function to change the value of an option available on the WHM Tweak Settings screen.

 

Resources

These resources can help you interact with the XML and JSON APIs:

Revision 4714 Feb 2012 - Main.RosieArcelay

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 300 to 300
 Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.

Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.

Added:
>
>
Generate or Retrieve an Access Hash (accesshash) — This function allows you to retrieve an access hash for the root user.
 

Service functions

Revision 4626 Jan 2012 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 30 to 30
 
    • https://example.com:2087/xml-api/functionname
    • https://example.com:2087/json-api/functionname
Changed:
<
<
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls? for more information about authenticating APIs from within a script.
>
>
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.
 
  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Revision 4517 Aug 2011 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 6 to 6
  There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.
Changed:
<
<
For information about parsing XML output, visit our Parsing XML document.
>
>
For information about parsing XML output, visit our Parsing XML document.
  PICK Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.
Line: 30 to 30
 
    • https://example.com:2087/xml-api/functionname
    • https://example.com:2087/json-api/functionname
Changed:
<
<
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls? for more information about authenticating APIs from within a script.
>
>
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls? for more information about authenticating APIs from within a script.
 
  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.
Line: 42 to 42
 

Variables used in XML and JSON function calls

Changed:
<
<
In addition to the input and output variables detailed here, each function call has its own distinct variables and output. For complete information about the function you wish to use, see the list of API functions below.
>
>
In addition to the input and output variables detailed here, each function call has its own distinct variables and output. For complete information about the function you wish to use, see the list of API functions below.
 

Input

Line: 151 to 151
 

Functions

Changed:
<
<
List Available API Calls (applist) — This function lists all XML/JSON API functions available to you.
>
>
List Available API Calls (applist) — This function lists all XML/JSON API functions available to you.
 
Changed:
<
<
Call the cPanel API1 and API2 commands (cpanel) — You can use the XML and JSON APIs to access cPanel API versions 1 and 2.
>
>
Call the cPanel API1 and API2 commands (cpanel) — You can use the XML and JSON APIs to access cPanel API versions 1 and 2.
 

Account functions

Changed:
<
<
Create an Account (createacct) — This API function allows you to create new cPanel accounts.
>
>
Create an Account (createacct) — This API function allows you to create new cPanel accounts.
 
Changed:
<
<
Change an Account's Password (passwd) — Using this API function, you can change a cPanel account's password.
>
>
Change an Account's Password (passwd) — Using this API function, you can change a cPanel account's password.
 
Changed:
<
<
Limit Bandwidth Usage (Transfer) (limitbw) — This API function allows you to change bandwidth limits for cPanel accounts.
>
>
Limit Bandwidth Usage (Transfer) (limitbw) — This API function allows you to change bandwidth limits for cPanel accounts.
 
Changed:
<
<
List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.
>
>
List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.
 
Changed:
<
<
Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
>
>
Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
 
Changed:
<
<
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
>
>
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
 
Changed:
<
<
Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
>
>
Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
 
Changed:
<
<
Suspend an Account (suspendacct) — Using this API function, you can prevent a user from accessing his or her cPanel account.
>
>
Suspend an Account (suspendacct) — Using this API function, you can prevent a user from accessing his or her cPanel account.
 
Changed:
<
<
List Suspended Accounts (listsuspended) — This function allows you to view a list of suspended accounts on your server.
>
>
List Suspended Accounts (listsuspended) — This function allows you to view a list of suspended accounts on your server.
 
Changed:
<
<
Terminate an Account (removeacct) — This API function allows you permanently remove an account from a server.
>
>
Terminate an Account (removeacct) — This API function allows you permanently remove an account from a server.
 
Changed:
<
<
Unsuspend an Account (unsuspendacct) — Using this API function, you can allow a user to access his or her cPanel account after it has been suspended.
>
>
Unsuspend an Account (unsuspendacct) — Using this API function, you can allow a user to access his or her cPanel account after it has been suspended.
 
Changed:
<
<
Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
>
>
Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
 
Changed:
<
<
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
>
>
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
 
Changed:
<
<
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details.
>
>
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details.
 
Changed:
<
<
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
>
>
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
 
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
 

DNS functions

Changed:
<
<
note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.
>
>
note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.
 
Changed:
<
<
Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
>
>
Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
 
Changed:
<
<
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
>
>
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
 
Changed:
<
<
>
>
 
Changed:
<
<
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.
>
>
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.
 
Changed:
<
<
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.
>
>
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.
 
Changed:
<
<
Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
>
>
Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
 
Changed:
<
<
List All DNS Zones (listzones) — This API function lists all domains and DNS zones on your server.
>
>
List All DNS Zones (listzones) — This API function lists all domains and DNS zones on your server.
 
Changed:
<
<
List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
>
>
List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
 
Changed:
<
<
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
>
>
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
 
Changed:
<
<
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server.
>
>
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server.
 
Changed:
<
<
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
>
>
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
 
Changed:
<
<
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.
>
>
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.
>
>
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.
>
>
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.
 

Package functions

Changed:
<
<
Add a Package (addpkg) — This API function adds a hosting package to your server.
>
>
Add a Package (addpkg) — This API function adds a hosting package to your server.
 
Changed:
<
<
Delete a Package (killpkg) — This API function deletes a hosting package from your server.
>
>
Delete a Package (killpkg) — This API function deletes a hosting package from your server.
 
Changed:
<
<
Edit a Package (editpkg) — This function lets you edit aspects of a hosting package.
>
>
Edit a Package (editpkg) — This function lets you edit aspects of a hosting package.
 
Changed:
<
<
List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
>
>
List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
 
Changed:
<
<
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
>
>
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
 

Reseller functions

Changed:
<
<
Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.
>
>
Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.
 
Changed:
<
<
Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.
>
>
Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.
 
Changed:
<
<
List Current Reseller ACL Lists (listacls) — This function lists the saved reseller ACL lists on the server.
>
>
List Current Reseller ACL Lists (listacls) — This function lists the saved reseller ACL lists on the server.
 
Changed:
<
<
List Reseller Accounts (listresellers) — This function lists all resellers on the server.
>
>
List Reseller Accounts (listresellers) — This function lists all resellers on the server.
 
Changed:
<
<
List Reseller's Accounts' Information (resellerstats) — This function shows statistics for a specific reseller's accounts.
>
>
List Reseller's Accounts' Information (resellerstats) — This function shows statistics for a specific reseller's accounts.
 
Changed:
<
<
Remove Reseller Privileges (unsetupreseller) — This function removes reseller status from a user's account.
>
>
Remove Reseller Privileges (unsetupreseller) — This function removes reseller status from a user's account.
 
Changed:
<
<
Set a Reseller's ACL List (setacls) — This function specifies the ACL for a reseller, or modifies specific ACL features for a reseller.
>
>
Set a Reseller's ACL List (setacls) — This function specifies the ACL for a reseller, or modifies specific ACL features for a reseller.
 
Changed:
<
<
Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
>
>
Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
 
Changed:
<
<
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account.
>
>
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account.
 
Changed:
<
<
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use.
>
>
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use.
 
Changed:
<
<
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account.
>
>
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account.
 
Changed:
<
<
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller.
>
>
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller.
 
Changed:
<
<
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account.
>
>
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account.
 
Changed:
<
<
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account.
>
>
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account.
 
Changed:
<
<
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server.
>
>
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server.
 
Changed:
<
<
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers.
>
>
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers.
 

Server information

Changed:
<
<
Display Server Hostname (gethostname) — This function displays the server's hostname.
>
>
Display Server Hostname (gethostname) — This function displays the server's hostname.
 
Changed:
<
<
Display cPanel & WHM Version (version) — This function displays the version of cPanel & WHM running on the server.
>
>
Display cPanel & WHM Version (version) — This function displays the version of cPanel & WHM running on the server.
 
Changed:
<
<
Display the Server's Load Average (loadavg) — This function displays your server's load average.
>
>
Display the Server's Load Average (loadavg) — This function displays your server's load average.
 
Changed:
<
<
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
>
>
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
>
>
View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
 

Server administration

note Note: If you wish to change the IP in a DNS zone record, you may find the swapip script more suitable than an API function.

Changed:
<
<
Reboot the Server (reboot) — This function allows you to restart your server.
>
>
Reboot the Server (reboot) — This function allows you to restart your server.
 
Changed:
<
<
Add IP Address (addip) — This function allows you to add an IP address to your server.
>
>
Add IP Address (addip) — This function allows you to add an IP address to your server.
 
Changed:
<
<
Delete IP Address (delip) — This function allows you to delete an IP address from your server.
>
>
Delete IP Address (delip) — This function allows you to delete an IP address from your server.
 
Changed:
<
<
List IP Addresses (listips) — This function allows you to list IP addresses associated with your server.
>
>
List IP Addresses (listips) — This function allows you to list IP addresses associated with your server.
 
Changed:
<
<
Set Hostname (sethostname) — This function allows you to set the hostname for your server. Note: This name must be different from your domain name.
>
>
Set Hostname (sethostname) — This function allows you to set the hostname for your server. Note: This name must be different from your domain name.
 
Changed:
<
<
Set Resolvers (setresolvers) — This function allows you to set the resolvers your server will use.
>
>
Set Resolvers (setresolvers) — This function allows you to set the resolvers your server will use.
 
Changed:
<
<
Show Bandwidth (showbw) — This function will list bandwidth usage per account.
>
>
Show Bandwidth (showbw) — This function will list bandwidth usage per account.
 
Changed:
<
<
Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.
>
>
Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.
 
Changed:
<
<
Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
>
>
Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
 

Service functions

Changed:
<
<
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
>
>
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
 
Changed:
<
<
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
>
>
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
 
Changed:
<
<
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager? .
>
>
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager? .
 

SSL functions

Changed:
<
<
Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
>
>
Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
 
Changed:
<
<
Generate an SSL Certificate (generatessl) — This function generates an SSL certificate.
>
>
Generate an SSL Certificate (generatessl) — This function generates an SSL certificate.
 
Changed:
<
<
Install an SSL Certificate (installssl) — This function lets you install an SSL certificate onto the server.
>
>
Install an SSL Certificate (installssl) — This function lets you install an SSL certificate onto the server.
 
Changed:
<
<
List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
>
>
List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
 

Resources

Revision 4418 Feb 2011 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 6 to 6
  There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.
Changed:
<
<
For information about parsing XML output, visit our Parsing XML document.
>
>
For information about parsing XML output, visit our Parsing XML document.
  PICK Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.
Line: 30 to 30
 
    • https://example.com:2087/xml-api/functionname
    • https://example.com:2087/json-api/functionname
Changed:
<
<
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.
>
>
  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls? for more information about authenticating APIs from within a script.
 
  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.
Line: 42 to 42
 

Variables used in XML and JSON function calls

Changed:
<
<
In addition to the input and output variables detailed here, each function call has its own distinct variables and output. For complete information about the function you wish to use, see the list of API functions below.
>
>
In addition to the input and output variables detailed here, each function call has its own distinct variables and output. For complete information about the function you wish to use, see the list of API functions below.
 

Input

Line: 58 to 58
 
For calls which perform an action
Added:
>
>
 
<-- SyntaxHighlightingPlugin -->
<name_of_XMLAPI_call>
     <result (status of the request) />
</name_of_XML_API_call>
<-- end SyntaxHighlightingPlugin -->
Added:
>
>
 
For calls which only request data
Added:
>
>
 
<-- SyntaxHighlightingPlugin -->
<name_of_XMLAPI_call>
     <item (information about the item) /> 
     ("Item" is the item request, such as a package, account, etc.)
</name_of_XML_API_call>
<-- end SyntaxHighlightingPlugin -->
Added:
>
>
 

Example

Calling this URL in WebHost Manager: /xml-api/setupreseller?user=bob&makeowner=1 will produce XML similar to:

Added:
>
>
 
<-- SyntaxHighlightingPlugin -->
<setupreseller>
     <result status="1" statusmsg=""/>
</setupreseller>
<-- end SyntaxHighlightingPlugin -->
Added:
>
>
 woops, ordering error: got an ENDTWISTY before seeing a TWISTY

JSON output format

Line: 89 to 96
  Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->

For calls which perform an action
Added:
>
>
 %CODE{lang="javascript"}% { "result":[
Line: 99 to 108
  ] } %ENDCODE%
Added:
>
>
 
For calls which only request data
Added:
>
>
 %CODE{lang="javascript"}% { "status":1,
Line: 117 to 129
  ] } %ENDCODE%
Added:
>
>
 

Example

Calling this URL in WebHost Manager: /json-api/setupreseller?user=bob&makeowner=1 will produce JSON output similar to:
Added:
>
>
 %CODE{lang="javascript"}% { "result":[
Line: 131 to 145
  ] } %ENDCODE%
Added:
>
>
 
<--/twistyPlugin-->

Functions

Changed:
<
<
List Available API Calls (applist) — This function lists all XML/JSON API functions available to you.
>
>
List Available API Calls (applist) — This function lists all XML/JSON API functions available to you.
 
Changed:
<
<
Call the cPanel API1 and API2 commands (cpanel) — You can use the XML and JSON APIs to access cPanel API versions 1 and 2.
>
>
Call the cPanel API1 and API2 commands (cpanel) — You can use the XML and JSON APIs to access cPanel API versions 1 and 2.
 

Account functions

Changed:
<
<
Create an Account (createacct) — This API function allows you to create new cPanel accounts.
>
>
Create an Account (createacct) — This API function allows you to create new cPanel accounts.
 
Changed:
<
<
Change an Account's Password (passwd) — Using this API function, you can change a cPanel account's password.
>
>
Change an Account's Password (passwd) — Using this API function, you can change a cPanel account's password.
 
Changed:
<
<
Limit Bandwidth Usage (Transfer) (limitbw) — This API function allows you to change bandwidth limits for cPanel accounts.
>
>
Limit Bandwidth Usage (Transfer) (limitbw) — This API function allows you to change bandwidth limits for cPanel accounts.
 
Changed:
<
<
List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.
>
>
List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.
 
Changed:
<
<
Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
>
>
Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
 
Changed:
<
<
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
>
>
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
 
Changed:
<
<
Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
>
>
Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
 
Changed:
<
<
Suspend an Account (suspendacct) — Using this API function, you can prevent a user from accessing his or her cPanel account.
>
>
Suspend an Account (suspendacct) — Using this API function, you can prevent a user from accessing his or her cPanel account.
 
Changed:
<
<
List Suspended Accounts (listsuspended) — This function allows you to view a list of suspended accounts on your server.
>
>
List Suspended Accounts (listsuspended) — This function allows you to view a list of suspended accounts on your server.
 
Changed:
<
<
Terminate an Account (removeacct) — This API function allows you permanently remove an account from a server.
>
>
Terminate an Account (removeacct) — This API function allows you permanently remove an account from a server.
 
Changed:
<
<
Unsuspend an Account (unsuspendacct) — Using this API function, you can allow a user to access his or her cPanel account after it has been suspended.
>
>
Unsuspend an Account (unsuspendacct) — Using this API function, you can allow a user to access his or her cPanel account after it has been suspended.
 
Changed:
<
<
Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
>
>
Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
 
Changed:
<
<
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
>
>
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
 
Changed:
<
<
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details.
>
>
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details.
 
Changed:
<
<
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
>
>
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
 
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
 

DNS functions

Changed:
<
<
note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.
>
>
note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.
 
Changed:
<
<
Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
>
>
Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
 
Changed:
<
<
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
>
>
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
 
Changed:
<
<
>
>
 
Changed:
<
<
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.
>
>
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.
 
Changed:
<
<
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.
>
>
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.
 
Changed:
<
<
Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
>
>
Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
 
Changed:
<
<
List All DNS Zones (listzones) — This API function lists all domains and DNS zones on your server.
>
>
List All DNS Zones (listzones) — This API function lists all domains and DNS zones on your server.
 
Changed:
<
<
List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
>
>
List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
 
Changed:
<
<
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
>
>
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
 
Changed:
<
<
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server.
>
>
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server.
 
Changed:
<
<
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
>
>
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
 
Changed:
<
<
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.
>
>
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.
>
>
List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.
>
>
Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.
 

Package functions

Changed:
<
<
Add a Package (addpkg) — This API function adds a hosting package to your server.
>
>
Add a Package (addpkg) — This API function adds a hosting package to your server.
 
Changed:
<
<
Delete a Package (killpkg) — This API function deletes a hosting package from your server.
>
>
Delete a Package (killpkg) — This API function deletes a hosting package from your server.
 
Changed:
<
<
Edit a Package (editpkg) — This function lets you edit aspects of a hosting package.
>
>
Edit a Package (editpkg) — This function lets you edit aspects of a hosting package.
 
Changed:
<
<
List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
>
>
List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
 
Changed:
<
<
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
>
>
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
 

Reseller functions

Changed:
<
<
Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.
>
>
Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.
 
Changed:
<
<
Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.
>
>
Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.
 
Changed:
<
<
List Current Reseller ACL Lists (listacls) — This function lists the saved reseller ACL lists on the server.
>
>
List Current Reseller ACL Lists (listacls) — This function lists the saved reseller ACL lists on the server.
 
Changed:
<
<
List Reseller Accounts (listresellers) — This function lists all resellers on the server.
>
>
List Reseller Accounts (listresellers) — This function lists all resellers on the server.
 
Changed:
<
<
List Reseller's Accounts' Information (resellerstats) — This function shows statistics for a specific reseller's accounts.
>
>
List Reseller's Accounts' Information (resellerstats) — This function shows statistics for a specific reseller's accounts.
 
Changed:
<
<
Remove Reseller Privileges (unsetupreseller) — This function removes reseller status from a user's account.
>
>
Remove Reseller Privileges (unsetupreseller) — This function removes reseller status from a user's account.
 
Changed:
<
<
Set a Reseller's ACL List (setacls) — This function specifies the ACL for a reseller, or modifies specific ACL features for a reseller.
>
>
Set a Reseller's ACL List (setacls) — This function specifies the ACL for a reseller, or modifies specific ACL features for a reseller.
 
Changed:
<
<
Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
>
>
Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
 
Changed:
<
<
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account.
>
>
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account.
 
Changed:
<
<
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use.
>
>
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use.
 
Changed:
<
<
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account.
>
>
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account.
 
Changed:
<
<
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller.
>
>
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller.
 
Changed:
<
<
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account.
>
>
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account.
 
Changed:
<
<
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account.
>
>
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account.
 
Changed:
<
<
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server.
>
>
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server.
 
Changed:
<
<
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers.
>
>
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers.
 

Server information

Changed:
<
<
Display Server Hostname (gethostname) — This function displays the server's hostname.
>
>
Display Server Hostname (gethostname) — This function displays the server's hostname.
 
Changed:
<
<
Display cPanel & WHM Version (version) — This function displays the version of cPanel & WHM running on the server.
>
>
Display cPanel & WHM Version (version) — This function displays the version of cPanel & WHM running on the server.
 
Changed:
<
<
Display the Server's Load Average (loadavg) — This function displays your server's load average.
>
>
Display the Server's Load Average (loadavg) — This function displays your server's load average.
 
Changed:
<
<
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
>
>
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
 
Changed:
<
<
View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
>
>
View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
 

Server administration

note Note: If you wish to change the IP in a DNS zone record, you may find the swapip script more suitable than an API function.

Changed:
<
<
Reboot the Server (reboot) — This function allows you to restart your server.
>
>
Reboot the Server (reboot) — This function allows you to restart your server.
 
Changed:
<
<
Add IP Address (addip) — This function allows you to add an IP address to your server.
>
>
Add IP Address (addip) — This function allows you to add an IP address to your server.
 
Changed:
<
<
Delete IP Address (delip) — This function allows you to delete an IP address from your server.
>
>
Delete IP Address (delip) — This function allows you to delete an IP address from your server.
 
Changed:
<
<
List IP Addresses (listips) — This function allows you to list IP addresses associated with your server.
>
>
List IP Addresses (listips) — This function allows you to list IP addresses associated with your server.
 
Changed:
<
<
Set Hostname (sethostname) — This function allows you to set the hostname for your server. Note: This name must be different from your domain name.
>
>
Set Hostname (sethostname) — This function allows you to set the hostname for your server. Note: This name must be different from your domain name.
 
Changed:
<
<
Set Resolvers (setresolvers) — This function allows you to set the resolvers your server will use.
>
>
Set Resolvers (setresolvers) — This function allows you to set the resolvers your server will use.
 
Changed:
<
<
Show Bandwidth (showbw) — This function will list bandwidth usage per account.
>
>
Show Bandwidth (showbw) — This function will list bandwidth usage per account.
 
Changed:
<
<
Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.
>
>
Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.
 
Changed:
<
<
Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
>
>
Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
 

Service functions

Changed:
<
<
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
>
>
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
 
Changed:
<
<
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
>
>
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
 
Changed:
<
<
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager.
>
>
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager? .
 

SSL functions

Changed:
<
<
Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
>
>
Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
 
Changed:
<
<
Generate an SSL Certificate (generatessl) — This function generates an SSL certificate.
>
>
Generate an SSL Certificate (generatessl) — This function generates an SSL certificate.
 
Changed:
<
<
Install an SSL Certificate (installssl) — This function lets you install an SSL certificate onto the server.
>
>
Install an SSL Certificate (installssl) — This function lets you install an SSL certificate onto the server.
 
Changed:
<
<
List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
>
>
List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
 

Resources

These resources can help you interact with the XML and JSON APIs:

Changed:
<
<
>
>
 

Revision 4303 Jan 2011 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 312 to 312
 
<-- 
  • Set PAGETITLE = XML and JSON APIs
-->
Deleted:
<
<
 
Deleted:
<
<
META FILEATTACHMENT attachment="config.pl.txt" attr="h" comment="cPanel remoteaccess autosignup" date="1290390622" name="config.pl.txt" path="config.pl" size="1659" stream="config.pl" tmpFilename="/var/tmp/CGItemp7873" user="EdelSikorski" version="1"

Revision 4223 Dec 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Our XML API allows you to issue commands to cPanel and WHM using the XML language, while our JSON API allows you to submit requests to the system and receive a JSON response. By including these commands in your custom scripts, you can perform functions remotely, without having to access the cPanel or WHM user interface.

There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.

Added:
>
>
For information about parsing XML output, visit our Parsing XML document.
  PICK Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.

Revision 4130 Nov 2010 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 253 to 253
  Display Server Hostname (gethostname) — This function displays the server's hostname.
Changed:
<
<
Display cPanel and WHM Version (version) — This function displays the version of cPanel/WHM running on the server.
>
>
Display cPanel & WHM Version (version) — This function displays the version of cPanel & WHM running on the server.
  Display the Server's Load Average (loadavg) — This function displays your server's load average.

Revision 4022 Nov 2010 - EdelSikorski

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 310 to 310
 
<-- 
  • Set PAGETITLE = XML and JSON APIs
-->
\ No newline at end of file
Added:
>
>

META FILEATTACHMENT attachment="config.pl.txt" attr="h" comment="cPanel remoteaccess autosignup" date="1290390622" name="config.pl.txt" path="config.pl" size="1659" stream="config.pl" tmpFilename="/var/tmp/CGItemp7873" user="EdelSikorski" version="1"

Revision 3929 Oct 2010 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 257 to 257
  Display the Server's Load Average (loadavg) — This function displays your server's load average.
Changed:
<
<
Display the Server's Load Average (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
>
>
Display the Server's Load Average (with Metadata) (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
  View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.

Revision 3823 Sep 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 179 to 179
  Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
Added:
>
>
 Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.

Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.

Revision 3702 Sep 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 169 to 169
  Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in WHM 11.25.1 and later.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in version 11.27/11.28+.
 

DNS functions

Line: 195 to 195
  Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
Added:
>
>
Resolve an IP Address from a Domain (resolvedomainname) — This function allows you to resolve the IP address of a specified domain. This function is only available in version 11.27/11.28+.

List a Domain's MX Records (listmxs) — This function will retrieve a list of a domain's MX records. This function is only available in version 11.27/11.28+.

Create a new MX Record (savemxs) — This function allows you to create a new MX record. This function is only available in version 11.27/11.28+.

 

Package functions

Add a Package (addpkg) — This API function adds a hosting package to your server.

Line: 205 to 211
  List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
Added:
>
>
List Available Features (getfeaturelist) — This function lists available features that you can assign to packages. This function is only available in version 11.27/11.28+.
 

Reseller functions

Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.

Line: 246 to 254
 Display cPanel and WHM Version (version) — This function displays the version of cPanel/WHM running on the server.

Display the Server's Load Average (loadavg) — This function displays your server's load average.

Added:
>
>
Display the Server's Load Average (systemloadavg) — This function displays your server's load average along with the call's metadata. This function is only available in version 11.27/11.28+.
  View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.

Revision 3627 Jul 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 169 to 169
  Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in WHM 11.25.1 and later.
 

DNS functions

Revision 3526 Jul 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 8 to 8
  PICK Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.
Deleted:
<
<
note Note: The JSON API is only available in cPanel/WHM version 11.25 and later.
 

Formatting and using API calls

Line: 86 to 84
 

JSON output format

Deleted:
<
<
note Note: The JSON API is only available in cPanel/WHM version 11.25 and later.
  Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->

For calls which perform an action
Line: 153 to 149
  Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
Changed:
<
<
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota. This function is only available in WHM 11.25 and later.
>
>
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
  Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
Line: 169 to 165
  View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
Changed:
<
<
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.
>
>
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details.
 
Changed:
<
<
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server. This function is only available in WHM 11.25 and later.
>
>
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server.
 
Changed:
<
<
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in WHM 11.25.1 and later.
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups.
 

DNS functions

Line: 181 to 177
  Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
Changed:
<
<
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record. This function is only available in WHM 11.25 and later.
>
>
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record.
 
Changed:
<
<
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record. This function is only available in WHM 11.25 and later.
>
>
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record.
 
Changed:
<
<
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain. This function is only available in WHM 11.25 and later.
>
>
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain.
  Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
Line: 195 to 191
  Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
Changed:
<
<
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server. This function is only available in WHM 11.25 and later.
>
>
Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server.
 
Changed:
<
<
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values. This function is only available in WHM 11.25 and later.
>
>
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values.
 

Package functions

Line: 227 to 223
  Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
Changed:
<
<
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account. This function is only available in WHM 11.25 and later.
>
>
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account.
 
Changed:
<
<
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use. This function is only available in WHM 11.25 and later.
>
>
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use.
 
Changed:
<
<
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account. This function is only available in WHM 11.25 and later.
>
>
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account.
 
Changed:
<
<
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller. This function is only available in WHM 11.25 and later.
>
>
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller.
 
Changed:
<
<
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account. This function is only available in WHM 11.25 and later.
>
>
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account.
 
Changed:
<
<
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
>
>
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account.
 
Changed:
<
<
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server. This function is only available in WHM 11.25 and later.
>
>
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server.
 
Changed:
<
<
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers. This function is only available in WHM 11.25 and later.
>
>
Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers.
 

Server information

Line: 279 to 275
  Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
Changed:
<
<
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server. This function is only available in WHM 11.25 and later.
>
>
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
 
Changed:
<
<
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager. This function is only available in WHM 11.25 and later.
>
>
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager.
 

SSL functions

Revision 3401 Jul 2010 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 172 to 172
 Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.

Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server. This function is only available in WHM 11.25 and later.

Added:
>
>
Restore an Account Backup (restoreaccount) — This function allows you to restore a backup for an account. You may restore daily, weekly, or monthly backups. This function is only available in WHM 11.25.1 and later.
 

DNS functions

Revision 3321 Dec 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 169 to 169
  View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.
Changed:
<
<
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain, including addon and subdomains, whether CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.
>
>
Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain. This information includes whether or not CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.
  Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server. This function is only available in WHM 11.25 and later.

Revision 3206 Nov 2009 - Main.JustinSchaefer

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="Trash.DeveloperResourcesWebHome"
>
>
META TOPICPARENT name="WebHome"
 

XML and JSON APIs

Our XML API allows you to issue commands to cPanel and WHM using the XML language, while our JSON API allows you to submit requests to the system and receive a JSON response. By including these commands in your custom scripts, you can perform functions remotely, without having to access the cPanel or WHM user interface.

Revision 3105 Nov 2009 - Main.JustinSchaefer

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="WebHome"
>
>
META TOPICPARENT name="Trash.DeveloperResourcesWebHome"
 

XML and JSON APIs

Our XML API allows you to issue commands to cPanel and WHM using the XML language, while our JSON API allows you to submit requests to the system and receive a JSON response. By including these commands in your custom scripts, you can perform functions remotely, without having to access the cPanel or WHM user interface.

Revision 3020 Oct 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 153 to 153
  Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
Changed:
<
<
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
>
>
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota. This function is only available in WHM 11.25 and later.
  Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.

Revision 2905 Oct 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 6 to 6
  There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.
Added:
>
>
PICK Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.
 note Note: The JSON API is only available in cPanel/WHM version 11.25 and later.

Revision 2805 Oct 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 273 to 273
 

Service functions

Changed:
<
<
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server. This function is only available in WHM 11.25 and later.
>
>
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
 
Changed:
<
<
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
>
>
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server. This function is only available in WHM 11.25 and later.
  Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager. This function is only available in WHM 11.25 and later.

Revision 2705 Oct 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 273 to 273
 

Service functions

Changed:
<
<
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
>
>
Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server. This function is only available in WHM 11.25 and later.
  Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.

Revision 2617 Aug 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 192 to 192
 Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.

Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server. This function is only available in WHM 11.25 and later.

Added:
>
>
Reset a DNS Zone (resetzone) — This API function will reset a DNS zone to its default values. This function is only available in WHM 11.25 and later.
 

Package functions

Revision 2511 Aug 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 168 to 168
 View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain, including addon and subdomains, whether CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.

Added:
>
>
Change a Site's (or User's) IP Address (setsiteip) — This function allows you to change the IP address associated with a website, or a user's account, hosted on your server. This function is only available in WHM 11.25 and later.
 

DNS functions

Revision 2403 Aug 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 165 to 165
  Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
Changed:
<
<
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

>
>
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

Obtain User Data for a Domain (domainuserdata) — This function displays information about a given domain, including addon and subdomains, whether CGI aliasing is enabled, log locations, and other details. This function is only available in WHM 11.25 and later.

 

DNS functions

Line: 185 to 187
  List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
Changed:
<
<
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
>
>
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.

Remove a DNS Zone Record (removezonerecord) — This function allows you to remove a zone record from the server. This function is only available in WHM 11.25 and later.

 

Package functions

Line: 227 to 231
  Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
Added:
>
>
View Information about Accounts Owned by a Reseller (acctcounts) — This function lists the number of accounts owned by each reseller on the server. This function is only available in WHM 11.25 and later.

Set a Reseller's Nameservers (setresellernameservers) — This function allows you to define a reseller's nameservers. This function is only available in WHM 11.25 and later.

 

Server information

Display Server Hostname (gethostname) — This function displays the server's hostname.

Line: 264 to 272
 Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.

Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.

Added:
>
>
Configure a Service (configureservice) — This function allows you to enable or disable a service, and enable or disable monitoring of that service, as in the WHM Service Manager. This function is only available in WHM 11.25 and later.
 

SSL functions

Revision 2303 Aug 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 56 to 56
 
For calls which perform an action
Changed:
<
<
%CODE{lang="html"}%
>
>
%CODE{lang="html"}%
 %ENDCODE%

For calls which only request data
Changed:
<
<
%CODE{lang="html"}% ("Item" is the item request, such as a package, account, etc.)
>
>
%CODE{lang="html"}% ("Item" is the item request, such as a package, account, etc.)
 %ENDCODE%

Example

Calling this URL in WebHost Manager: /xml-api/setupreseller?user=bob&makeowner=1 will produce XML similar to:

Changed:
<
<
%CODE{lang="html"}%
>
>
%CODE{lang="html"}%
 %ENDCODE%
<--/twistyPlugin-->
Line: 79 to 89
  Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->

For calls which perform an action
Changed:
<
<
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
>
>
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
 %ENDCODE%

For calls which only request data
Changed:
<
<
%CODE{lang="javascript"}% { "status":1, "statusmsg":"Ok", "acct":[ { "Item":"Parameters/Results", "Next Item":"Parameters/Results" }, { "Item":"Parameters/Results", "Next Item":"Parameters/Results" } ] }
>
>
%CODE{lang="javascript"}% { "status":1, "statusmsg":"Ok", "acct":[ { "Item":"Parameters/Results", "Next Item":"Parameters/Results" }, { "Item":"Parameters/Results", "Next Item":"Parameters/Results" } ] }
 %ENDCODE%

Example

Calling this URL in WebHost Manager: /json-api/setupreseller?user=bob&makeowner=1 will produce JSON output similar to:
Changed:
<
<
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
>
>
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
 %ENDCODE%
<--/twistyPlugin-->
Line: 125 to 165
  Upgrade or Downgrade an Account ( changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
Changed:
<
<
View Current User's Privileges ( myprivs) — Using this API function, you can find out what privileges you have within WHM.
>
>
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

 

DNS functions

Line: 145 to 185
  List (Dump) 1 Zone ( dumpzone) — This API function displays the DNS zone configuration for a specific domain.
Changed:
<
<
Look up a Nameserver's IP Address ( lookupnsip) — This API function retrives the IP address of a registered nameserver.
>
>
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
 

Package functions

Line: 240 to 280
 These resources can help you interact with the XML and JSON APIs:
Added:
>
>
 \ No newline at end of file

Revision 2203 Aug 2009 - Main.AaronPhillips

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 56 to 56
 
For calls which perform an action
Changed:
<
<
%CODE{lang="html"}%
>
>
%CODE{lang="html"}%
 %ENDCODE%

For calls which only request data
Changed:
<
<
%CODE{lang="html"}% ("Item" is the item request, such as a package, account, etc.)
>
>
%CODE{lang="html"}% ("Item" is the item request, such as a package, account, etc.)
 %ENDCODE%

Example

Calling this URL in WebHost Manager: /xml-api/setupreseller?user=bob&makeowner=1 will produce XML similar to:

Changed:
<
<
%CODE{lang="html"}%
>
>
%CODE{lang="html"}%
 %ENDCODE% woops, ordering error: got an ENDTWISTY before seeing a TWISTY
Line: 89 to 79
  Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->

For calls which perform an action
Changed:
<
<
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
>
>
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
 %ENDCODE%

For calls which only request data
Changed:
<
<
%CODE{lang="javascript"}% { "status":1, "statusmsg":"Ok", "acct":[ { "Item":"Parameters/Results", "Next Item":"Parameters/Results" }, { "Item":"Parameters/Results", "Next Item":"Parameters/Results" } ] }
>
>
%CODE{lang="javascript"}% { "status":1, "statusmsg":"Ok", "acct":[ { "Item":"Parameters/Results", "Next Item":"Parameters/Results" }, { "Item":"Parameters/Results", "Next Item":"Parameters/Results" } ] }
 %ENDCODE%

Example

Calling this URL in WebHost Manager: /json-api/setupreseller?user=bob&makeowner=1 will produce JSON output similar to:
Changed:
<
<
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
>
>
%CODE{lang="javascript"}% { "result":[ { "status":1, "statusmsg":null } ] }
 %ENDCODE%
<--/twistyPlugin-->
Line: 165 to 125
  Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.
Changed:
<
<
View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

>
>
View Current User's Privileges ( myprivs) — Using this API function, you can find out what privileges you have within WHM.
 

DNS functions

Line: 185 to 145
  List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
Changed:
<
<
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
>
>
Look up a Nameserver's IP Address ( lookupnsip) — This API function retrives the IP address of a registered nameserver.
 

Package functions

Line: 280 to 240
 These resources can help you interact with the XML and JSON APIs: \ No newline at end of file
Added:
>
>
  • Set PAGETITLE = XML and JSON APIs

Revision 2128 Jul 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 263 to 263
  Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
Changed:
<
<
Service Status (restartservice) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
>
>
Service Status (servicestatus) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
 

SSL functions

Revision 2001 Jul 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 6 to 6
  There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.
Added:
>
>
note Note: The JSON API is only available in cPanel/WHM version 11.25 and later.
 

Formatting and using API calls

Line: 80 to 82
 %ENDCODE% woops, ordering error: got an ENDTWISTY before seeing a TWISTY
Changed:
<
<

JSON output format

Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->
>
>

JSON output format

note Note: The JSON API is only available in cPanel/WHM version 11.25 and later.

Show Hide

<--/twistyPlugin twikiMakeVisibleInline-->
 
For calls which perform an action
%CODE{lang="javascript"}%

Revision 1929 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 163 to 163
 

DNS functions

Added:
>
>
note Note: If you wish to change the IP in a zone record, you may find the swapip script more suitable than an API function.
 Add a DNS Zone (adddns) — This API function lets you create a DNS zone.

Add a Zone Record (addzonerecord) — This API function allows you to add a zone record. This function is only available in WHM 11.25 and later.

Line: 228 to 233
 

Server administration

Added:
>
>
note Note: If you wish to change the IP in a DNS zone record, you may find the swapip script more suitable than an API function.
 Reboot the Server (reboot) — This function allows you to restart your server.

Add IP Address (addip) — This function allows you to add an IP address to your server.

Revision 1826 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 165 to 165
  Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
Changed:
<
<
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record. This function is only available in WHM 11.25 and later.
>
>
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record. This function is only available in WHM 11.25 and later.
>
>
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain. This function is only available in WHM 11.25 and later.
>
>
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain. This function is only available in WHM 11.25 and later.
  Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
Line: 205 to 205
  Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
Changed:
<
<
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account. This function is only available in WHM 11.25 and later.
>
>
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use. This function is only available in WHM 11.25 and later.
>
>
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account. This function is only available in WHM 11.25 and later.
>
>
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller. This function is only available in WHM 11.25 and later.
>
>
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account. This function is only available in WHM 11.25 and later.
>
>
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
>
>
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
 

Server information

Display Server Hostname (gethostname) — This function displays the server's hostname.

Revision 1723 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 248 to 248
 

Service functions

Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
Added:
>
>
Service Status (restartservice) — This function tells you which services (daemons) are enabled, installed, and monitored on your server.
 

SSL functions

Revision 1619 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 144 to 144
 List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.

Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.

Added:
>
>
Edit Quota (editquota) — This API function allows you to edit a user's disk space quota.
  Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.

Revision 1515 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML and JSON APIs

Line: 159 to 159
  View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

Changed:
<
<

DNS Functions

>
>

DNS functions

  Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
Line: 177 to 177
  Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.
Changed:
<
<

Package Functions

>
>

Package functions

 Add a Package (addpkg) — This API function adds a hosting package to your server.

Delete a Package (killpkg) — This API function deletes a hosting package from your server.

Line: 186 to 186
  List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
Changed:
<
<

Reseller Functions

>
>

Reseller functions

 Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.

Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.

Line: 215 to 215
  Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
Changed:
<
<

Server Information

>
>

Server information

 Display Server Hostname (gethostname) — This function displays the server's hostname.

Display cPanel and WHM Version (version) — This function displays the version of cPanel/WHM running on the server.

Line: 224 to 224
  View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.
Changed:
<
<

Server Administration

>
>

Server administration

  Reboot the Server (reboot) — This function allows you to restart your server.
Line: 244 to 244
  Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.
Changed:
<
<

Service Functions

>
>

Service functions

 Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
Changed:
<
<

SSL Functions

>
>

SSL functions

  Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
Line: 257 to 257
  List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.
Deleted:
<
<
<--- 
Edit Web Left Bar — Leave this up temporarily for easy access.

Original Web Left Bar? — Leave this up temporarily for easy access.

ApiAuthentication --->

 

Resources

These resources can help you interact with the XML and JSON APIs:

Revision 1410 Jun 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

XML API Documentation

>
>

XML and JSON APIs

 
Changed:
<
<

Resources

>
>
Our XML API allows you to issue commands to cPanel and WHM using the XML language, while our JSON API allows you to submit requests to the system and receive a JSON response. By including these commands in your custom scripts, you can perform functions remotely, without having to access the cPanel or WHM user interface.

There are several possible applications of the XML and JSON APIs. For example, they can make managing a data center easy by allowing you to issue a single command across multiple servers.

Formatting and using API calls

Each XML and JSON API call is formatted as a URL. To create a function call:

  • Begin with the HTTP address of your web server.

  • Append a colon (:) and the appropriate port number. The port you use will vary depending on whether you wish to issue a command to WHM or cPanel.
    • 2082 — cPanel (unsecured).
    • 2083 — cPanel (secured).
    • 2086 — WHM (unsecured).
    • 2087 — WHM (secured).

  • Add /xml-api/functionname or /json-api/functionname, plus any variables required by the specific function you are calling. (For more information, see the documentation for each function, linked below.)

  • For example, if your web server's hostname is example.com, you would include one of the following strings in your script:
    • https://example.com:2087/xml-api/functionname
    • https://example.com:2087/json-api/functionname

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Examples

To use the setupreseller function on a server whose hostname is example.com, you would include a string similar to the following in your script:

  • XML API: https://example.com:2087/xml-api/setupreseller?user=bob&makeowner=1
  • JSON API: https://example.com:2087/json-api/setupreseller?user=bob&makeowner=1

Variables used in XML and JSON function calls

In addition to the input and output variables detailed here, each function call has its own distinct variables and output. For complete information about the function you wish to use, see the list of API functions below.

Input

A function call consists of the following input variables:

  • name (string) — Name of the XML or JSON API call.
  • ? — A question mark (?) is used to append information to the call.
  • variable=value (string) — Variables and their values can then be passed to the call.
  • & — An ampersand (&) is used to add variables and values to the call.

XML output format

Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->

The output consists of a call container, in angle brackets (<>), that contains a result container, also in angle brackets (<>). The output will appear like so:

For calls which perform an action
 
Changed:
<
<
There are a number of resources available to help you interact with the XML API:
>
>
<-- SyntaxHighlightingPlugin -->
<name_of_XMLAPI_call>
     <result (status of the request) />
</name_of_XML_API_call>
<-- end SyntaxHighlightingPlugin -->
 
Changed:
<
<
XML API Mailing List
>
>
For calls which only request data
 
Changed:
<
<
The cPanel Developer Forum
>
>
<-- SyntaxHighlightingPlugin -->
<name_of_XMLAPI_call>
     <item (information about the item) /> 
     ("Item" is the item request, such as a package, account, etc.)
</name_of_XML_API_call>
<-- end SyntaxHighlightingPlugin -->
 
Changed:
<
<

XML API Fast Mode

>
>

Example

 
Changed:
<
<
Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML input. The server-side processing of Fast Mode requests is also much faster than processing XML requests.
>
>
Calling this URL in WebHost Manager: /xml-api/setupreseller?user=bob&makeowner=1 will produce XML similar to:
 
Changed:
<
<
Using Fast Mode, a request looks like this:
>
>
<-- SyntaxHighlightingPlugin -->
<setupreseller>
     <result status="1" statusmsg=""/>
</setupreseller>
<-- end SyntaxHighlightingPlugin -->
<--/twistyPlugin-->
 
Changed:
<
<
/xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar& cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
>
>

JSON output format

Show Hide
<--/twistyPlugin twikiMakeVisibleInline-->
 
Changed:
<
<
note Note: When you generate the Fast Mode request, submit the entire request as a single string. For display purposes, the example above may be wrapped.
>
>
For calls which perform an action
<-- SyntaxHighlightingPlugin -->
{
   "result":[
      {
         "status":1,
         "statusmsg":null
      }
   ]
}
<-- end SyntaxHighlightingPlugin -->
 
Changed:
<
<

XML API Functions

>
>
For calls which only request data
<-- SyntaxHighlightingPlugin -->
{
   "status":1,
   "statusmsg":"Ok",
   "acct":[
      {
         "Item":"Parameters/Results",
         "Next Item":"Parameters/Results"
      },
      {
         "Item":"Parameters/Results",
         "Next Item":"Parameters/Results"
      }
   ]
}
<-- end SyntaxHighlightingPlugin -->
 
Changed:
<
<
The following links are to the documentation for WHM's XML API functions.

XML API

>
>

Example

Calling this URL in WebHost Manager: /json-api/setupreseller?user=bob&makeowner=1 will produce JSON output similar to:
 
Changed:
<
<
Using XML API Calls
>
>
<-- SyntaxHighlightingPlugin -->
{
   "result":[
      {
         "status":1,
         "statusmsg":null
      }
   ]
}
<-- end SyntaxHighlightingPlugin -->
<--/twistyPlugin-->
 
Changed:
<
<
List Available API Calls (applist)
>
>

Functions

 
Changed:
<
<
Call cPanel API and API2 Functions (cpanel)
>
>
List Available API Calls (applist) — This function lists all XML/JSON API functions available to you.
 
Changed:
<
<

Account Functions

>
>
Call the cPanel API1 and API2 commands (cpanel) — You can use the XML and JSON APIs to access cPanel API versions 1 and 2.
 
Changed:
<
<
Create an Account (createacct)
>
>

Account functions

 
Changed:
<
<
Change an Account's Password (passwd)
>
>
Create an Account (createacct) — This API function allows you to create new cPanel accounts.
 
Changed:
<
<
Limit Bandwidth Usage (Transfer) (limitbw)
>
>
Change an Account's Password (passwd) — Using this API function, you can change a cPanel account's password.
 
Changed:
<
<
List Accounts (listaccts)
>
>
Limit Bandwidth Usage (Transfer) (limitbw) — This API function allows you to change bandwidth limits for cPanel accounts.
 
Changed:
<
<
Modify an Account (modifyacct)
>
>
List Accounts (listaccts) — This API function will generate a list of accounts associated with a server.
 
Changed:
<
<
Show an Account's Information? (accountsummary)
>
>
Modify an Account (modifyacct) — Using this API function, you are able to change specific attributes of cPanel accounts, such as the theme or domain.
 
Changed:
<
<
Suspend an Account (suspendacct)
>
>
Show an Account's Information (accountsummary) — This API function will generate a list of an account's attributes, such as its IP address and partition.
 
Changed:
<
<
Terminate an Account (removeacct)
>
>
Suspend an Account (suspendacct) — Using this API function, you can prevent a user from accessing his or her cPanel account.
 
Changed:
<
<
Unsuspend an Account (unsuspendacct)
>
>
List Suspended Accounts (listsuspended) — This function allows you to view a list of suspended accounts on your server.
 
Changed:
<
<
Upgrade or Downgrade an Account (changepackage)
>
>
Terminate an Account (removeacct) — This API function allows you permanently remove an account from a server.
 
Changed:
<
<
View Current User's Privileges (myprivs)
>
>
Unsuspend an Account (unsuspendacct) — Using this API function, you can allow a user to access his or her cPanel account after it has been suspended.

Upgrade or Downgrade an Account (changepackage) — This API function allows you to change the hosting plan associated with a cPanel account.

View Current User's Privileges (myprivs) — Using this API function, you can find out what privileges you have within WHM.

 

DNS Functions

Changed:
<
<
Only available in 11.24+
>
>
Add a DNS Zone (adddns) — This API function lets you create a DNS zone.
 
Changed:
<
<
Add a DNS Zone (adddns)
>
>
Add a Zone Record (addzonerecord) — This API function allows you to add a zone record. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Delete a DNS Zone (killdns)
>
>
Edit a Zone Record (editzonerecord) — This function allows you to edit an existing zone record. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
List All DNS Zones (listzones)
>
>
Get a Zone Record (getzonerecord) — This function allows you to view DNS zone records associated with a given domain. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
List (Dump) 1 Zone (dumpzone)
>
>
Delete a DNS Zone (killdns) — This API function lets you delete a DNS zone.
 
Changed:
<
<
Lookup a Nameserver's IP Address (lookupnsip)
>
>
List All DNS Zones (listzones) — This API function lists all domains and DNS zones on your server.
 
Changed:
<
<

Package Functions

>
>
List (Dump) 1 Zone (dumpzone) — This API function displays the DNS zone configuration for a specific domain.
 
Changed:
<
<
Add a Package (addpkg)
>
>
Look up a Nameserver's IP Address (lookupnsip) — This API function retrives the IP address of a registered nameserver.

Package Functions

Add a Package (addpkg) — This API function adds a hosting package to your server.
 
Changed:
<
<
Delete a Package (killpkg)
>
>
Delete a Package (killpkg) — This API function deletes a hosting package from your server.
 
Changed:
<
<
Edit a Package (editpkg)
>
>
Edit a Package (editpkg) — This function lets you edit aspects of a hosting package.
 
Changed:
<
<
List Packages (listpkgs)
>
>
List Packages (listpkgs) — This API function lets you view all hosting packages available to the user.
 

Reseller Functions

Added:
>
>
Add Reseller Privileges (setupreseller) — This function allows you to confer reseller status to a user's account.

Create a Reseller ACL List (saveacllist) — This function allows you to create a new ACL list to use when setting up reseller accounts.

List Current Reseller ACL Lists (listacls) — This function lists the saved reseller ACL lists on the server.

List Reseller Accounts (listresellers) — This function lists all resellers on the server.

List Reseller's Accounts' Information (resellerstats) — This function shows statistics for a specific reseller's accounts.

Remove Reseller Privileges (unsetupreseller) — This function removes reseller status from a user's account.

 
Changed:
<
<
Add Reseller Privileges (setupreseller)
>
>
Set a Reseller's ACL List (setacls) — This function specifies the ACL for a reseller, or modifies specific ACL features for a reseller.
 
Changed:
<
<
Create a Reseller ACL List (saveacllist)
>
>
Terminate a Reseller (terminatereseller) — This function allows you to terminate a reseller's account.
 
Changed:
<
<
List Current Reseller ACL Lists (listacls)
>
>
Assign a Reseller IP Addresses (setresellerips) — This function lets you add IP addresses to a reseller's account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
List Reseller Accounts (listresellers)
>
>
Set Reseller Limits (setresellerlimits) — This function lets you set limits on the amount of bandwidth and disk space a reseller can use. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
List Reseller's Accounts' Information (resellerstats)
>
>
Set up a Reseller's Main IP Address (setresellermainip) — This function lets you assign a main, shared IP address to a reseller's account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Remove Reseller Privileges (unsetupreseller)
>
>
Define a Reseller's Packages (setresellerpackagelimit) — This function allows you to control which packages resellers are able to use. It also lets you define the number of times a package can be used by a reseller. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Set a Reseller's ACL List (setacls)
>
>
Suspend a Reseller's Account (suspendreseller) — This function lets you suspend a reseller, thereby preventing the reseller from accessing his or her account. This function is only available in WHM 11.25 and later.
 
Changed:
<
<
Terminate a Reseller (terminatereseller)
>
>
Unsuspend a Reseller's Account (unsuspendreseller) — This function lets you unsuspend a reseller, thereby allowing the reseller to access his or her account. This function is only available in WHM 11.25 and later.
 

Server Information

Added:
>
>
Display Server Hostname (gethostname) — This function displays the server's hostname.
 
Changed:
<
<
Display Server Hostname (gethostname)
>
>
Display cPanel and WHM Version (version) — This function displays the version of cPanel/WHM running on the server.
 
Changed:
<
<
Display cPanel and WHM Version (version)
>
>
Display the Server's Load Average (loadavg) — This function displays your server's load average.

View a List of Available Languages (getlanglist) — This function displays a list of the languages available on your server.

 

Server Administration

Changed:
<
<
Only available in versions 11.24+
>
>
Reboot the Server (reboot) — This function allows you to restart your server.
 
Changed:
<
<
Add IP Address (addip)
>
>
Add IP Address (addip) — This function allows you to add an IP address to your server.
 
Changed:
<
<
Delete IP Address (delip)
>
>
Delete IP Address (delip) — This function allows you to delete an IP address from your server.
 
Changed:
<
<
List IP Addresses (listips)
>
>
List IP Addresses (listips) — This function allows you to list IP addresses associated with your server.
 
Changed:
<
<
Set Hostname (sethostname)
>
>
Set Hostname (sethostname) — This function allows you to set the hostname for your server. Note: This name must be different from your domain name.
 
Changed:
<
<
Set Resolvers (setresolvers)
>
>
Set Resolvers (setresolvers) — This function allows you to set the resolvers your server will use.
 
Changed:
<
<

Service Functions

>
>
Show Bandwidth (showbw) — This function will list bandwidth usage per account.

Set a Non-Volatile Variable Value (nvset) — Non-volatile variables are used to save data on your server. This function allows you to set a non-volatile variable's value.

 
Changed:
<
<
Restart Service (restartservice)
>
>
Retrieve a Non-Volatile Variable Value (nvget) — This function allows you to retrieve and view a non-volatile variable's value.

Service Functions

Restart Service (restartservice) — This function lets you restart a service, or daemon, on your server.
 

SSL Functions

Changed:
<
<
Only available in versions 11.24+
>
>
Fetch SSL Certificate Information (fetchsslinfo) — This function displays an SSL certificate, CA bundle, and private key for a specified domain, or it can display a CA bundle and private key for a specified SSL certificate.
 
Changed:
<
<
Fetch SSL Certificate Information (fetchsslinfo)
>
>
Generate an SSL Certificate (generatessl) — This function generates an SSL certificate.
 
Changed:
<
<
Generate SSL Certificate (generatessl)
>
>
Install an SSL Certificate (installssl) — This function lets you install an SSL certificate onto the server.
 
Changed:
<
<
Install a SSL Certificate (installssl)
>
>
List Available SSL Certificates (listcrts) — This function lists all domains on the server which have SSL certificates installed.

<--- 
Edit Web Left Bar — Leave this up temporarily for easy access.

Original Web Left Bar? — Leave this up temporarily for easy access.

ApiAuthentication --->

Resources

 
Changed:
<
<
List Available SSL Certificates (listcrts)
>
>
These resources can help you interact with the XML and JSON APIs:

Revision 1306 May 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Line: 15 to 15
  Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML input. The server-side processing of Fast Mode requests is also much faster than processing XML requests.
Changed:
<
<
Using Fast Mode, a request looks like this (the actual string should not include line breaks):
>
>
Using Fast Mode, a request looks like this:
 
Changed:
<
<
/xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar& cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
>
>
/xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar& cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
  note Note: When you generate the Fast Mode request, submit the entire request as a single string. For display purposes, the example above may be wrapped.

Revision 1205 May 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Line: 15 to 15
  Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML input. The server-side processing of Fast Mode requests is also much faster than processing XML requests.
Changed:
<
<
Using Fast Mode, a request looks like: /xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar&cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
>
>
Using Fast Mode, a request looks like this (the actual string should not include line breaks):

/xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar& cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains

  note Note: When you generate the Fast Mode request, submit the entire request as a single string. For display purposes, the example above may be wrapped.

Revision 1104 May 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Line: 26 to 26
  Using XML API Calls
Changed:
<
<
List Available API Calls
>
>
List Available API Calls (applist)

Call cPanel API and API2 Functions (cpanel)

 
Deleted:
<
<
Call cPanel API and API2 Functions
 

Account Functions

Changed:
<
<
Create an Account
>
>
Create an Account (createacct)

Change an Account's Password (passwd)

 
Changed:
<
<
Change an Account's Password
>
>
Limit Bandwidth Usage (Transfer) (limitbw)
 
Changed:
<
<
Limit Bandwidth Usage (Transfer)
>
>
List Accounts (listaccts)
 
Changed:
<
<
List Accounts
>
>
Modify an Account (modifyacct)
 
Changed:
<
<
Modify an Account
>
>
Show an Account's Information? (accountsummary)
 
Changed:
<
<
Show an Account's Information?
>
>
Suspend an Account (suspendacct)
 
Changed:
<
<
Suspend an Account
>
>
Terminate an Account (removeacct)
 
Changed:
<
<
Terminate an Account
>
>
Unsuspend an Account (unsuspendacct)
 
Changed:
<
<
Unsuspend an Account
>
>
Upgrade or Downgrade an Account (changepackage)
 
Changed:
<
<
Upgrade or Downgrade an Account (Change Package)
>
>
View Current User's Privileges (myprivs)
 
Deleted:
<
<
View Current User's Privileges
 

DNS Functions

Only available in 11.24+

Changed:
<
<
Add a DNS Zone
>
>
Add a DNS Zone (adddns)
 
Changed:
<
<
Delete a DNS Zone
>
>
Delete a DNS Zone (killdns)
 
Changed:
<
<
List All DNS Zones
>
>
List All DNS Zones (listzones)
 
Changed:
<
<
List (Dump) 1 Zone
>
>
List (Dump) 1 Zone (dumpzone)

Lookup a Nameserver's IP Address (lookupnsip)

 
Deleted:
<
<
Lookup a Nameserver's IP Address
 

Package Functions

Changed:
<
<
Add a Package
>
>
Add a Package (addpkg)

Delete a Package (killpkg)

 
Changed:
<
<
Delete a Package
>
>
Edit a Package (editpkg)
 
Changed:
<
<
Edit a Package
>
>
List Packages (listpkgs)
 
Deleted:
<
<
List Packages
 

Reseller Functions

Add Reseller Privileges (setupreseller)

Line: 91 to 95
 Set a Reseller's ACL List (setacls)

Terminate a Reseller (terminatereseller)

Added:
>
>
 

Server Information

Changed:
<
<
Display Server Hostname
>
>
Display Server Hostname (gethostname)

Display cPanel and WHM Version (version)

 
Deleted:
<
<
Display cPanel and WHM Version
 

Server Administration

Only available in versions 11.24+

Changed:
<
<
Add IP Address
>
>
Add IP Address (addip)
 
Changed:
<
<
Delete IP Address
>
>
Delete IP Address (delip)
 
Changed:
<
<
List IP Addresses
>
>
List IP Addresses (listips)
 
Changed:
<
<
Set Hostname
>
>
Set Hostname (sethostname)

Set Resolvers (setresolvers)

 
Deleted:
<
<
Set Resolvers
 

Service Functions

Changed:
<
<
Restart Service
>
>
Restart Service (restartservice)
 

SSL Functions

Only available in versions 11.24+

Changed:
<
<
Fetch SSL Certificate Information
>
>
Fetch SSL Certificate Information (fetchsslinfo)
 
Changed:
<
<
Generate SSL Certificate
>
>
Generate SSL Certificate (generatessl)
 
Changed:
<
<
Install a SSL Certificate
>
>
Install a SSL Certificate (installssl)
 
Deleted:
<
<
List Available SSL Certificates
 \ No newline at end of file
Added:
>
>
List Available SSL Certificates (listcrts)

Revision 1002 May 2009 - Main.JNickKoston

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Line: 76 to 76
 List Packages

Reseller Functions

Changed:
<
<
Add Reseller Privileges
>
>
Add Reseller Privileges (setupreseller)
 
Changed:
<
<
Create a Reseller ACL List
>
>
Create a Reseller ACL List (saveacllist)
 
Changed:
<
<
List Current Reseller ACL Lists
>
>
List Current Reseller ACL Lists (listacls)
 
Changed:
<
<
List Reseller Accounts
>
>
List Reseller Accounts (listresellers)
 
Changed:
<
<
List Reseller's Accounts' Information
>
>
List Reseller's Accounts' Information (resellerstats)
 
Changed:
<
<
Remove Reseller Privileges
>
>
Remove Reseller Privileges (unsetupreseller)
 
Changed:
<
<
Set a Reseller's ACL List
>
>
Set a Reseller's ACL List (setacls)
 
Changed:
<
<
Terminate a Reseller
>
>
Terminate a Reseller (terminatereseller)
 

Server Information

Display Server Hostname

Revision 902 May 2009 - LukeCarrier

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Revision 830 Apr 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Line: 13 to 13
 

XML API Fast Mode

Changed:
<
<
Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML. The server-side processing of Fast Mode requests is also much faster than processing XML requests.
>
>
Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML input. The server-side processing of Fast Mode requests is also much faster than processing XML requests.
 
Changed:
<
<
Using Fast Mode, a request looks like: /XML-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar&cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
>
>
Using Fast Mode, a request looks like: /xml-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar&cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains
  note Note: When you generate the Fast Mode request, submit the entire request as a single string. For display purposes, the example above may be wrapped.

Revision 730 Apr 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Added:
>
>
 

Resources

There are a number of resources available to help you interact with the XML API:

Line: 9 to 11
  The cPanel Developer Forum
Changed:
<
<
>
>

XML API Fast Mode

Fast Mode is a new way to access the XML API functionality. This method simplifies building the request, as it no longer requires XML. The server-side processing of Fast Mode requests is also much faster than processing XML requests.

Using Fast Mode, a request looks like: /XML-api/cpanel?user=username&cpanel_xmlapi_module=StatsBar&cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=addondomains

note Note: When you generate the Fast Mode request, submit the entire request as a single string. For display purposes, the example above may be wrapped.

 

XML API Functions

The following links are to the documentation for WHM's XML API functions.

Revision 628 Apr 2009 - MelanieSeibert

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Resources

Revision 503 Apr 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

XML API Documentation

>
>

XML API Documentation

 

Resources

There are a number of resources available to help you interact with the XML API:

Line: 8 to 8
 XML API Mailing List

The cPanel Developer Forum

Added:
>
>
 

XML API Functions

The following links are to the documentation for WHM's XML API functions.

Line: 54 to 56
 List (Dump) 1 Zone

Lookup a Nameserver's IP Address \ No newline at end of file

Added:
>
>

Package Functions

Add a Package

Delete a Package

Edit a Package

List Packages

Reseller Functions

Add Reseller Privileges

Create a Reseller ACL List

List Current Reseller ACL Lists

List Reseller Accounts

List Reseller's Accounts' Information

Remove Reseller Privileges

Set aReseller's ACL List

Terminate a Reseller

Server Information

Display Server Hostname

Display cPanel and WHM Version

Server Administration

Only available in versions 11.24+

Add IP Address

Delete IP Address

List IP Addresses

Set Hostname

Set Resolvers

Service Functions

Restart Service

SSL Functions

Only available in versions 11.24+

Fetch SSL Certificate Information

Generate SSL Certificate

Install a SSL Certificate

List Available SSL Certificates

Revision 403 Apr 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Resources

Line: 44 to 44
 

DNS Functions

Only available in 11.24+ \ No newline at end of file

Added:
>
>
Add a DNS Zone

Delete a DNS Zone

List All DNS Zones

List (Dump) 1 Zone

Lookup a Nameserver's IP Address

 \ No newline at end of file

Revision 302 Apr 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Resources

Line: 43 to 43
 View Current User's Privileges

DNS Functions

Deleted:
<
<
Only available in version 11.24 or higher
 \ No newline at end of file
Added:
>
>
Only available in 11.24+
 \ No newline at end of file

Revision 202 Apr 2009 - Main.JustinSchaefer

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

XML API Documentation

Resources

Line: 19 to 19
  Call cPanel API and API2 Functions

Account Functions

Added:
>
>
Create an Account

Change an Account's Password

Limit Bandwidth Usage (Transfer)

ListAccounts

Modify an Account

Show an Account's Information?

Suspend an Account

Terminate an Account

Unsuspend an Account

Upgrade or Downgrade an Account (Change Package)

View Current User's Privileges

DNS Functions

Only available in version 11.24 or higher

 \ No newline at end of file

Revision 102 Apr 2009 - Main.JustinSchaefer

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"

XML API Documentation

Resources

There are a number of resources available to help you interact with the XML API:

XML API Mailing List

The cPanel Developer Forum

XML API Functions

The following links are to the documentation for WHM's XML API functions.

XML API

Using XML API Calls

List Available API Calls

Call cPanel API and API2 Functions

Account Functions