Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://api.docs.cpanel.net/_mock/specifications/whm.openapi/

A server running WHM.

https://{host}:{port}/json-api/

Restore Account

Account Restoration / Restore Account

Operations

Restore Queue Management

Account Restoration / Restore Queue Management

Operations

Restore Queue Reporting

Account Restoration / Restore Queue Reporting

Operations

Account Creation

Accounts Creation / Accounts

Operations

Account Enhancements

Accounts / Account Enhancements

Operations

Account Management

Accounts / Account Management

Operations

Bandwidth and Disk Quotas

Accounts / Bandwidth and Disk Quotas

Operations

Domain Information

Accounts / Domain Domain Information

Operations
Operations

Styles

The Styles and Themes module for WHM API 1.

Operations
Operations

API Execution

API Development Tools / API Execution

Operations

API Statistics

API Development Tools / API Statistics

Operations

API Token Management

API Development Tools / API Token Management

Operations

Applications

API Development Tools / Applications

Operations

Session

API Development Tools / Session

Operations

Authentication Providers

Authentication / Authentication Providers

Operations

External Authentication

Authentication / External Authentication

Operations

Login URL

Authentication / Login URL

Operations

SSH Keys and Connections

Authentication / SSH Keys and Connections

Operations

Two-Factor Authentication

Authentication / Two-Factor Authentication

Operations

Backup Destination

Backups / Backup Destination

Operations

Backup or Restore

Backups / Backup or Restore

Operations

Backup Settings

Backups / Backup Settings

Operations

Legacy Migration

Backups / Legacy Migration

Operations

Market Integration

Commerce Integration / Market Integration

Operations

Sitejet

The Sitejet module for WHM API.

Operations

Product Management

cPanel Market / Product Management

Operations

Provider Management

cPanel Market / Provider Management

Operations

Support Access

cPanel Support Tickets / Support Access

Operations

Ticket Management

cPanel Support Tickets / Ticket Management

Operations

Customizations

The Customizations module for WHM API 1.

Operations

Manage MySQL Server

Databases / Manage MySQL Server

Operations

MySQL Databases

Databases / MySQL Databases

Operations

PostgreSQL Databases

Databases / PostgreSQL Databases

Operations

Remote MySQL Databases

Databases / Remote MySQL Databases

Operations

DNS Cluster Settings

DNS / DNS Cluster Settings

Operations
Operations
Operations

Domain Management

DNS / Domain Management

Operations

Domain Management

DNS / Domain Management

Operations
Operations

Service Records

DNS / Service Records

Operations

Feature Access

Hosting Plans / Feature Access

Operations

Feature Lists

Hosting Plans / Feature Lists

Operations

Hosting Plan Extensions

Hosting Plans / Hosting Plan Extensions

Operations

Hosting Plans

Hosting Plans / Hosting Plans

Operations

InProductSurvey

In-product survey information.

Operations

API Authentication

Integrations / API Authentication

Operations

Scripts Hooks

Integrations / Scripts Hooks

Operations

IPv4 Address Settings

IP Address Management / IPv4 Address Settings

Operations

IPv6 Address Settings

IP Address Management / IPv6 Address Settings

Operations

Network Address Translation

IP Address Management / Network Address Translation

Operations

Management

Login Security (cPHulk) / Management

Operations

Reporting

Login Security (cPHulk) / Reporting

Operations

Settings

Login Security (cPHulk) / Settings

Operations

cPanel Account Mail Management

Mail / cPanel Account Mail Management

Operations

Mail DNS Settings

Mail / Mail DNS Settings

Operations

Mail Server Settings

Mail / Mail Server Settings

Operations

Spam Management

Mail / Spam Management

Operations

Spam Protection (Greylisting)

Mail / Spam Protection (Greylisting)

Operations

NGINX Manager

The NGINX Manager module for WHM API 1.

Operations

Account Enhancement Limit

Resellers / Account Enhancement Limit

Operations

Account Limits

Resellers / Account Limits

Operations

Account Permissions

Resellers / Account Permissions

Operations

Account Settings

Resellers / Account Settings

Operations

Reseller Account Management

Resellers / Account Management

Operations
Operations

Configuration Clusters

Server Administration / Configuration Clusters

Operations

Configurations

Server Administration / Configurations

Operations

Connected Applications

Server Administration / Connected Applications

Operations

Connections

Server Administration / Connections

Operations

cPanel Analytics

The cPanel Analytics module for WHM API 1.

Operations

License Management

The Server Administration module for WHM API 1.

Operations

Notifications

Server Administration / Notifications

Operations

Plugin-Based Features

The plugin-based features module for WHM API 1.

Operations

Security

The Security module for WHM API 1.

Operations

Server Nodes

Server Administration / Server Nodes

Operations

Server Profiles

Server Administration / Server Profiles

Operations

Services

Server Administration / Services

Operations

System Information

The Server Administration module for WHM API 1.

Operations

Updates

Server Administration / Updates

Operations

Auto-Generated Certificates

SSL Certificates / Auto-Generated Certificates

Operations

cPanel Account Settings

SSL Certificates / cPanel Account Settings

Operations

SSL Server Settings

SSL Certificates / SSL Server Settings

Operations

Install or Uninstall Package

System Package Management / Install or Uninstall Package

Operations

List Package Information

System Package Management / List Package Information

Operations

Package Manager Settings

System Package Management / Package Manager Settings

Operations

cPanel Account Transfer

Transfers / cPanel Account Transfer

Operations

Request

This function aborts an active transfer session.

Security
BasicAuth
Query
transfer_session_idstringrequired

The transfer session's ID.

Example: transfer_session_id=exampleservercopya20140206192428NtyW
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/abort_transfer_session?transfer_session_id=exampleservercopya20140206192428NtyW'

Responses

HTTP Request was successful.

Bodyapplication/json
metadataobject
Response
application/json
{ "metadata": { "command": "abort_transfer_session", "reason": "OK", "result": 1, "version": 1 } }

Create remote server transfer session as root user

Request

This function creates a transfer session as the root user.

Important:

For information about the ports that cPanel & WHM uses, read our How to Configure Your Firewall for cPanel Services documentation.

Note:

For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Authentication

There are several methods that you can use to authenticate a transfer session with the remote server:

Authenticate as root

If you use SSH to authenticate as the root user, the remote server's SSH must accept root logins. For more information read OpenSSH's sshd_config documentation.

The following table displays the correct parameters and values for this authentication method:

ParameterValue
userroot
passwordroot's password

You can also use an SSH public key to authenticate the root user. If the SSH public key is encrypted, include the SSH key's passphrase.

The following table displays the correct parameters and values for this authentication method:

ParameterValue if the SSH Key is not encryptedValue if the SSH Key is encrypted
userrootroot
sshkey_nameThe root user's SSH key.The root user's SSH key.
sshkey_passphrase(none)The root user's SSH key passphrase.

Authenticate as a user

Many server administrators do not permit direct root logins via SSH on their servers.

  • If the remote server forbids root logins, you must use another user and their password on the remote server, and then escalate to the root user. For more information read OpenSSH's sshd_config documentation.
  • If the system administrator used WHM's Manage Wheel Group Users interface (WHM >> Home >> Security Center >> Manage Wheel Group Users) to grant the user su access, then you will need to specify su and the root password.
  • If the user has sudo access, you do not need the root password.

The following table displays the correct parameters and values for this authentication method:

ParameterValue if the user has sudo accessValue if the user has su access
userThe username.The username.
passwordThe user's password.The user's password.
root_escalation_methodsudosu
root_password(none)The root user's password.

You can also use an SSH public key instead of a password to authenticate that user. If the SSH public key is encrypted, include the SSH key's passphrase.

The following table displays the correct parameters and values for this authentication method:

Parametersudosu
userThe username.The username.
sshkey_nameThe user's SSH key.The user's SSH key.
sshkey_passphrase (If encrypted)The user's SSH key passphrase.The user's SSH key passphrase.
root_escalation_methodsudosu
root_password(none)The root user's password.
Security
BasicAuth
Query
comm_transportstringrequired

The method by which the transfer system will execute commands on the remote system.

  • ssh — Use SSH. The function uses the remote server's indicated SSH port value.
  • whostmgr — Use the remote server's secure WHM port. This will reject invalid TLS handshakes.
  • whostmgr_insecure — Use the remote server's secure WHM port, but ignores any TLS verification failures.
Default "ssh"
Enum"ssh""whostmgr""whostmgr_insecure"
Example: comm_transport=ssh
compressedintegerrequired

Whether to compress data before transfer.

  • 1 — Compress.
  • 0 — Do not compress.
Enum01
Example: compressed=1
copy_reseller_privsintegerrequired

Whether to transfer reseller privileges.

  • 1 — Transfer.
  • 0 — Do not transfer.
Enum01
Example: copy_reseller_privs=1
enable_custom_pkgacctintegerrequired

Whether to use a custom pkgacct scripts on the remote server for the transfer session.

  • 1 — Use a custom pkgacct script.
  • 0 — Do not use a custom script.
Enum01
Example: enable_custom_pkgacct=1
hoststringrequired

The remote server's hostname or IP address.

Example: host=192.168.0.0
Any of:

A valid IP address.

string(ipv4)

A valid IP address.

low_priorityintegerrequired

Whether to run the remote server processes at low priority in order to reduce impact on server performance.

  • 1 — Run at low priority.
  • 0 — Run at high priority.
Enum01
Example: low_priority=1
restore_threadsinteger>= 1required

The number of CPU threads to use for restore sessions.

Example: restore_threads=1
transfer_threadsinteger>= 1required

The number of CPU threads to use for transfer sessions.

Example: transfer_threads=1
unencryptedintegerrequired

Whether to not use SSL to encrypt data.

  • 1 — Do not use SSL.
  • 0 — Use SSL.
Enum01
Example: unencrypted=0
unrestricted_restoreintegerrequired

Whether to skip the Restricted Restore system.

  • 1 — Skip.
  • 0 — Do not skip.

Note:

If you want to pass the force parameter in the WHM API 1 enqueue_transfer_item function, you must set this parameter to a value of 0.

Enum01
Example: unrestricted_restore=1
use_backupsintegerrequired

Whether to use an existing backup instead of packaging the data again if the backup is less than 24 hours old.

  • 1 — Use an existing backup.
  • 0 — Package the data.
Enum01
Example: use_backups=1
userstringrequired

The username to use to connect to the remote server.

Example: user=root
passwordstring

The username's password.

Note:

Use this parameter if you will authenticate to the remote server with a password. Do not use this parameter if you will authenticate to the remote server with an SSH key.

Example: password=123456luggage
portinteger[ 1 .. 65535 ]

The remote server's SSH port number.

Default 22
Example: port=22
root_escalation_methodstring

The escalation method to use to connect to the remote server.

  • su
  • sudo

Note:

Use this parameter if the sshd_config file's PermitRootLogin value is No.

Enum"su""sudo"
Example: root_escalation_method=sudo
root_passwordstring

root's password on the remote server.

Note:

Use this parameter if the sshd_config file's PermitRootLogin value is No and you will use the root user's password to escalate access.

Example: root_password=123456luggage
sshkey_namestring

The SSH key's name.

Note:

  • Use this parameter if you will authenticate to the remote server with an SSH key. Do not use this parameter if you will authenticate to the remote server with a password.
  • SSH keys are available in WHM's Manage root's SSH Keys interface (WHM >> Home >> Security Center >> Manage root’s SSH Keys).
Example: sshkey_name=FrancisScott
sshkey_passphrasestring

The SSH key's passphrase.

Note:

Use this parameter if you will authenticate to the remote server with an SSH key, and the key is encrypted.

Example: sshkey_passphrase=kkwtoowoygidsa
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/create_remote_root_transfer_session?comm_transport=ssh&compressed=1&copy_reseller_privs=1&enable_custom_pkgacct=1&host=192.168.0.0&low_priority=1&restore_threads=1&transfer_threads=1&unencrypted=0&unrestricted_restore=1&use_backups=1&user=root&password=123456luggage&port=22&root_escalation_method=sudo&root_password=123456luggage&sshkey_name=FrancisScott&sshkey_passphrase=kkwtoowoygidsa'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "analyze_rawout": "Fetching information from remote host: \\u201c10.1.100.35\\u201d \\u2026 \\u2026\\nDone\\nFetching information from remote host: \\u201c10.1.100.35\\u201d \\u2026 \\u2026\\nDone\\n\",", "create_rawout": "Basic credential check \\u2026 \\u2026\\nDone\\nFetching information from remote host: \\u201c10.1.100.35\\u201d \\u2026 \\u2026\\nDone\\nFetching WHM Version \\u2026\\nDone\\nTesting \\u201cvm5.docs.cpanel.net\\u201d for transfer streaming support with password authentication....<strong>Streaming Supported</strong>\\nRemote Server Type: \\u201cWHM1130\\u201d\\n\",", "transfer_session_id": "vm5docscpanelcopya20140430200606V06z" }, "metadata": { "command": "create_remote_root_transfer_session", "reason": "OK", "result": 1, "version": 1 } }

Create remote server transfer session

Request

This function creates a transfer session with a non-root user to a remote server.

Important:

  • The source and target servers must be able to communicate over port 2087 to use this feature.
  • The source and target servers must also be able to communicate over the port that your servers use for SSH connections.
  • For more information about the ports that cPanel & WHM uses, read our How to Configure Your Firewall for cPanel & WHM Services documentation.

Note:

For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Security
BasicAuth
Query
hoststring(domain)required

The server hostname for the account.

Example: host=hostname.example.com
passwordstringrequired

The account's password.

Example: password=12345luggage
unrestricted_restoreintegerrequired

Whether to skip the Restricted Restore process.

  • 1 - Skip Restricted Restore.
  • 0 - Use Restricted Restore.

Note:

You must set this parameter to a value of 1.

Value1
Example: unrestricted_restore=1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/create_remote_user_transfer_session?host=hostname.example.com&password=12345luggage&unrestricted_restore=1'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "transfer_session_id": "vm5docscpanelnoroo201402251939519hmy" }, "metadata": { "command": "create_remote_user_transfer_session", "reason": "OK", "result": 1, "version": 1 } }

Transfer Configuration

Transfers / Transfer Configuration

Operations

Transfer Monitoring

Transfers / Transfer Monitoring

Operations

UserData

Scoped userdata storage functions.

Operations

EasyApache Settings

Web Server Configuration / EasyApache Settings

Operations
Operations

PHP-FPM

Web Server Configuration / PHP-FPM

Operations

Rule Settings

Web Server Security (ModSecurity) / Rule Settings

Operations

Rule Vendor Settings

Web Server Security (ModSecurity) / Rule Vendor Settings

Operations

Server Settings

Web Server Security (ModSecurity) / Server Settings

Operations