UAPI accesses the WP Squared interface's features. Use this API to access and modify WP Squared account data and settings.
This function creates a new API token with full access to all of a cPanel account's features.
Note:
The token only grants access to the features that the account has access to. For example, if you disable the File Manager feature, the token can't access it.
| expires_at | integer <unix_timestamp> Example: expires_at=1609372800 The API token's expiration time. Important:
|
| name required | string <= 50 characters Example: name=example The API token's name. Note: The name may only contain alphanumeric characters, dashes ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Tokens \ create_full_access \ name='example'
{- "apiversion": 3,
- "func": "create_full_access",
- "module": "Tokens",
- "result": {
- "data": {
- "create_time": 1549467298,
- "token": "JPQNSRU0DH448UJLGXH7KVJECC5QN9N9"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function renames a cPanel account's existing API token.
| name required | string Example: name=example The API token's name. |
| new_name required | string <= 50 characters Example: new_name=newexample The new name for the API token. Note: The name may only contain alphanumeric characters, dashes ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Tokens \ rename \ name='example' \ new_name='newexample'
{- "apiversion": 3,
- "func": "rename",
- "module": "Tokens",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a list of a cPanel account's API tokens.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Tokens \ list
{- "apiversion": 3,
- "func": "list",
- "module": "Tokens",
- "result": {
- "data": [
- {
- "create_time": 1549471343,
- "expires_at": 1609372800,
- "features": [ ],
- "has_full_access": 1,
- "name": "exampletoken"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function removes an API token from a cPanel account.
| name required | string Example: name=example The API token to remove. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Tokens \ revoke \ name='example'
{- "apiversion": 3,
- "func": "revoke",
- "module": "Tokens",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function combines calls for multiple UAPI functions and performs them in order.
Note:
Batch::strict function does not run further function calls in the list.required | Array of strings or objects [ 2 .. 3 ] items A UAPI function call, encoded as a JSON array with two or three items:
To submit multiple commands, duplicate the parameter name, or index all parameter names and increment the index for each one.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username Batch strict command-0='[ "PasswdStrength", "get_required_strength", { "app": "webdisk"} ]' command-1='["SSH","get_port"]'
{- "apiversion": 3,
- "func": "strict",
- "module": "Batch",
- "result": {
- "data": [
- {
- "data": {
- "strength": 65
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}, - {
- "data": {
- "port": 22
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves a cPanel account's user task queue information.
Each cPanel account uses a separate user task queue in order to ensure that processes for one user do not impede another user on the server.
VersionControl::create function).| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ UserTasks \ retrieve
{- "apiversion": 3,
- "func": "retrieve",
- "module": "UserTasks",
- "result": {
- "data": [
- {
- "action": "create",
- "args": { },
- "id": "00000000\\/5a9ec8dd4c345d",
- "subsystem": "VersionControl"
}, - {
- "action": "create",
- "args": {
- "repository_root": "/home/user/public_html/example"
}, - "id": "00000000/h39dnn27suc13l",
- "subsystem": "VersionControl"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function deletes a process from the user task queue.
Each cPanel account uses a separate user task queue in order to ensure that processes for one user do not impede another user on the server.
VersionControl::create function).| id required | string Example: id=00000000\/5a9ec8dd4c345d The task's ID number. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username UserTasks delete id='00000000\/5a9ec8dd4c345d'
{- "apiversion": 3,
- "func": "delete",
- "module": "UserTasks",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the URL for an integrated application.
| app required | string Example: app=applicationname The application's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Integration \ fetch_url \ app='applicationname'
{- "apiversion": 3,
- "func": "fetch_url",
- "module": "Integration",
- "result": {
- "data": {
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function reports the first file's URI, relative to the cPanel base directory.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Parser \ firstfile_relative_uri
{- "apiversion": 3,
- "func": "firstfile_relative_uri",
- "module": "Parser",
- "result": {
- "data": {
- "uri": "/usr/local/cpanel/base/favicon.ico"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function adds an External Authentication authorization link to an account.
| preferred_username required | string Example: preferred_username=Example The preferred username of the account on the identity provider. |
| provider_id required | string Example: provider_id=google The name of the identity provider. |
| subject_unique_identifier required | string Example: subject_unique_identifier=123456789012345678901 The unique identifier for the user at the identity provider. |
| username required | string <username> Example: username=example The username. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ExternalAuthentication \ add_authn_link \ username='example' \ provider_id='google' \ subject_unique_identifier='123456789012345678901' \ preferred_username='Example'
{- "apiversion": 3,
- "func": "add_authn_link",
- "module": "ExternalAuthentication",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function determines whether the user enabled external authentication modules.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ExternalAuthentication \ has_external_auth_modules_configured
{- "apiversion": 3,
- "func": "has_external_auth_modules_configured",
- "module": "ExternalAuthentication",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a link to an account at an external authentication identity provider.
| provider required | string Example: provider=cpanelid The name of the identity provider. |
| subject_unique_identifier required | string Example: subject_unique_identifier=123456789012345678901 The unique identifier for the user at the identity provider. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ExternalAuthentication \ remove_authn_link \ provider='cpanelid' \ subject_unique_identifier='123456789012345678901'
{- "apiversion": 3,
- "func": "remove_authn_link",
- "module": "ExternalAuthentication",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the display information for your server's available and configured external authentication identity provider modules.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ExternalAuthentication \ configured_modules
{- "apiversion": 3,
- "func": "configured_modules",
- "module": "ExternalAuthentication",
- "result": {
- "data": [
- {
- "color": "00aef0",
- "display_name": "cPanel ID",
- "icon": "iVBORw0KGgoAAAANSUhEUgAAACMAAAAhCAYAAABTERJSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9I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"image/svg+xml",
- "label": "Log in with a cPanel ID Account",
- "provider_name": "cpanelid",
- "textcolor": "FFFFFF"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the external authentication links to the current cPanel account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ExternalAuthentication \ get_authn_links
{- "apiversion": 3,
- "func": "get_authn_links",
- "module": "ExternalAuthentication",
- "result": {
- "data": [
- {
- "link_time": 1443124604,
- "preferred_username": "username@gmail.com",
- "provider_id": "google",
- "provider_protocol": "openid_connect",
- "subject_unique_identifier": 123456789012346
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function generates an authentication code to enable configuration of two-factor authentication.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ generate_user_configuration
{- "apiversion": 3,
- "func": "generate_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "otpauth_str": "otpauth://totp/Example%20cPanel%20L.L.C.:fakedomain?secret=S3I4WUY7MTHRMMWN&issuer=Example%20cPanel%20L.L.C.",
- "secret": "S3I4WUY7MTHRMMWN"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a team user's configuration settings for two-factor authentication.
| team_user required | string Example: team_user=user@example.com The team user's username. Note: The username will always precede the cPanel account's primary domain. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ get_team_user_configuration \ team_user=teamuser
{- "apiversion": 3,
- "func": "get_team_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "is_enabled": 1,
- "issuer": "Example WebPros International, LLC"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the cPanel account user's configuration settings for two-factor authentication.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ get_user_configuration
{- "apiversion": 3,
- "func": "get_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "is_enabled": 1,
- "issuer": "Example WebPros International, LLC"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes the user from the two-factor authentication userdata file.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ remove_user_configuration
{- "apiversion": 3,
- "func": "remove_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "tfa_removed": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function configures the two-factor authentication settings for an account.
| secret required | string <= 16 characters Example: secret=JBSWY3DPEHPK3PXP The 16-character string that UAPI's |
| tfa_token required | integer <= 6 characters Example: tfa_token=528112 The six-digit security code that the time-based one-time password (TOTP) authentication app generates. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ set_user_configuration \ secret='JBSWY3DPEHPK3PXP' \ tfa_token='528112'
{- "apiversion": 3,
- "func": "set_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "tfa_configured": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function blocks IP addresses from accessing the domains on a cPanel account.
Important
When you disable the Web Server role, the system disables this function.
| ip required | string Examples:
The IP address or IP address range that you wish to block. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ BlockIP \ add_ip \ ip='192.168.0.1/16'
{- "apiversion": 3,
- "func": "add_ip",
- "module": "BlockIP",
- "result": {
- "data": [
- "1.1.1.1"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function unblocks IP addresses from accessing domains on a cPanel account.
Important
When you disable the Web Server role, the system disables this function.
| ip required | string Examples:
The IP address or IP address range that you wish to unblock. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ BlockIP \ remove_ip \ ip='192.168.0.1/16'
{- "apiversion": 3,
- "func": "remove_ip",
- "module": "BlockIP",
- "result": {
- "data": [
- "1.1.1.1"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns the directory indexing settings for a directory on the cPanel account and its subdirectories.
| dir required | string Example: dir=/home/example/example.com The directory for which to check the indexing type. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryIndexes \ get_indexing \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "get_indexing",
- "module": "DirectoryIndexes",
- "result": {
- "data": "disabled",
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function configures the directory indexing settings for a directory on the cPanel account.
| dir required | string <path> Example: dir=/home/example/example.com The directory for which to manage directory indexing. |
| type required | string Possible Values: "standard" "disabled" "inherit" "fancy" Example: type=inherit The type of directory indexing.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryIndexes \ set_indexing \ dir='/home/example/example.com' \ type='inherit'
{- "apiversion": 3,
- "func": "set_indexing",
- "module": "DirectoryIndexes",
- "result": {
- "data": "disabled",
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the directory indexing settings of the subdirectories in a directory.
| dir required | string <path> Example: dir=/home/example/example.com The absolute path of the directory for which to return indexing information. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryIndexes \ list_directories \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_directories",
- "module": "DirectoryIndexes",
- "result": {
- "data": {
- "children": [
- {
- "path": "/home/example/example.com/cgi-bin",
- "state": {
- "index_type": "inherit"
}
}
], - "current": {
- "path": "/home/example/example.com",
- "state": {
- "index_type": "inherit"
}
}, - "home": {
- "path": "/home/example",
- "state": {
- "index_type": "inherit"
}
}, - "parent": {
- "path": "/home/example",
- "state": {
- "index_type": "inherit"
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function adds a user who can access a protected directory on the cPanel account.
| dir required | string <path> Example: dir=/home/example/example.com The directory to add users to. |
| password required | string Example: password=123456luggage The password for the user. |
| user required | string Example: user=example1 The username of the user who can access the directory. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ add_user \ dir='/home/example/example.com' \ user='example1' \ password='123456luggage'
{- "apiversion": 3,
- "func": "add_user",
- "module": "DirectoryPrivacy",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables or disables password protection for a directory on the cPanel account.
| authname required | string Example: authname=protectandserve The name of the directory protection authorization instance. Note: Only use this parameter when you enable password protection. |
| dir required | string <path> Example: dir=/home/example/example.com The absolute or relative directory path for which to enable or disable password protection. |
| enabled required | integer Possible Values: 0 1 Example: enabled=1 Whether to enable password protection for the directory.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ configure_directory_protection \ dir='/home/example/example.com' \ enabled='1' \ authname='protectandserve'
{- "apiversion": 3,
- "func": "configure_directory_protection",
- "module": "DirectoryPrivacy",
- "result": {
- "data": {
- "auth_name": "protectandserve",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function confirms whether a directory uses password protection.
| dir required | string <path> Example: dir=/home/example/example.com The absolute directory path on the cPanel account to check for password protection. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ is_directory_protected \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "is_directory_protected",
- "module": "DirectoryPrivacy",
- "result": {
- "data": {
- "auth_name": "Protected 'example.com'",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deletes a user who can access a protected directory on the cPanel account.
| dir required | string <path> Example: dir=/home/example/example.com The absolute directory path on the cPanel account from which to remove a user. |
| user required | string <username> Example: user=example1 The username to remove from the directory. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ delete_user \ dir='/home/example/example.com' \ user='example1'
{- "apiversion": 3,
- "func": "delete_user",
- "module": "DirectoryPrivacy",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the privacy status of the subdirectories in a directory.
| dir required | string <path> Example: dir=/home/example/example.com The directory path for which to return the subdirectories' privacy information. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ list_directories \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_directories",
- "module": "DirectoryPrivacy",
- "result": {
- "data": {
- "children": [
- {
- "path": "/home/example/example.com/cgi-bin",
- "state": {
- "auth_name": "Protected 'example.com'",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}
], - "current": {
- "path": "/home/example/example.com",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}, - "home": {
- "path": "/home/example",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}, - "parent": {
- "path": "/home/example",
- "state": {
- "auth_name": "protected",
- "auth_type": "Basic",
- "passwd_file": "/home/example/.htpasswds/example.com/passwd",
- "protected": 1
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the users who can access a password-protected directory on the cPanel account.
| dir required | string <path> Example: dir=/home/example/example.com The password-protected directory for which to return authorized users. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ list_users \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_users",
- "module": "DirectoryPrivacy",
- "result": {
- "data": [
- "example1",
- "example2"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns the leech protection settings of the subdirectories in a directory.
| dir required | string <path> Example: dir=/home/example/example.com The absolute or relative file path in the user's |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DirectoryProtection \ list_directories \ dir='/home/example/example.com'
{- "apiversion": 3,
- "func": "list_directories",
- "module": "DirectoryProtection",
- "result": {
- "data": {
- "children": [
- {
- "path": "/home/example/example.com/cgi-bin",
- "state": {
- "has_leech_protection": 1
}
}
], - "current": {
- "path": "/home/example/example.com",
- "state": {
- "has_leech_protection": 1
}
}, - "home": {
- "path": "/home/example",
- "state": {
- "has_leech_protection": 1
}
}, - "parent": {
- "path": "/home/example",
- "state": {
- "has_leech_protection": 1
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the list of subdomains that cPanel automatically
generates for a given domain. These include proxy subdomains such as
webmail, mail, and cpanel, as well as other system-generated
domain names.
| domain required | string <domain> Examples:
The domain for which to retrieve cPanel-generated subdomains. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ fetch_cpanel_generated_domains \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_cpanel_generated_domains",
- "module": "DNS",
- "result": {
- "data": [
- {
- "domain": "example.com."
}, - {
- "domain": "cpanel.example.com."
}, - {
- "domain": "mail.example.com."
}, - {
- "domain": "webmail.example.com."
}, - {
- "domain": "webdisk.example.com."
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function indicates whether the account's domains resolve exclusively to this server.
| domain required | string <domain> Examples:
The domain to check. Note: To check multiple domains, duplicate or increment the parameter name. For example, to exclude three domains, you could:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ ensure_domains_reside_only_locally \ domain='example.com'
{- "apiversion": 3,
- "func": "ensure_domains_reside_only_locally",
- "module": "DNS",
- "result": {
- "data": [
- "The domain resolves to Mars. Beep beep beep."
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function updates a DNS zone by allowing multiple records to be added, modified, or removed in a single call. It also ensures modified records occupy the same number of lines as before the edit.
NOTE:
You cannot use this function to edit temporary domains.
| add | Array of strings <json> [ items <json > ] Examples:
The records to add to the zone. Each item must be a serialized JSON object that contains:
|
| edit | Array of strings <json> [ items <json > ] Example: edit='{"line_index": 9, "dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}' The records to edit in the zone. Each item must be a serialized JSON object that contains:
|
| remove | Array of integers[ items >= 0 ] Example: remove=22 The line indexes of records to remove from the zone. |
| serial required | integer >= 0 Example: serial=202001010100 The current serial number in the DNS zone’s SOA (Start of Authority) record. If this value does not match the zone’s current state, the request fails. |
| zone required | string Example: zone=example.com The name of one of the user’s DNS zones. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS mass_edit_zone zone='example.com' serial='202001010100' remove=23 add='{"dname":"example","ttl":14400,"record_type":"A","data":["127.0.0.1"]}'
{- "apiversion": 3,
- "func": "mass_edit_zone",
- "module": "DNS",
- "result": {
- "data": {
- "new_serial": 2021031903
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns whether ALIAS and ANAME records are available and the value of the running PowerDNS (PDNS) resolver setting, if any exists.
For more information, read our ALIAS documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_alias_available
{- "apiversion": 3,
- "func": "is_alias_available",
- "module": "DNS",
- "result": {
- "data": {
- "alias": 1,
- "aname": 0,
- "resolver": "8.8.8.8"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns DNS zone information about a domain.
| domain required | string Example: domain=example.com A fully qualified domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ lookup \ domain='example.com'
{- "apiversion": 3,
- "func": "lookup",
- "module": "DNS",
- "result": {
- "data": [
- "example.com has address 93.184.216.34",
- "example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946",
- "example.com mail is handled by 0 ."
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function parses a given DNS zone.
Important:
Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function's base64 output must be able to handle cases where the decoded octets do not match any specific character encoding.
| zone required | string Example: zone=example.com The name of one of the user’s DNS zones. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ parse_zone \ zone='example.com'
{- "apiversion": 3,
- "func": "parse_zone",
- "module": "DNS",
- "result": {
- "data": [
- {
- "line_index": 22,
- "type": "record",
- "data_b64": [
- "dGV4YXMuY29tLg=="
], - "dname_b64": "dGV4YXMuY29tLg==",
- "record_type": "MX",
- "ttl": 14400
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function replaces a domain's IPv4 address in the DNS zone file with the specified destination IPv4 address.
| dest_ip required | string <ipv4> Example: dest_ip=192.0.2.1 The IPv4 address to use as the replacement in the zone files. |
| domain required | string <domain> Examples:
The domain to perform the zone file updates on. Note: To update multiple domains, increment or duplicate the parameter name. For
example, |
| ftp_ip | string <ipv4> Example: ftp_ip=192.0.2.1 The IPv4 address to use as the replacement for FTP records in the zone files. If this parameter is not provided, then the system will use the |
| source_ip | string <ipv4> Example: source_ip=192.0.2.0 The IPv4 address to replace in the zone files. The detected source IPv4 address is one of:
If you do not call this parameter, the system will automatically detect the IP addresses in the zone files. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --user=username DNS swap_ip_in_zones domain='example.com' source_ip='192.0.2.0' dest_ip='192.0.2.1'
{- "apiversion": 3,
- "func": "swap_ip_in_zones",
- "module": "DNS",
- "result": {
- "data": [
- {
- "zone_name": "example.com",
- "record_name": "example.com",
- "record_type": "A",
- "old_value": "192.0.2.0",
- "new_value": "192.0.2.1"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our Zone Editor documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_https_available
{- "apiversion": 3,
- "func": "is_https_available",
- "module": "DNS",
- "result": {
- "data": {
- "https": 1,
- "dns_server": "pdns"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function fetches information regarding SVCB records support. SVCB records are defined in RFC 9460 and provide service binding and aliasing for arbitrary services. For more information, read our Zone Editor documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_svcb_available
{- "apiversion": 3,
- "func": "is_svcb_available",
- "module": "DNS",
- "result": {
- "data": {
- "svcb": 1,
- "dns_server": "pdns"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves the list of subdomains that cPanel automatically
generates for a given domain. These include proxy subdomains such as
webmail, mail, and cpanel, as well as other system-generated
domain names.
| domain required | string <domain> Examples:
The domain for which to retrieve cPanel-generated subdomains. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ fetch_cpanel_generated_domains \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_cpanel_generated_domains",
- "module": "DNS",
- "result": {
- "data": [
- {
- "domain": "example.com."
}, - {
- "domain": "cpanel.example.com."
}, - {
- "domain": "mail.example.com."
}, - {
- "domain": "webmail.example.com."
}, - {
- "domain": "webdisk.example.com."
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function indicates whether the account's domains resolve exclusively to this server.
| domain required | string <domain> Examples:
The domain to check. Note: To check multiple domains, duplicate or increment the parameter name. For example, to exclude three domains, you could:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ ensure_domains_reside_only_locally \ domain='example.com'
{- "apiversion": 3,
- "func": "ensure_domains_reside_only_locally",
- "module": "DNS",
- "result": {
- "data": [
- "The domain resolves to Mars. Beep beep beep."
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function updates a DNS zone by allowing multiple records to be added, modified, or removed in a single call. It also ensures modified records occupy the same number of lines as before the edit.
NOTE:
You cannot use this function to edit temporary domains.
| add | Array of strings <json> [ items <json > ] Examples:
The records to add to the zone. Each item must be a serialized JSON object that contains:
|
| edit | Array of strings <json> [ items <json > ] Example: edit='{"line_index": 9, "dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}' The records to edit in the zone. Each item must be a serialized JSON object that contains:
|
| remove | Array of integers[ items >= 0 ] Example: remove=22 The line indexes of records to remove from the zone. |
| serial required | integer >= 0 Example: serial=202001010100 The current serial number in the DNS zone’s SOA (Start of Authority) record. If this value does not match the zone’s current state, the request fails. |
| zone required | string Example: zone=example.com The name of one of the user’s DNS zones. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS mass_edit_zone zone='example.com' serial='202001010100' remove=23 add='{"dname":"example","ttl":14400,"record_type":"A","data":["127.0.0.1"]}'
{- "apiversion": 3,
- "func": "mass_edit_zone",
- "module": "DNS",
- "result": {
- "data": {
- "new_serial": 2021031903
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns whether ALIAS and ANAME records are available and the value of the running PowerDNS (PDNS) resolver setting, if any exists.
For more information, read our ALIAS documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_alias_available
{- "apiversion": 3,
- "func": "is_alias_available",
- "module": "DNS",
- "result": {
- "data": {
- "alias": 1,
- "aname": 0,
- "resolver": "8.8.8.8"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns DNS zone information about a domain.
| domain required | string Example: domain=example.com A fully qualified domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ lookup \ domain='example.com'
{- "apiversion": 3,
- "func": "lookup",
- "module": "DNS",
- "result": {
- "data": [
- "example.com has address 93.184.216.34",
- "example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946",
- "example.com mail is handled by 0 ."
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function parses a given DNS zone.
Important:
Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function's base64 output must be able to handle cases where the decoded octets do not match any specific character encoding.
| zone required | string Example: zone=example.com The name of one of the user’s DNS zones. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNS \ parse_zone \ zone='example.com'
{- "apiversion": 3,
- "func": "parse_zone",
- "module": "DNS",
- "result": {
- "data": [
- {
- "line_index": 22,
- "type": "record",
- "data_b64": [
- "dGV4YXMuY29tLg=="
], - "dname_b64": "dGV4YXMuY29tLg==",
- "record_type": "MX",
- "ttl": 14400
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our Zone Editor documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_https_available
{- "apiversion": 3,
- "func": "is_https_available",
- "module": "DNS",
- "result": {
- "data": {
- "https": 1,
- "dns_server": "pdns"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function fetches information regarding SVCB records support. SVCB records are defined in RFC 9460 and provide service binding and aliasing for arbitrary services. For more information, read our Zone Editor documentation.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username DNS is_svcb_available
{- "apiversion": 3,
- "func": "is_svcb_available",
- "module": "DNS",
- "result": {
- "data": {
- "svcb": 1,
- "dns_server": "pdns"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function activates a DNSSEC security key.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The security key's domain. |
| key_id required | integer >= 1 Example: key_id=1 The security key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ activate_zone_key \ domain='example.com' \ key_id='1'
{- "apiversion": 3,
- "func": "activate_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "key_id": "1",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function generates a DNSSEC zone key for a domain.
Note:
Important:
When you disable the DNS role, the system disables this function.
| active | integer Default: 1 Possible Values: 0 1 Example: active=1 Whether to activate the newly-created key.
|
| algo_num required | integer Possible Values: 5 6 7 8 10 13 14 Example: algo_num=8 The algorithm that the system uses to generate the security key.
Note: We recommend that you use 'ECDSA Curve P-256 with SHA-256' if your registrar supports it. |
| domain required | string <domain> Example: domain=example.com The domain on which to enable DNSSEC. |
| key_size | integer [ 256 .. 2048 ] Example: key_size=2048 The key's size, in bits. Note: For the following
|
| key_type required | string Possible Values: "ksk" "zsk" Example: key_type=ksk The type of key to add.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ add_zone_key \ domain='example.com' \ algo_num='8' \ key_type='ksk'
{- "apiversion": 3,
- "func": "add_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "error": "Error: Invalid key_id or domain specified: No such key present for domain.",
- "new_key_id": "1",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deactivates a DNSSEC security key.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The security key's domain. |
| key_id required | integer >= 1 Example: key_id=1 The security key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ deactivate_zone_key \ domain='example.com' \ key_id='1'
{- "apiversion": 3,
- "func": "deactivate_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "error": "Error: Invalid key_id or domain specified: No such key present for domain.",
- "key_id": "1",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables DNSSEC on the domain.
Warning:
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Examples:
The domain on which to disable DNSSEC. Note: To enable DNSSEC on multiple domains, increment the parameter name. For example: |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ disable_dnssec \ domain='example.com'
{- "apiversion": 3,
- "func": "disable_dnssec",
- "module": "DNSSEC",
- "result": {
- "data": {
- "disabled": {
- "example.com": 1
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function exports a domain's DNSKEY record value.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain from which to fetch the DNSKEY record value. |
| key_id required | integer >= 1 Example: key_id=12345 The DNSSEC record's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ export_zone_dnskey \ domain='example.com' \ key_id='12345'
{- "apiversion": 3,
- "func": "export_zone_dnskey",
- "module": "DNSSEC",
- "result": {
- "data": {
- "dnskey": "AwEAAch8SGW4vE6PjFWA9rbUm0AfTq+gJ0HC/nLu+2axdWHBIStt9lsOzKDorAr4vlmhlJzEzA62s96xp6mZ7XHUyWnkFwLs8obo6upL2in4h1ToOxzVl3lTs8O+kWtDq5/h1nwFlPDs9zpLJhlkTCtx2OTGbvimEYeqwPolUuSQR/Yb",
- "key_id": 12345,
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function configures the domain to use Next Secure Record 3 (NSEC3) semantics.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain on which to enable NSEC3 semantics. |
| nsec3_iterations required | integer [ 0 .. 500 ] Example: nsec3_iterations=7 The number of times that the system re-executes the first resource record hash operation. |
| nsec3_narrow required | integer Possible Values: 0 1 Example: nsec3_narrow=1 Whether NSEC3 will operate in Narrow mode or Inclusive mode. In Narrow mode, PowerDNS sends out white lies about the next secure record. Rather than query the resource record in the database, PowerDNS sends the hash plus 1 as the next secure record.
|
| nsec3_opt_out required | integer Possible Values: 0 1 Example: nsec3_opt_out=0 Whether the system will create records for all delegations.
Note: Only select |
| nsec3_salt required | string <hex> Example: nsec3_salt=1A2B3C4D5E6F The salt value that PowerDNS uses in the hashes. For more information about the salt value, read the RFC 5155 documentation. Note: In cPanel & WHM version 132 and later, this parameter also accepts the literal value |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ set_nsec3 \ domain='example.com' \ nsec3_opt_out='0' \ nsec3_iterations='0' \ nsec3_narrow='1' \ nsec3_salt='-'
{- "apiversion": 3,
- "func": "set_nsec3",
- "module": "DNSSEC",
- "result": {
- "data": {
- "enabled": {
- "example1.com": 1
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function exports a DNSSEC security key.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The security key's domain. |
| key_id required | integer >= 1 Example: key_id=12345 The security key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ export_zone_key \ domain='example.com' \ key_id='12345'
{- "apiversion": 3,
- "func": "export_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "key_content": "Private-key-format: v1.2\nAlgorithm: 8 (RSASHA256)\nModulus: 9i8AlGZkwKJj6HYZX+9OcOyCMQ0L9eHBaTg2Y83cVBSaIyiIWo54QpuiJykiuFYYHihOi+LW8vfU9A9jXLBs7DaeDkXO49OqYxfgD1vwmztJeXCQlmgxqUeD181gtSTNO43uUMkCisZft+OsJ96bdUof1UeJ1+IuSENBr1TZgYjmzBgIkmjdv8T5muPaaDfeOISLJKGOG2gI0xlyQ39ppd3CeB90cpIvFpCGjNC8nGvIqN4oyny6NftcEhaRFudbEhB6t2gI362wS5ohERK1F1rBTt+mqUwszCv46Y6p3Za3PsebWK7fR6ITnsW7KGyn3r8BxpJTHlHMwOtBPosaXw==\nPublicExponent: AQAB\nPrivateExponent: MZO5nCkatSh+0jumVImO1HLsrRAhjnzORHBLk8HLUytq9xWckBAM6+0HtLc2BMVhygD4AHfILdn3CsdmjS4CYXeGUP2B8qOXtqkCOFWdmMVRwKEInSGSjrKWPIlhplko84tbqO0yE9xrPk8dRlIwIGizDHKBsfYct/TDb5m4y7rvEHcBSm2DZz7AQL1qqC/WYI54qxHFXTId+nKsYMx/alRUV3AOSL20VSgL56VcM1luFS76ylDIWEOrQVyTFCtEcHvw3FLIOEVCM/CAErLFNlFdXHnYcRYnG/oXcsPW0DjpPNrqx8iaAOuhYFd/pu9CvKQnxYLLqXByOkSUIO3ggQ==\nPrime1: /mtiBD3gJ5Yu5ARsLew4eohRAobl4c3Bt9Gw62wmHiOJfgjbnY91H/bxc/ilnQh92yZUfxfm5z6FXEqluh0ZN3BOQTwzUEuTT9Pn00FhRfemL0UMpHn0BkoXCLwjs1XRyI0hXTOhGhH7XVczuYw/S7kWT5Cmfo4MODZ6cooR8SE=\nPrime2: 97aFfZxJcTYTKkZTc7yeUQVWTtKF25L780TRuCiG83hTSNKlmuWE2bAU/Cl2CX2NdW5sBmO5z9fEI5rA8LhuWHlKF82cXg1h50CsXkaAhFKrThMmb6SRSjIksxlz7rtK777z4En/V9v3l1yKcQ5eSQYQRHg1cCkn6NNlZPZ2G38=\nExponent1: LoHarQPSken2MGBOliZ0PJHmnRujsh82pi+Cs8ZVQXUlkRB1dNvggTNW9+gf/hCrUQA0ufbYkrTvE+vhV6AyF9xDsdEbYDYwe4s0+X0eFvgqPMHWicpxPSUWCNa7f/DUJGEIFE13yZg35twl7GkiuOjglzLN/Jxix3PN9loe5YE=\nExponent2: Mya4iAimzb7p1DfzcZnIY1ijyuEEDSRb7I8Qc2PDAjGdmRMOaV7twPnwS2XQXwNTG6Wyntsm+nlGokeJgevDtXdOSn4FxRIkXllnfow2a5yajSO9Mx6bdePG2kjuPKTmQ3195JnDJYRhqxrL566c351l7I2aE1AcUqKcdG3EU8c=\nCoefficient: T4dFDz5pQhVUQSjV0hhKHHZ1wBxiXdZeCFIfbyypWEdxGXdX2lIN264u9cGQhI+iExTEjZCaYASMBzOqnIhkHhj0M1DGYrhRCdTpgxmDwdcHniRl/XMxPGqpmsP4WFCBxmIbr3SdnqoiPMXix0SjWkHTisq5i09DBMNGIGQyqS8=\n\n",
- "key_id": 12345,
- "key_tag": 51640,
- "key_type": "KSK",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a DNSSEC security key.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The security key's domain. |
| key_id required | integer >= 1 Example: key_id=1 The security key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ remove_zone_key \ domain='example.com' \ key_id='1'
{- "apiversion": 3,
- "func": "remove_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "key_id": "12",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function fetches a domain's Delegation of Signing (DS) records.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Examples:
The domain from which to fetch DS records. Note: To enable DNSSEC on multiple domains, increment the parameter name. For example: |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ fetch_ds_records \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_ds_records",
- "module": "DNSSEC",
- "result": {
- "data": {
- "example.com": {
- "keys": {
- "33930": {
- "active": 1,
- "algo_desc": "RSA/SHA-256",
- "algo_num": "8",
- "algo_tag": "RSASHA256",
- "bits": 1024,
- "created": "1590002705",
- "flags": 256,
- "key_id": 2,
- "key_tag": 33930,
- "key_type": "ZSK",
- "privatekey": "Private-key-format: v1.2\nAlgorithm: 8 (RSASHA256)\nModulus: wcZl882v587qKmt3M7+y6u+kzSgCvfgyiSGQHE2EulDcAnfEmz/ryanXMveHGBsO4L/GynYYUUsGvD2jHK1ITh8CeISiqmbUmPolf9HLQgwcT5pVcvwJ0Wmzpw5Ukmx67N7TTX+yieI5OyflP23GnJYQ5EQUzBu/DhdxhL90hYU=\nPublicExponent: AQAB\nPrivateExponent: EnoBdKrTMA5Jw7u1hQitXbt2Al3jTQvifbLmk9xMYJufLtkOtSL2L6dzLpftmL3TwFho8xspnG7D+KUD7ZMURrwxnLlqTttaL2PeaYJdQ184ezuflExppkDkdTEOqcIUuSylfAbyIdeGkVFuWr0cdjM9OFKMAkoYaVeAUP0SYU0=\nPrime1: 4eslxBBwyvXzmFqKx5TTiHfU7EHIAxUru3ykOMqD2tVMHbRAq5AMKZL6ZhuTXk8mnGppEfC6qqNKnf3VT5jLxw==\nPrime2: 25OUAsWWAJrQ4uLytsXoSbjHsVyh61DgZ4S4n2Mv7RsSHt0Q/VcuyvHXuAKb8Y0XCYczZBtEW+ZoPte/HHnsUw==\nExponent1: Xkb4AqLtvvT2i8y0/2avA9MmCtXEtuydzGbOTVjNv4OlePvgxPee67aHQhcd34xeS4XohPEVpOHx4I6t9sKHvw==\nExponent2: ulZDBRcodNrs6Z4u22yX8/gbfyhdQJUh2reG9bv2sAB/wEJaaKPT0eXqav3L2PKfCjbyJcH+AP9G+A2e4UuWgQ==\nCoefficient: mynNLSgStpQMktIEdysefyOg5jpXE3VeDZF6fbEOUg+E2ZnLBkLu4KPrriCwfl+cLagwgzx2M6wV/1QWkm8vPQ=="
}, - "nsec_details": {
- "nsec3_hash_algo_desc": "SHA-1",
- "nsec3_hash_algo_num": "1",
- "nsec3_iterations": "3",
- "nsec3_narrow": 1,
- "nsec3_opt_out": "0",
- "nsec3_salt": "fa1ac2c1rd7fbab4",
- "nsec_version": "NSEC3"
}
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function imports a DNSSEC security key.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The security key's domain. |
| key_data required | string Example: key_data=Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A The security key data that the |
| key_type required | string Possible Values: "ksk" "zsk" Example: key_type=ksk The security key's type.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ import_zone_key \ domain='example.com' \ key_type='ksk' \ key_data=$'Private-key-format:%20v1.2%0AAlgorithm:%2013%20\\(ECDSAP256SHA256\\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A'
{- "apiversion": 3,
- "func": "import_zone_key",
- "module": "DNSSEC",
- "result": {
- "data": {
- "domain": "example.com",
- "new_key_id": "1",
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function configures the domain to use Next Secure Record (NSEC) semantics instead of Next Secure Record 3 (NSEC3) semantics.
Important:
When you disable the DNS role, the system disables this function.
| domain required | string Example: domain=example.com The domain on which to disable NSEC3 semantics and use NSEC semantics. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ unset_nsec3 \ domain='example.com'
{- "apiversion": 3,
- "func": "unset_nsec3",
- "module": "DNSSEC",
- "result": {
- "data": {
- "disabled": {
- "example.com": 1
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables DNSSEC on the domain.
Note:
Important:
When you disable the DNS role, the system disables this function.
| active | integer Default: 1 Possible Values: 0 1 Example: active=1 Whether to activate the newly-created key.
|
| algo_num | integer [ 0 .. 255 ] Default: 8 Example: algo_num=8 The algorithm that the system uses to generate the security key.
Note: We recommend that you use |
| domain required | string <domain> Examples:
The domain on which to enable DNSSEC. Note: To enable DNSSEC on multiple domains, increment the parameter name. For example: |
| key_setup | string Default: "classic" Possible Values: "simple" "classic" Example: key_setup=classic The manner in which the system creates the security key.
|
| nsec3_iterations | integer [ 0 .. 500 ] Default: 0 Example: nsec3_iterations=7 The number of times that the system rehashes the first resource record hash operation. A positive integer less than Note: In cPanel & WHM version 132 and earlier, the default value is |
| nsec3_narrow | integer Default: 1 Possible Values: 0 1 Example: nsec3_narrow=1 Whether NSEC3 will operate in Narrow or Inclusive mode. In Narrow mode, PowerDNS sends out white lies about the next secure record. Rather than query the resource record in the database, PowerDNS sends the hash plus
|
| nsec3_opt_out | integer Default: 0 Possible Values: 0 1 Example: nsec3_opt_out=0 Whether the system will create records for all delegations.
Note: Only select |
| nsec3_salt | string <hex> <= 255 characters Default: "-" Example: nsec3_salt=1A2B3C4D5E6F A hexadecimal string that the system appends to the domain name before it applies the hash function to the name. For more information about the salt value, read the RFC 5155 documentation. NOTE:
|
| use_nsec3 | integer Default: 1 Possible Values: 0 1 Example: use_nsec3=1 Whether the domain will use Next Secure Record (NSEC) or NSEC3 semantics.
Note: If you use NSEC semantics ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DNSSEC \ enable_dnssec \ domain='example.com'
{- "apiversion": 3,
- "func": "enable_dnssec",
- "module": "DNSSEC",
- "result": {
- "data": {
- "enabled": {
- "example.com": {
- "enabled": 1,
- "new_key_id": "1",
- "nsec_version": "NSEC3"
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a Dynamic DNS (DDNS) domain.
Important:
When you disable the DNS role, the system disables this function.
| description | string Example: description=Home network A human-readable string that describes the domain. |
| domain required | string <domain> Example: domain=home.example.com The fully-qualified domain name to create as a DDNS domain. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DynamicDNS \ create \ domain='home.example.com'
{- "apiversion": 3,
- "func": "create",
- "module": "DynamicDNS",
- "result": {
- "data": {
- "created_time": 0,
- "id": "ggiugyxxjwnkmqtwysgmvrurplmafxpq"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function deletes an existing Dynamic DNS (DDNS) domain.
Important:
When you disable the DNS role, the system disables this function.
| id required | string Example: id=ggiugyxxjwnkmqtwysgmvrurplmafxpq The DDNS domain’s ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DynamicDNS \ delete \ id='ggiugyxxjwnkmqtwysgmvrurplmafxpq'
{- "apiversion": 3,
- "func": "delete",
- "module": "DynamicDNS",
- "result": {
- "data": {
- "deleted": 1
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function gives a new, randomly-generated ID to an existing Dynamic DNS (DDNS) domain.
Important:
When you disable the DNS role, the system disables this function.
| id required | string Example: id=ggiugyxxjwnkmqtwysgmvrurplmafxpq The DDNS domain’s ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DynamicDNS \ recreate \ id='ggiugyxxjwnkmqtwysgmvrurplmafxpq'
{- "apiversion": 3,
- "func": "recreate",
- "module": "DynamicDNS",
- "result": {
- "data": {
- "id": "ggiugyxxjwnkmqtwysgmvrurplmafxpq"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function sets the description on a user’s Dynamic DNS (DDNS) domain.
Important:
When you disable the DNS role, the system disables this function.
| description required | string Example: description=Home network A human-readable string that describes the domain. |
| id required | string Example: id=ggiugyxxjwnkmqtwysgmvrurplmafxpq The DDNS domain’s ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DynamicDNS \ set_description \ id='ggiugyxxjwnkmqtwysgmvrurplmafxpq' \ description='Home network'
{- "apiversion": 3,
- "func": "list",
- "module": "DynamicDNS",
- "result": {
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists the user’s Dynamic DNS (DDNS) domains.
Important:
When you disable the DNS role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DynamicDNS \ list
{- "apiversion": 3,
- "func": "list",
- "module": "DynamicDNS",
- "result": {
- "data": [
- {
- "created_time": 0,
- "description": "My home network",
- "domain": "home.example.com",
- "id": "gziugyxxjwnamqtwysgmvrurplmafxpj",
- "last_run_times": [
- 0
], - "last_update_time": 0
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function determines whether a domain is temporary.
Note:
For more information about temporary domains, read our Temporary Domains documentation.
| domain required | string <domain> Example: domain=example.com A domain on the cPanel account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Domain \ is_temporary_domain \ domain=example.com
{- "apiversion": 3,
- "func": "is_temporary_domain",
- "module": "Domain",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "status": 1,
- "warnings": null
}
}This function converts a temporary domain into a registered domain and moves its document root files to the new document root location.
Note:
| docroot | string Example: docroot=example.com The path to the domain's document root directory. If you do not specify a value, this parameter defaults to the domain's name. Note: The function will create a symlink in place of the previous temporary domain's document root directory. The symlink will point to the registered domain's document root. |
| domain required | string <domain> Example: domain=wonderful-fushsia-owl.10-20-30-40.cpanel.site A valid temporary domain on the account. |
| registered required | string <domain> Example: registered=example.com A valid domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Domain \ convert_temporary_to_registered \ domain=wonderful-fushsia-owl.10-20-30-40.cpanel.site \ registered=example.com
{- "apiversion": 3,
- "func": "convert_temporary_to_registered",
- "module": "Domain",
- "result": {
- "data": {
- "message": "Domain wonderful-fushsia-owl.10-20-30-40.cpanel.site successfully converted to example.com"
}, - "errors": null,
- "messages": null,
- "status": 1,
- "warnings": null
}
}This function adds hotlink protection for a site. Hotlink protection will redirect users to another URL if they navigate to a file with a specified extension, but an allowed URL did not refer them.
Important:
When you disable the WebServer role, the system disables this function.
| allow_null | integer Possible Values: 0 1 Example: allow_null=1 Whether the domain allows hotlinks.
|
| extensions required | string Examples:
File types to hotlink protect. Note: To protect multiple file types, use a comma-separated list. |
| redirect_url required | string <url> Example: redirect_url=http://redirect.example.com/ The URL to which the system sends hotlinkers. |
| urls required | string Examples:
The site to hotlink protect. Note: To protect multiple URLs, separate each URL with a newline character. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ add_hotlink \ urls='http://example.com/' \ extensions='foo' \ redirect_url='http://redirect.example.com/'
{- "apiversion": 3,
- "func": "add_hotlink",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes hotlink protection.
Important:
When you disable the Web Server role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ delete_hotlink
{- "apiversion": 3,
- "func": "delete_hotlink",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists domains with hotlink protection.
Important:
When you disable the Web Server role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ list_hotlinks
{- "apiversion": 3,
- "func": "list_hotlinks",
- "module": "Mime",
- "result": {
- "data": {
- "allow_null": 1,
- "extensions": "jpg,jpeg,gif,png,bmp",
- "state": "disabled",
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function determines whether a domain is temporary.
Note:
For more information about temporary domains, read our Temporary Domains documentation.
| domain required | string <domain> Example: domain=example.com A domain on the cPanel account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Domain \ is_temporary_domain \ domain=example.com
{- "apiversion": 3,
- "func": "is_temporary_domain",
- "module": "Domain",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "status": 1,
- "warnings": null
}
}This function converts a temporary domain into a registered domain and moves its document root files to the new document root location.
Note:
| docroot | string Example: docroot=example.com The path to the domain's document root directory. If you do not specify a value, this parameter defaults to the domain's name. Note: The function will create a symlink in place of the previous temporary domain's document root directory. The symlink will point to the registered domain's document root. |
| domain required | string <domain> Example: domain=wonderful-fushsia-owl.10-20-30-40.cpanel.site A valid temporary domain on the account. |
| registered required | string <domain> Example: registered=example.com A valid domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Domain \ convert_temporary_to_registered \ domain=wonderful-fushsia-owl.10-20-30-40.cpanel.site \ registered=example.com
{- "apiversion": 3,
- "func": "convert_temporary_to_registered",
- "module": "Domain",
- "result": {
- "data": {
- "message": "Domain wonderful-fushsia-owl.10-20-30-40.cpanel.site successfully converted to example.com"
}, - "errors": null,
- "messages": null,
- "status": 1,
- "warnings": null
}
}This function returns the cPanel account's main domain.
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the response.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DomainInfo \ primary_domain
{- "apiversion": 3,
- "func": "primary_domain",
- "module": "DomainInfo",
- "result": {
- "data": {
- "primary_domain": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns the built-in subdomain aliases for an account's main domain.
Note:
This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain. For this reason, actual output may not contain all of the returns that this document lists.
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide domain aliases if the main domain is a temporary domain.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DomainInfo \ main_domain_builtin_subdomain_aliases
{- "apiversion": 3,
- "func": "main_domain_builtin_subdomain_aliases",
- "module": "DomainInfo",
- "result": {
- "data": [
- "mail",
- "www"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists user data for a domain.
Important:
This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain.
| domain required | string <domain> Example: domain=example.com The domain on the cPanel account. Important: Do not specify an alias (parked domain). |
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the returned values.
Note: If you set this parameter's value to |
| return_https_redirect_status | integer Default: 0 Possible Values: 0 1 Example: return_https_redirect_status=1 Whether to return the secure redirect status of the addon domains.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DomainInfo \ single_domain_data \ domain='example.com'
{- "apiversion": 3,
- "func": "single_domain_data",
- "module": "DomainInfo",
- "result": {
- "data": {
- "all_aliases_valid": 0,
- "can_https_redirect": 0,
- "customlog": {
- "domain": "combined",
- "target": "/usr/local/apache/domlogs/example.com"
}, - "documentroot": "/home/user/public_html/",
- "domain": "example.com",
- "group": "user",
- "hascgi": 1,
- "homedir": "/home/user",
- "ifmodulemodsuphpc": {
- "group": "user"
}, - "ip": "192.168.0.128",
- "is_https_redirecting": 0,
- "is_temporary": 0,
- "options": "ExecCGI Includes",
- "owner": "root",
- "phpopenbasedirprotect": 1,
- "port": 80,
- "scriptalias": {
- "path": "/home/user/public_html/cgi-bin",
- "url": "/cgi-bin/"
}, - "serveradmin": "webmaster@example.com",
- "serveralias": "parkeddomain.com www.parkeddomain.com www.example.com",
- "servername": "example.com",
- "type": "main_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the cPanel account's domains.
Note:
For this function to succeed, the /var/cpanel/userdata/username/main file (where username represents the authenticated user) must possess the correct permissions. If a permissions error occurs, this function returns blank values for all of its returns and does not return an error message.
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the response arrays.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DomainInfo \ list_domains
{- "apiversion": 3,
- "func": "list_domains",
- "module": "DomainInfo",
- "result": {
- "data": {
- "addon_domains": [
- "addondomain.com"
], - "main_domain": "example.com",
- "parked_domains": [
- "parkeddomain.com"
], - "sub_domains": [
- "subdomain.example.com"
], - "is_temporary": {
- "property1": 0,
- "property2": 0
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists user data for the cPanel account's domains.
Note:
This function retrieves data from the /var/cpanel/userdata/user/domain file, where user
represents the cPanel account username and domain represents the domain. For this reason,
actual output may not contain all of the returns that this document lists.
| format | string Default: "hash" Possible Values: "hash" "list" Example: format=hash The function's return format.
|
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the response arrays.
|
| return_https_redirects_status | integer Default: 0 Possible Values: 1 0 Example: return_https_redirects_status=1 Whether to return the secure redirect status of the addon domains.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DomainInfo \ domains_data
{- "data": {
- "addon_domains": [
- {
- "all_aliases_valid": "0",
- "can_https_redirect": "0",
- "documentroot": "/home/user/public_html/seconddomain.com",
- "domain": "seconddomain.com",
- "group": "user",
- "hascgi": "1",
- "homedir": "/home/user",
- "ip": "192.168.0.128",
- "ipv6": null,
- "is_https_redirecting": "0",
- "is_temporary": "0",
- "no_cache_update": "0",
- "owner": "root",
- "serveradmin": "webmaster@seconddomain.example.com",
- "serveralias": "seconddomain.com www.seconddomain.com www.seconddomain.example.com",
- "servername": "seconddomain.example.com",
- "type": "addon_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": ""
}, - {
- "all_aliases_valid": "0",
- "can_https_redirect": "0",
- "documentroot": "/home/user/public_html/subdomain",
- "domain": "exampledomain.com",
- "group": "user",
- "hascgi": "1",
- "homedir": "/home/user",
- "ip": "192.168.0.128",
- "ipv6": null,
- "is_https_redirecting": "0",
- "is_temporary": "0",
- "no_cache_update": "0",
- "owner": "root",
- "serveradmin": "webmaster@subdomain.example.com",
- "serveralias": "exampledomain.com www.exampledomain.com www.subdomain.example.com",
- "servername": "subdomain.example.com",
- "type": "addon_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": ""
}, - {
- "all_aliases_valid": "0",
- "can_https_redirect": "0",
- "documentroot": "/home/user/addondomain/home/dir",
- "domain": "addondomain.com",
- "group": "user",
- "hascgi": "1",
- "homedir": "/home/user",
- "ip": "192.168.0.128",
- "ipv6": null,
- "is_https_redirecting": "0",
- "is_temporary": "0",
- "main_domain": {
- "all_aliases_valid": "0",
- "can_https_redirect": "0",
- "customlog": [
- {
- "format": "combined",
- "target": "/usr/local/apache/domlogs/example.com"
}, - {
- "format": "\"%{%s}t %I .\\n%{%s}t %O .\"",
- "target": "/usr/local/apache/domlogs/example.com-bytes_log"
}
], - "documentroot": "/home/user/public_html",
- "domain": "example.com",
- "group": "user",
- "hascgi": "1",
- "homedir": "/home/user",
- "ifmodulemodsuphpc": {
- "group": "user"
}, - "ip": "192.168.0.128",
- "is_https_redirecting": "0",
- "options": "ExecCGI Includes",
- "owner": "root",
- "port": "80",
- "scriptalias": [
- {
- "path": "/home/user/public_html/cgi-bin",
- "url": "/cgi-bin/"
}, - {
- "path": "/home/user/public_html/cgi-bin/",
- "url": "/cgi-bin/"
}
], - "serveradmin": "webmaster@example.com",
- "serveralias": "parkeddomain.com www.parkeddomain.com www.example.com",
- "servername": "example.com",
- "type": "main_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": ""
}, - "no_cache_update": "0",
- "owner": "root",
- "parked_capable_of_https_redirects": [
- "parkeddomain.com"
], - "parked_domains": [
- "parkeddomain.com"
], - "parked_with_https_redirects": [
- "parkeddomain.com"
], - "serveradmin": "webmaster@subdomain.example.com",
- "serveralias": "addondomain.com www.addondomain.com www.subdomain.example.com",
- "servername": "subdomain.example.com",
- "sub_domains": [
- {
- "all_aliases_valid": "0",
- "can_https_redirect": "0",
- "documentroot": "/home/user/public_html/sub",
- "domain": "sub.example.com",
- "group": "user",
- "hascgi": "1",
- "homedir": "/home/user",
- "ip": "192.168.0.128",
- "ipv6": null,
- "is_https_redirecting": "0",
- "is_temporary": "0",
- "no_cache_update": "0",
- "owner": "root",
- "serveradmin": "webmaster@sub.example.com",
- "serveralias": "www.sub.example.com",
- "servername": "sub.example.com",
- "type": "sub_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": ""
}
], - "type": "addon_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": ""
}
]
}, - "errors": null,
- "messages": null,
- "metadata": null,
- "status": 1
}This function adds a redirect to a domain.
Important:
When you disable the Web Server role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain from which to redirect. |
| redirect required | string <url> Example: redirect=http://example.com/ The URL to which to redirect. |
| redirect_wildcard | integer Default: 0 Possible Values: 0 1 Example: redirect_wildcard=1 Whether to redirect all files within a directory to the same filename within the destination directory.
|
| redirect_www | integer Default: 0 Example: redirect_www=0 Whether to redirect domains with or without
|
| src | string <url-path> Default: "/" Example: src=/specific-page A specific page from which to redirect. |
| type | string Default: "permanent" Possible Values: "permanent" "temp" Example: type=permanent Whether the redirect is temporary.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ add_redirect \ domain='example.com' \ redirect='http://example.com/'
{- "apiversion": 3,
- "func": "add_redirect",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": [
- "Htaccess Installed"
], - "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a redirection URL for a domain.
| domain required | string <domain> Example: domain=example.com The domain's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ get_redirect \ domain='example.com'
{- "apiversion": 3,
- "func": "get_redirect",
- "module": "Mime",
- "result": {
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a redirect from a domain.
Important:
When you disable the Web Server role, the system disables this function.
| args | string Default: "" Example: args=redirectme http://redirectme.com/ An argument string that contains the arguments of a |
| docroot | string <path> Example: docroot=/home/example/public_html/ The absolute file path to the document root containing the If you don't pass this parameter, the system looks up the document root from the |
| domain required | string <domain> Example: domain=example.com The domain name. |
| src | string Default: "" Example: src=redirectpage.html The specific page that redirects visitors. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ delete_redirect \ domain='example.com'
{- "apiversion": 3,
- "func": "delete_redirect",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the redirects in an account's .htaccess files.
Important:
When you disable the Web Server role, the system disables this function.
| destination | string Example: destination=http://example.tld The string with which to filter results. ** Note: ** This will only return results that match the |
| regex | string Example: regex="^[a-z0-9_-]{6,18}$" A Perl regular expression that filters the results. The system matches the regular expression to the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ list_redirects
{- "apiversion": 3,
- "func": "list_redirects",
- "module": "Mime",
- "result": {
- "data": [
- {
- "displaydomain": "ALL",
- "displaysourceurl": "/marceau.html",
- "docroot": "/home/example/public_html",
- "domain": "example.com",
- "kind": "rewrite",
- "matchwww": 1,
- "matchwww_text": "checked",
- "opts": "L",
- "source": "/marceau.html",
- "sourceurl": "/marceau.html",
- "statuscode": "301",
- "type": "permanent",
- "urldomain": "example.com",
- "wildcard": 1,
- "wildcard_text": "checked"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function creates a subdomain.
Important:
When you disable the Web Server role, the system disables this function.
| canoff | integer Default: 1 Possible Values: 0 1 Example: canoff=1 Whether to use a canonical name (CNAME) in the Apache® configuration for self-referential URLs.
|
| dir | string <path> Example: dir=/public_html/directory_name The subdomain's document This value defaults to the user's home directory Note: If the Restrict document roots to public_html value is set to Off in WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings), this parameter defaults to the |
| disallowdot | integer Default: 0 Possible Values: 0 1 Example: disallowdot=1 Whether to remove the dot (
|
| domain required | string Example: domain=subdomain The subdomain name to create. |
| rootdomain required | string <domain> Example: rootdomain=example.com The domain on which to create the new subdomain. The domain must already exist on the cPanel account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SubDomain \ addsubdomain \ domain='subdomain' \ rootdomain='example.com'
{- "apiversion": 3,
- "func": "addsubdomain",
- "module": "SubDomain",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists virtual host names for each domain.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WebVhosts \ list_domains
{- "apiversion": 3,
- "func": "list_domains",
- "module": "WebVhosts",
- "result": {
- "data": [
- {
- "domain": "example.com",
- "proxy_subdomains": [
- "cpanel",
- "webmail",
- "autodiscover",
- "whm",
- "webdisk"
], - "vhost_is_ssl": 1,
- "vhost_name": "hostname.example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists every domain for which you may purchase an SSL certificate. The possible domains for the Secure Sockets Layer (SSL) certificate include applicable service subdomains.
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the returned values.
If you set this parameter's value to |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WebVhosts \ list_ssl_capable_domains
{- "apiversion": 3,
- "func": "list_ssl_capable_domains",
- "module": "WebVhosts",
- "result": {
- "data": [
- {
- "domain": "example.com",
- "is_proxy": 1,
- "vhost_name": "hostname.example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function changes the document root for a subdomain or addon domain owned by the calling cPanel user.
Important:
set_primary_domain_docroot function for that operation.When you disable the Web Server role, the system disables this function.
| docroot required | string <path> Example: docroot=public_html/myapp/public The new document root, given as a path relative to the user's home
directory. The path must begin with |
| domain required | string <domain> Example: domain=sub.example.com The full domain name of the subdomain or addon domain whose document root is to be changed. The domain must belong to the calling cPanel user. |
object | |
| errors | Array of strings |
| messages | Array of strings |
object | |
| status | integer Possible Values: 0 1
|
| warnings | Array of strings |
uapi --user=username --output=jsonpretty \ SubDomain \ changedocroot \ domain='sub.example.com' \ docroot='public_html/myapp/public'
{- "data": {
- "documentroot": "/home/username/public_html/myapp/public"
}, - "errors": [
- "string"
], - "messages": [
- "string"
], - "metadata": {
- "transformed": 0
}, - "status": 1,
- "warnings": [
- "string"
]
}This function creates thumbnails from images. The function saves the new thumbnail images in a thumbnails subdirectory inside the original directory. The system prepends thumbnail filenames with tn_ (for example, tn_picture.jpg).
Important:
When you disable the WebServer role, the system disables this function.
| dir required | string Example: dir=images The path to the directory where the image resides. When you pass this parameter, the function creates a thumbnail directory directly below the image directory. NOTE: This parameter can use an absolute directory path or a path relative to the user's home directory. |
| height_percentage required | integer [ 1 .. 99 ] Example: height_percentage=25 The percentage by which to reduce the thumbnails' height. |
| width_percentage required | integer [ 1 .. 99 ] Example: width_percentage=25 The percentage by which to reduce the thumbnails' width. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ImageManager \ create_thumbnails \ dir='images' \ width_percentage='25' \ height_percentage='25'
{- "apiversion": 3,
- "func": "create_thumbnails",
- "module": "ImageManager",
- "result": {
- "data": [
- {
- "failed": 1,
- "file": "/home/cptest1/public_html/images/610_290.jpg",
- "reason": "too many pixels",
- "thumbnail_file": "/home/cptest1/public_html/images/thumbnails/tn_610_290.jpg"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns the dimensions of the image file that you specify.
Important:
When you disable the WebServer role, the system disables this function.
| image_file required | string Example: image_file=image/myimage.jpg The path to the file to measure. Note: Use the absolute filepath or a path relative to the user's home directory. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ImageManager \ get_dimensions \ image_file='image/myimage.jpg'
{- "apiversion": 3,
- "func": "get_dimensions",
- "module": "ImageManager",
- "result": {
- "data": {
- "height": 300,
- "width": 261
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function converts an image to a new file format.
Important:
When you disable the WebServer role, the system disables this function.
| image_file required | string Example: image_file=images/myimage.jpg The image file to convert, relative to the cPanel account's |
| type required | string Example: type=png The format to which to convert the images. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ImageManager \ convert_file \ image_file='images/myimage.jpg' \ type='png'
{- "apiversion": 3,
- "func": "convert_file",
- "module": "ImageManager",
- "result": {
- "data": {
- "converted_file": "/home/cptest1/images/myimage.png"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function resizes a specified image.
Important:
When you disable the WebServer role, the system disables this function.
| height required | integer >= 1 Example: height=300 The height to which to set the image size. |
| image_file required | string Example: image_file=/images/image.jpg The name of the file to scale. Note: Use the absolute filepath or a filepath relative to the user's home directory. |
| save_original_as | string Example: save_original_as=images/original.jpg The path to the directory in which to save a copy the original image file. Note:
|
| width required | integer >= 1 Example: width=200 The width to which to set the image size. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ImageManager \ resize_image \ image_file='images/image.jpg' \ width='200' \ height='300'
{- "apiversion": 3,
- "func": "resize_image",
- "module": "ImageManager",
- "result": {
- "data": "/home/cptest1/images/myimage.jpg",
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function purges content from the .trash folder in the user's home directory.
Important:
When you disable the FileStorage role, the system disables this function.
| older_than | integer >= 0 Default: 0 Example: older_than=31 The maximum age in days of content that the function will not purge. Note: A value of |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ empty_trash
{- "apiversion": 3,
- "func": "empty_trash",
- "module": "Fileman",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the information for a specified file or directory.
Important:
When you disable the File Storage role, the system disables this function.
| check_for_leaf_directories | integer Default: 0 Possible Values: 0 1 Example: check_for_leaf_directories=1 Whether to flag directories that contain subdirectories.
|
| include_mime | integer Default: 0 Possible Values: 0 1 Example: include_mime=1 Whether to return the file's MIME type.
|
| include_permissions | integer Default: 0 Possible Values: 0 1 Example: include_permissions=1 Whether to parse the file owner's read and write permissions.
|
| path required | string <path> Example: path=public_html The directory from which to list files. |
| show_hidden | integer Default: 0 Possible Values: 0 1 Example: show_hidden=1 Whether to include hidden files in the output.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ get_file_information \ path='public_html'
{- "apiversion": 3,
- "func": "get_file_information",
- "module": "Fileman",
- "result": {
- "data": {
- "absdir": "/home/user",
- "ctime": 1400573272,
- "exists": 1,
- "file": "cgi-bin",
- "fullpath": "/home/user/public_html/cgi-bin",
- "gid": 503,
- "humansize": "5 KB",
- "isleaf": 1,
- "mimename": "publichtml",
- "mimetype": "text/plain",
- "mode": "16872",
- "mtime": 1400573272,
- "nicemode": 755,
- "path": "/home/user/public.html",
- "rawmimename": "text/plain",
- "rawmimetype": "text/plain",
- "read": 1,
- "size": 4096,
- "type": "file",
- "uid": 502,
- "write": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a file's content.
Important:
When you disable the File Storage role, the system disables this function.
Note:
JSON strings must be valid UTF-8. To retrieve a non-UTF-8 file via
JSON, we recommend that you give ISO-8859-1 as from_charset and
UTF-8 as to_charset, then decode the return payload’s content
as UTF-8.
| dir required | string <path> Example: dir=/home/user/public.html The file path to the directory that contains the selected file. |
| file required | string Example: file=example.html The file to retrieve. |
| from_charset | string Default: "_DETECT_" Example: from_charset=_DETECT_ The file’s character encoding. This parameter defaults to |
| to_charset | string Default: "_LOCALE_" Example: to_charset=_LOCALE_ The output character encoding. This parameter defaults to Important: Contexts that serialize the API response as JSON require
this value to be |
| update_html_document_encoding | integer Default: 1 Possible Values: 0 1 Example: update_html_document_encoding=1 Whether to update the file's HTML document encoding.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ get_file_content \ dir='/home/user/public_html' \ file='example.html'
{- "apiversion": 3,
- "func": "get_file_content",
- "module": "Fileman",
- "result": {
- "data": {
- "content": "`hi`",
- "dir": "/home/user/public_html",
- "filename": "example.html",
- "from_char": "UTF-8",
- "from_charset": null,
- "path": "/home/user/public_html/example.html",
- "to_char": "UTF-8",
- "to_charset": null
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a sorted list of files and directories.
Important:
When you disable the FileStorage role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
| check_for_leaf_directories | integer Default: 0 Possible Values: 0 1 Example: check_for_leaf_directories=1 Whether to return directories that contain subdirectories.
|
| dir required | string Example: dir=public_html The directory from which to list files. |
| include_mime | integer Default: 0 Possible Values: 0 1 Example: include_mime=1 Whether to return the file's MIME type.
Note: If you set this value to |
| include_permissions | integer Default: 0 Possible Values: 0 1 Example: include_permissions=0 Whether to parse the file owner's read and write permissions.
|
| limit_to_list | integer Possible Values: 0 1 Example: limit_to_list=0 Whether to return only entries that begin with the
If you do not use this parameter, the function returns all filenames. |
| mime_types | string Example: mime_types=text-plain The MIME types to return.
|
| only_these_files | string Example: only_these_files=cpbackup-exclude.conf A comma-separated list of files to return. If you do not use this parameter, the function returns all files. |
| raw_mime_types | string Example: raw_mime_types=text/plain The raw MIME types to return.
|
| show_hidden | integer Default: 0 Possible Values: 0 1 Example: show_hidden=1 Whether to include hidden files in the output.
|
| types | Array of strings Example: types=file|dir A pipe-separated list of file types to return.
If you do not use this parameter, the function returns all file types. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ list_files \ dir='public_html'
{- "apiversion": 3,
- "func": "list_files",
- "module": "Fileman",
- "result": {
- "data": {
- "dirs": [
- {
- "absdir": "/home/user",
- "ctime": 1400573272,
- "exists": 1,
- "file": "cgi-bin",
- "fullpath": "/home/user/public_html/cgi-bin",
- "gid": 503,
- "humansize": "5 KB",
- "isleaf": 1,
- "isparent": 1,
- "mimename": "text-plain",
- "mimetype": "text/plain",
- "mode": "16877",
- "mtime": 1400573272,
- "nicemode": 755,
- "path": "/home/user/public.html",
- "rawmimename": "text-plain",
- "rawmimetype": "text/plain",
- "read": 1,
- "size": 4096,
- "type": "file",
- "uid": 502,
- "write": 1
}
], - "files": [
- {
- "absdir": "/home/user",
- "ctime": 1400573272,
- "exists": 1,
- "file": "cgi-bin",
- "fullpath": "/home/user/public_html/cgi-bin",
- "gid": 503,
- "humansize": "5 KB",
- "isleaf": 1,
- "isparent": 1,
- "mimename": "text-plain",
- "mimetype": "text/plain",
- "mode": "16877",
- "mtime": 1400573272,
- "nicemode": 755,
- "path": "/home/user/public.html",
- "rawmimename": "text-plain",
- "rawmimetype": "text/plain",
- "read": 1,
- "size": 4096,
- "type": "file",
- "uid": 502,
- "write": 1
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function saves a file in a directory and encodes it in a character set.
Important:
When you disable the File Storage role, the system disables this function.
| content | string Example: content=hi The new file's contents. If you do not use this parameter, the function creates a blank file. |
| dir | string <path> Example: dir=/home/username/public_html The directory that contains the selected file. Note: This parameter defaults to the currently-authenticated user's |
| fallback | integer Default: 1 Possible Values: 0 1 Example: fallback=0 Whether the function will return an error or save in the default character set if it cannot save in the specified character set.
|
| file required | string Example: file=example.html The files to retrieve. |
| from_charset | string Default: "UTF-8" Example: from_charset=UTF-8 The character set encoding of the |
| to_charset | string Default: "UTF-8" Example: to_charset=ASCII The character set encoding in which to encode the file. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ save_file_content \ file='example.html'
{- "apiversion": 3,
- "func": "save_file_content",
- "module": "Fileman",
- "result": {
- "data": {
- "from_charset": "UTF-8",
- "path": "/home/user/public_html/example.html",
- "to_charset": "ASCII"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function converts a buffer from one encoding language to another.
Important:
When you disable the File Storage role, the system disables this function.
| content required | string Example: content=hi The file's contents. |
| discard_illegal | integer Possible Values: 0 1 Example: discard_illegal=1 Whether to discard any characters that do not transcode correctly.
|
| from_charset | |
| to_charset | |
| transliterate | integer Possible Values: 0 1 Example: transliterate=0 Whether to transcode invalid characters to valid characters in the new character set encoding.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ transcode \ content='hi'
{- "apiversion": 3,
- "func": "transcode",
- "module": "Fileman",
- "result": {
- "data": {
- "charset": "ASCII",
- "content": "hi"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function uploads files.
Note:
For more information about how to use this function in your custom code,
read our Use UAPI's Fileman::upload_files
Function in Custom Code tutorial.
Important:
When you disable the File Storage role, the system disables this function.
You cannot call this function through WHM API 1's uapi_cpanel function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
To implement Fileman::upload_files, read our Use UAPI's `Fileman::upload_files` Function in Custom Code tutorial.
{- "apiversion": 3,
- "func": "upload_files",
- "module": "Fileman",
- "result": {
- "data": {
- "content": "",
- "filename": "example.png"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns any files and directories that begin with a specified string.
Important:
When you disable the File Storage role, the system disables this function.
| dirsonly | integer Default: 0 Possible Values: 1 0 Whether to include only directories in the output.
|
| html | integer Default: 1 Possible Values: 0 1 Example: html=1 Whether to return HTML-encoded results.
|
| list_all | integer Default: 1 Possible Values: 1 0 Whether to return all files and directories inside the specified
directory. If you set this parameter's value to
|
| path required | string Example: path=public The prefix of the paths to complete. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Fileman \ autocompletedir \ path='public'
{- "apiversion": 3,
- "func": "autocompletedir",
- "module": "Fileman",
- "result": {
- "data": [
- {
- "file": "public_ftp"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns information about the account's MySQL® host.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ get_server_information
{- "apiversion": 3,
- "func": "get_server_information",
- "module": "Mysql",
- "result": {
- "data": {
- "host": "192.0.2.1",
- "is_remote": 1,
- "version": "5.6.23"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns information about the account's MySQL® host.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ locate_server
{- "apiversion": 3,
- "func": "locate_server",
- "module": "Mysql",
- "result": {
- "data": {
- "is_remote": 1,
- "remote_host": "192.0.2.1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a MySQL® database.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=newdb The new database's name. |
| prefix-size | integer Default: 16 Possible Values: 8 16 Example: prefix-size=16 The desired prefix size. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ create_database \ name='newdb'
{- "apiversion": 3,
- "func": "create_database",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function checks for errors in all of the tables in a MySQL® database.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=example_test The database's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ check_database \ name='example_test'
{- "apiversion": 3,
- "func": "check_database",
- "module": "Mysql",
- "result": {
- "data": [
- {
- "msg_text": "OK",
- "msg_type": "status",
- "table": "table1"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns a string that you can give to MySQL® to recreate a particular database’s schema.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not configured, the system disables this function.
| dbname required | string Example: dbname=username_example_db The database's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ dump_database_schema \ dbname='username_example_db'
{- "apiversion": 3,
- "func": "dump_database_schema",
- "module": "Mysql",
- "result": {
- "data": "-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)\n--\n-- Host: localhost Database:username_example_db\n-- ------------------------------------------------------\n-- Serverversion\t5.7.26\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT*/;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES utf8mb4*/;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00'*/;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET@OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET@OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SE@OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Current Database:`username_example_db`\n--\n\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ `username_example_d/*!40100 DEFAULT CHARACTER SET latin1 */;\n\nUSE `username_example_db`;\n/*!40103 SETTIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SETFOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS*/;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SETCHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SETCOLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES*/;\n\n-- Dump completed on 2019-06-06 9:44:04\n",
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists an account's MySQL® databases.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ list_databases
{- "apiversion": 3,
- "func": "list_databases",
- "module": "Mysql",
- "result": {
- "data": [
- {
- "database": "user_db",
- "disk_usage": 673,
- "users": [
- "db_user",
- "db2_user"
]
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function renames a MySQL® database.
MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:
Warning:
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| newname required | string <= 64 characters Example: newname=newlyrenamed The database's new name. Important:
|
| oldname required | string Example: oldname=mydb The database's current name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ rename_database \ oldname='mydb' \ newname='newlyrenamed'
{- "apiversion": 3,
- "func": "rename_database",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deletes a MySQL® database.
Important:
when you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=example The database's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ delete_database \ name='example'
{- "apiversion": 3,
- "func": "delete_database",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function repairs all of the tables in a MySQL® database.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=example_db The database's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ repair_database \ name='example_db'
{- "apiversion": 3,
- "func": "repair_database",
- "module": "Mysql",
- "result": {
- "data": [
- {
- "msg_text": "OK",
- "msg_type": "status",
- "table": "table1"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function creates a randomly named MySQL® database and user. This allows a 3rdparty tool to create its own DB without needing any knowledge of cPanel internals such as quotas or other limits. These will simply be passed back as an error.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| prefix | string Example: prefix=wp An optional string to prepend to the randomly generated database name. This is in addition to the cPanel user which will appear prior to this. The prefix should be 6 characters or less and be only alphanumeric characters. WARNING: longer prexies lead to less entropy in the random username. Keep it short if you can! |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ setup_db_and_user \ prefix='wp'
{- "apiversion": 3,
- "func": "setup_db_and_user",
- "module": "Mysql",
- "result": {
- "data": {
- "database": "cpuser_wp_gwl7vpix28owo855yjomc7rsghkbjv0d0kf45kcvzip9tyxw9kdd",
- "database_user": "cpuser_wp_dji1jdt7nhjiwjcjju45",
- "database_user_password": ";1t/U:wnFkCRL9q68]/+<TX=.C#7]n",
- "hostname": "localhost",
- "port": 3306
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function adds a note about a remote MySQL® server.
Important:
required | string or string or string or string Example: host=192.168.1.6 The remote MySQL server's hostname or IP address. You may use the following IP address formats:
|
| note required | string Example: note=A remote mysql server for storing my data note that describes the remote MySQL server. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ add_host_note \ host='192.168.1.6' \ note='A remote mysql server for storing my data'
{- "apiversion": 3,
- "func": "add_host_note",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function authorizes a remote MySQL® host to access the account's databases.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
required | string or string or string or string Example: host=192.168.1.6 The remote MySQL server's hostname or IP address. You may use the following IP address formats:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ add_host \ host='192.168.1.6'
{- "apiversion": 3,
- "func": "add_host",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a remote MySQL® host's access to the account's databases.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| host required | string Example: host=remote.example.com The remote MySQL server's hostname, IP Address, or IP address range. Note: You may use the following IP address formats: 192.168.1.6 — IP address. 192.168.%.% — Range with the percent (%) symbol as a wildcard. 192.168.0.0/16 — Range in CIDR format. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ delete_host \ host='remote.example.com'
{- "apiversion": 3,
- "func": "delete_host",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the notes associated with the account's remote MySQL® hosts.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ get_host_notes
{- "apiversion": 3,
- "func": "get_host_notes",
- "module": "Mysql",
- "result": {
- "data": {
- "1.2.3.45": "The combination on my luggage",
- "12.34.56.78": "Located somewhere in the Ford Galaxy",
- "8.8.8.8": "Located on Spaceball 1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates privileges for all MySQL® databases and users on an account.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ update_privileges
{- "apiversion": 3,
- "func": "update_privileges",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deletes a MySQL® user.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=example The MySQL user's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ delete_user \ name='example'
{- "apiversion": 3,
- "func": "delete_user",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a MySQL® database user.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| name required | string Example: name=dbuser A valid database username. Important:To learn more about database username limits, check your database type: MySQL 5.6MySQL version 5.6 limits the database username to 16 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MySQL 5.7+MySQL versions 5.7 and later limit the database username to 32 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MariaDBMariaDB limits the database username to 47 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
|
| password required | string Example: password=12345luggage The new user's password. |
| prefix-size | integer Default: 16 Possible Values: 8 16 Example: prefix-size=16 The desired prefix size. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ create_user \ name='dbuser' \ password='12345luggage'
{- "apiversion": 3,
- "func": "create_user",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists a MySQL® database user's privileges.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| database required | string Example: database=mydb The database name. |
| user required | string Example: user=dbuser The database user's name. Important: If database prefixing is enabled, you must prefix this value with the account prefix and an underscore ( For example, for the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ get_privileges_on_database \ user='dbuser' \ database='mydb'
{- "apiversion": 3,
- "func": "get_privileges_on_database",
- "module": "Mysql",
- "result": {
- "data": [
- "CREATE"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists a MySQL® database's name, username length restrictions, and database prefix.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ get_restrictions
{- "apiversion": 3,
- "func": "get_restrictions",
- "module": "Mysql",
- "result": {
- "data": {
- "max_database_name_length": 64,
- "max_username_length": 16,
- "prefix": "user_"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a database user's MySQL® routines.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not configured, the system disables this function.
| database_user | string Example: database_user=db_user The database user for whom to return MySQL routines. If you don't specify a database user, this function returns the MySQL routines for all database users. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ list_routines
{- "apiversion": 3,
- "func": "list_routines",
- "module": "Mysql",
- "result": {
- "data": [
- "cptest_newdb.hello",
- "cptest_newdb.my_routine"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists an account's MySQL® database users.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not configured, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ list_users
{- "apiversion": 3,
- "func": "list_users",
- "module": "Mysql",
- "result": {
- "data": [
- {
- "databases": [
- "user_database1",
- "user_database2"
], - "shortuser": "user1",
- "user": "example_user1"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function renames a MySQL® database user.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| newname required | string Example: newname=mynewusername The user's new name. Important:To learn more about database username limits, check your database type: MySQL 5.6MySQL version 5.6 limits the database username to 16 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MySQL 5.7+MySQL versions 5.7 and later limit the database username to 32 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
MariaDBMariaDB limits the database username to 47 characters. The server uses the first nine characters of this limit for the database prefix. The database prefix uses the cPanel account's username and an underscore ( For example:
|
| oldname required | string Example: oldname=dbuser The user's current name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ rename_user \ oldname='dbuser' \ newname='mynewusername'
{- "apiversion": 3,
- "func": "rename_user",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function revokes a MySQL® database user's privileges.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| database required | string Example: database=mydb The database's name. |
| user required | string Example: user=dbuser The database user's name. Important: If database prefixing is enabled, you must prefix this value with the account
prefix and an underscore ( For example, for the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ revoke_access_to_database \ user='dbuser' \ database='mydb'
{- "apiversion": 3,
- "func": "revoke_access_to_database",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets a MySQL® database user's password.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
| password required | string Example: password=12345luggage The user's new password. |
| user required | string Example: user=dbuser The MySQL database user. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ set_password \ user='dbuser' \ password='12345luggage'
{- "apiversion": 3,
- "func": "set_password",
- "module": "Mysql",
- "result": {
- "data": {
- "failures": [
- {
- "error": "string",
- "host": "string"
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets a MySQL® database user's privileges.
Important:
When you disable the MySQL/MariaDB role, and remote MySQL is not already configured, the system disables this function.
| database required | string Example: database=cpuser_dbname The database's name. Important: If database prefixing is enabled, you must prefix this value with the account prefix and an underscore ( |
| privileges | string Example: privileges=DELETE,UPDATE,CREATE,ALTER
Note:
|
| user required | string Example: user=cpuser_dbuser The database user's name. Important: If database prefixing is enabled, you must prefix this value with the account prefix and an underscore ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mysql \ set_privileges_on_database \ user='cpuser_dbuser' \ database='cpuser_dbname'
{- "apiversion": 3,
- "func": "set_privileges_on_database",
- "module": "Mysql",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a new Content Delivery Network (CDN).
| api_key | string Example: api_key=MyAPIKey The new CDN's global API key. |
| description required | string Example: description=New description A description of the new CDN. |
string Example: email=my-email@domain.test The new CDN's global API email. | |
| provider required | string Example: provider=cloudflare The new CDN's provider. |
| token required | string Example: token=deadbeef The new CDN's security token. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ create_cdn \ provider='cloudflare' \ description='New description' \ token='deadbeef'
{- "apiversion": 3,
- "func": "create_cdn",
- "module": "CDN",
- "result": {
- "data": [
- {
- "created_at": 1701820415,
- "description": "MyName",
- "expires_at": 0,
- "id": 1,
- "provider": "cloudflare"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function checks if a user can edit account-level CDN settings.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ can_edit_cdn_credentials
{- "apiversion": 3,
- "func": "can_edit_cdn_credentials",
- "module": "CDN",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function disables a CDN.
| instance_id required | integer Example: instance_id=1 The instance ID of the CDN to disable. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ disable_cdn \ instance_id='1'
{- "apiversion": 3,
- "func": "disable_cdn",
- "module": "CDN",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns a CDN's configuration.
| instance_id required | integer Example: instance_id=1 The instance ID for the CDN from which to retrieve the configuration. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ get_cdn_configuration \ instance_id='1'
{- "apiversion": 3,
- "func": "get_cdn_configuration",
- "module": "CDN",
- "result": {
- "data": [
- {
- "cdn_expected_nameservers": [
- "joaquin.ns.cloudflare.com",
- "jocelyn.ns.cloudflare.com"
], - "cdn_id": 1,
- "cdn_integration_status": 0,
- "cdn_provider": 1,
- "cdn_token_is_valid": 1,
- "current_nameservers": [
- "kevin.ns.cloudflare.com",
- "vivienne.ns.cloudflare.com"
], - "is_cdn_enabled_on_instance": 1,
- "is_cdn_enabled_on_zone": 1,
- "wptk_instance_id": 2,
- "zone": "webprostest7.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function checks if a CDN's DNS zone is active.
| instance_id required | integer Example: instance_id=1 The instance ID of the CDN to check. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ rerun_activation_check \ instance_id='1'
{- "apiversion": 3,
- "func": "rerun_activation_check",
- "module": "CDN",
- "result": {
- "data": {
- "activation_check_triggered": 1
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function compares DNS zone files among a CDN's servers, recognizes which are the most up-to-date, and updates the servers to use those files.
| force | boolean Example: force=true Whether to force CDN zone file updates. |
| instance_id required | integer Example: instance_id=1 The instance ID of the CDN whose DNS zone files to compare. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ setup_zone \ instance_id='1'
{- "apiversion": 3,
- "func": "setup_zone",
- "module": "CDN",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function updates the CDN description.
| description required | string Example: description=New description The new description for the CDN. |
| id required | integer Example: id=1 The instance ID of the CDN whose description to update. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ update_cdn \ id='1' \ description='New description'
{- "apiversion": 3,
- "func": "update_cdn",
- "module": "CDN",
- "result": {
- "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns a local CDN's settings.
| instance_id required | integer Example: instance_id=1 The instance ID of the local CDN whose settings to retrieve. for |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ get_local_cdn_settings \ instance_id='1'
{- "apiversion": 3,
- "func": "get_local_cdn_settings",
- "module": "CDN",
- "result": {
- "data": [
- {
- "nameservers": [
- "osmar.ns.cloudflare.com",
- "pearl.ns.cloudflare.com"
], - "origin": "wp2",
- "provider": "CloudFlare"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function deletes one or more CDN(s).
| id required | integer Example: id=1 The instance ID(s) for the CDN(s) to delete. Note: To delete multiple CDNs, pass this parameter multiple times. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ delete_cdn \ id='1'
{- "apiversion": 3,
- "func": "delete_cdn",
- "module": "CDN",
- "result": {
- "data": [
- 1,
- 3
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function enables a CDN to distribute content.
| cdn_id required | integer Example: cdn_id=1 The CDN ID of the CDN to enable. |
| instance_id required | integer Example: instance_id=1 The instance ID of the CDN to enable. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ enable_cdn \ cdn_id='1' \ instance_id='1'
{- "apiversion": 3,
- "func": "enable_cdn",
- "module": "CDN",
- "result": {
- "data": [
- {
- "zone": "main-zone.test"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns a list of CDNs. You can filter it to return a list of CDNs with a specific provider.
| provider | string Example: provider=cloudflare The CDN provider by which to filter. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CDN \ get_cdns
{- "apiversion": 3,
- "func": "get_cdns",
- "module": "CDN",
- "result": {
- "data": [
- {
- "created_at": 1701820415,
- "description": "MyName",
- "expires_at": 0,
- "id": 1,
- "provider": "cloudflare"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}Rename an existing website.
| domain required | string Example: domain=new-domain.com The new domain name for the website. |
| id required | integer Example: id=42 The instance id of the website to rename. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ rename_website \ id='42' \ domain='new-domain.com'
{- "apiversion": 3,
- "func": "rename_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "rename_website",
- "args": {
- "domain": "new-domain.com",
- "instance_id": 42,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_rename_website.42.new-domain.com.log"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_rename_website.42.new-domain.com.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}Queue a walk-through website installation for the given domain.
This queues a background task (UserTask) that you can monitor with the sse_url value in the response.
Warning:
When you call this function for the first time on the account's main domain, the system overwrites the existing auto-installed WordPress instance.
| domain | string Example: domain=mydomain.tld The name of the domain on which to install the walk-through website. If not provided, the system generates a temporary domain. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_walkthrough_website \ domain='mydomain.tld'
{- "apiversion": 3,
- "func": "create_walkthrough_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "create_walkthrough_website",
- "args": {
- "domain": "mydomain.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function duplicates the WP::import_website function and includes admin-level session creation. Integrators can use this function to receive a ready-to-use login URL without having to make a separate session-creation request.
Note:
url returned value is a single-use session URL. It expires at the Unix
timestamp provided in the expires return's value.url includes an encoded goto_uri destination parameter that points to
the WP Squared import progress view for the given domain.sse_url return value with the
WP::get_import_session function once the task is queued.| domain | string Example: domain=example.com The domain to use for the imported WordPress website. If you do not provide a domain, the system will automatically generate a temporary domain. |
| ignore_invalid_cert | integer Default: 0 Possible Values: 0 1 Whether to ignore SSL certificate errors when importing the source WordPress site.
Note: If you ignore SSL errors, the function will import the WordPress site even if the source site has an invalid, self-signed, expired, or mismatched SSL certificate. |
| is_first_time | integer Default: 0 Possible Values: 0 1 Whether this is the user's first-time setup flow. When the value is
set to |
| locale | string Example: locale=en The locale tag for the created cPanel session (for example, |
| overwrite | integer Default: 0 Possible Values: 0 1 Whether to overwrite an existing WordPress site on the target domain.
When the value is set to |
| password_type | string Default: "admin" Possible Values: "admin" "application" Example: password_type=admin The type of password provided in
|
| source_password required | string Example: source_password=12345luggage The WordPress admin or application password for the source WordPress website. |
| source_url required | string Example: source_url=https://oldsite.example.com The URL of the source WordPress website to import. |
| source_user required | string Example: source_user=import_user The WordPress admin username for the source website. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_import_session \ domain='example.com' \ source_url='https://oldsite.example.com' \ source_user='import_user' \ source_password='12345luggage'
{- "apiversion": 3,
- "func": "create_import_session",
- "module": "WP",
- "result": {
- "data": {
- "domain": "example.com",
- "expires": 1744329600,
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}Check the installation status of recommended plugins.
| id required | integer Example: id=42 The instance id to check recommended plugins. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ has_recommended_plugins \ id='42'
{- "apiversion": 3,
- "func": "has_recommended_plugins",
- "module": "WP",
- "result": {
- "data": {
- "is_installed": 1,
- "installed": [
- "clsop",
- "redis-cache"
], - "not_installed": [
- "extendify"
]
}
}
}Import an existing WordPress website into WP Squared.
Note:
This document uses the term source to refer to the installation from which you wish to import the WordPress website.
| domain | string Example: domain=example.com The domain to use for the imported WordPress website. If you do not provide a domain, the system will automatically generate a temporary domain. |
| ignore_invalid_cert | integer Default: 0 Possible Values: 0 1 Whether to ignore SSL certificate errors when importing the source WordPress site.
Note: If you ignore SSL errors, the function will import the WordPress site even if the source site has an invalid, self-signed, expired, or mismatched SSL certificate. |
| is_first_time | integer Possible Values: 0 1 Whether this is the first time the user sets up a WordPress site. When the value is set to |
| overwrite | integer Possible Values: 0 1 Whether to overwrite an existing WordPress site on the target domain. When the value is set to |
| password_type | string Default: "admin" Possible Values: "admin" "application" Example: password_type=admin The type of password provided in
|
| source_password required | string Example: source_password=12345luggage The password for the source WordPress website to import. |
| source_url required | string Example: source_url=https://oldurl.example.com The source URL of the WordPress website to import. |
| source_user required | string Example: source_user=import_user The source username for the WordPress website to import. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ import_website \ domain='mydomain.tld' \ source_user='import_user' \ source_password='123456luggage' \ source_url='https://source.example.test'
{- "apiversion": 3,
- "func": "import_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "import_website",
- "args": {
- "domain": "addon6.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves the DNS records for a WP Toolkit instance.
| instance_id required | integer Example: instance_id=123 The WP Toolkit instance ID. Note You can list a WP Squared account's WP Toolkit instance IDs with UAPI's |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPDNS \ fetch_zone_for_instance \ id='123'
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "hide": true,
- "instance_id": 42,
- "records": [
- {
- "data_b64": [
- "MTAuMi42Ni44MA=="
], - "dname_b64": "d3Aud2l0aC1hbmRyZXcuY29t",
- "line_index": 42,
- "record_type": [
- "A",
- "TXT",
- "MX",
- "CNAME"
], - "text_b64": "JFRUTCAxNDQwMA==",
- "ttl": 14400,
- "type": [
- "comment",
- "control",
- "record"
]
}
], - "requested_zone": [
- "example.com",
- "sub.example.com"
], - "zone": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Retrieve the cached import task data for a domain previously queued via
WP::create_import_session.
Use this function to check the status of an in-progress import, or to
retrieve the task's sse_url return value for monitoring via Server-Sent Events.
Note:
This function returns cached task data written at queue time. The data
reflects the task as it was when the create_import_session function ran, not its
current execution state. To monitor live progress, use the sse_url return
field in the returned task object.
| domain required | string Example: domain=example.com The domain to return the cached import session. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_import_session \ domain='example.com'
{- "apiversion": 3,
- "func": "get_import_session",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "import_website",
- "args": {
- "domain": "example.com",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1744300000.12345_add_domain.example.com.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1744300000.12345_add_domain.example.com.log",
- "subsystem": "WordPress"
}
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function fetches cPanel generated domains for a given domain. These are typically subdomains like webmail, mail, ftp, etc. that are automatically created by cPanel.
| domain required | string Example: domain=example.com The domain name to fetch generated domains for. Note This should be a valid domain name that exists in the account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPDNS \ fetch_generated_domains \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_generated_domains",
- "module": "WPDNS",
- "result": {
- "data": [
- {
- "domain": "webmail.example.com"
}
], - "errors": [
- "string"
], - "messages": [
- "string"
], - "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": [
- "string"
]
}
}Check the quota status of the user's account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ has_reached_quota
{- "apiversion": 3,
- "func": "has_reached_quota",
- "module": "WP",
- "result": {
- "data": {
- "has_reached_quota": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function list all WordPress websites for one cPanel account.
| id | integer Example: id=42 The WP Toolkit instance ID. When provided, returns only the website matching this ID. Use this parameter to fetch data for a single website instead of all websites. |
| limit | integer Default: 0 Example: limit=3 The maximum number of websites to return. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ list_websites
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "domains": [
- {
- "admin_email": "admin@my-domain.test",
- "blogdescription": "new month",
- "blogname": "June 1st",
- "current_theme": "Blockpress",
- "documentroot": "/home/junefirst/public_html/my-domain.test",
- "domain": "my-domain.test",
- "is_main_domain": 1,
- "is_staging": 0,
- "issues": [
- "string"
], - "labels": [
- {
- "name": "mylabel",
- "type": "user"
}
], - "preview_info": {
- "available": true,
- "enabled": false,
- "preview_domain": "idealistic-aqua-seal.127-0-0-1.wpsquared.site",
}, - "redirects": {
- "count": 1,
- "list": [
- {
- "displaydomain": "something.my-domain.test",
- "displaysourceurl": "/",
- "docroot": "/home/wpaccount/public_html/something.mysecond",
- "domain": "something.my-domain.test",
- "kind": "rewrite",
- "matchwww": 1,
- "matchwww_text": "checked",
- "opts": "L",
- "source": "/",
- "sourceurl": "/",
- "statuscode": 301,
- "type": "permanent",
- "urldomain": "something.my-domain.test",
- "wildcard": 0,
- "wildcard_text": ""
}
]
}, - "staged_domain": "parent-domain.tld",
- "staged_source_id": 12,
- "status": "",
- "template": "blockpress",
- "updates": {
- "amountOfPluginsWithUpdates": 0,
- "amountOfThemesWithUpdates": 0,
- "applicable": true,
- "autoUpdatesAvailable": true,
- "availableVersion": null,
- "currentVersion": "6.5.3",
- "php": {
- "applicable": true,
- "available": true,
- "taskStatus": "notExist"
}, - "smart": {
- "applicable": true,
- "available": true,
- "initiatedByAutoUpdater": false,
- "promoAvailable": false,
- "status": false,
- "taskStatus": "notExist"
}
}, - "wptk_id": 118
}
], - "info": {
- "disk_quota_reached": 0,
- "first_time_experience": 0,
- "max_instances_authorized": -1,
- "results": 2,
- "total": 2
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function checks whether NGINX caching is enabled for the WP Squared account.
Note:
ea-nginx package is installed, enabled, and not in standalone mode.enabled: 0 without an error.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ is_nginx_caching_enabled
{- "apiversion": 3,
- "func": "is_nginx_caching_enabled",
- "module": "WP",
- "result": {
- "data": {
- "enabled": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the bootstrap configuration properties for the
WP Squared Angular application. The Angular app fetches this once at
runtime during APP_INITIALIZER, replacing the legacy
window.PAGE injection that the Template Toolkit wrapper provided
before WPX-9614 decoupled wp-squared from Template Toolkit.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_page_config
{- "apiversion": 3,
- "func": "get_page_config",
- "module": "WP",
- "result": {
- "data": {
- "hostname": "server.example.com",
- "username": "cpuser",
- "locale": "en-US",
- "locale_direction": "ltr",
- "customizations": {
- "favicon": "string",
- "header_logo": "string",
- "main_menu_logo": "string",
- "logo_description_html": "string",
- "documentation_url": "string",
- "help_url": "string",
- "email_url": "string",
- "material_theme": "string"
}, - "custom_mat_theme": "teal",
- "custom_theme_mode": "light",
- "custom_theme_variables_file": "wp-teal-light-variables-custom.css",
- "contact_info": {
- "name": "string",
- "url": "string"
}, - "mixpanel_config": {
- "cp_analytics_data": {
- "UUID": "string",
- "company_id": "string",
- "server_main_ip": "string",
- "is_nat": null,
- "server_main_ip_is_private": null
}, - "is_sandbox": 0,
- "serverOptIn": 0,
- "accountOptIn": 0
}, - "debug_mode": 0,
- "nginx_installed": 0,
- "is_2fa_sec_policy_enabled": 0,
- "apps": [
- { }
], - "autossl_provider": "cPanel"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Remove a domain using one instance id or a domain.
| domain | string Example: domain=your-domain.com The domain name of the instance to delete. Provide either this or |
| id | integer Example: id=42 The instance id to delete. Provide either this or |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ remove_website \ id=42
{- "apiversion": 3,
- "func": "remove_website",
- "module": "WP",
- "result": {
- "data": {
- "reason": "The subdomain “sub.my-domain.net” has been removed."
}
}
}Add a domain and WP Toolkit website for it.
| domain | string Example: domain=mydomain.tld The name of the domain to add. Generate a temporary domain when not provided. |
| tagline | string Default: "" Example: tagline=Your number one source for WebPros merch. The tagline of the WordPress website. |
| theme required | string Example: theme=twentytwentyeight The theme to enable for the WordPress website. |
| title required | string Example: title=WebPros Gift Shop The title of the WordPress website. |
| use_existing_wp_installation | integer Default: 0 Possible Values: 0 1 Example: use_existing_wp_installation=0 Use an existing WordPress installation found in the domain's document root. NOTE:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_website \ domain='mydomain.tld' \ title='WebPros Gift Shop' \ theme='twentytwentyeight'
{- "apiversion": 3,
- "func": "create_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "create_website",
- "args": {
- "domain": "addon6.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function marks a notification as acknowledged for the user.
| id required | integer Example: id=23 The notification ID to mark as acknowledged. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ acknowledge_notification \ id='23'
{- "apiversion": 3,
- "func": "acknowledge_notification",
- "module": "WP",
- "result": {
- "data": {
- "acknowledged": 1
}
}
}This function deletes one or more backups for a specified WordPress® instance.
| fileName required | Array of strings Example: fileName=yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz The name of the backup file to delete. |
| id required | integer Example: id=12 The ID of the backup instance to delete. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_delete \ id='12' \ fileName='yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz'
{- "apiversion": 3,
- "func": "backup_delete",
- "module": "WP",
- "result": {
- "data": "Successfully deleted backup file(s): yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz",
- "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function initiates a background backup for a specified WordPress® instance. SSE is used to track the status. SSE is used for tracking the status.
| instance_id required | integer Example: instance_id=50 The ID of the WordPress instance for which the backup is to be performed. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_perform \ instance_id='50'
{- "apiversion": 3,
- "func": "backup_perform",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "backup_perform",
- "args": {
- "instance_id": 73,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675966022.87987_backup_perform.73.1675966022.log"
}, - "sse_url": "/sse/UserTasks/00000000_63e53646d705c0/wp_1675966022.87987_backup_perform.73.1675966022.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63e53646d705c0"
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function retrieves a list of all backups for a specific WordPress® instance. instance.
| instance_id required | integer Example: instance_id=42 The ID of the WordPress instance. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_list \ instance_id='42'
{- "apiversion": 3,
- "func": "backup_list",
- "module": "WP",
- "result": {
- "data": {
- "backups": [
- {
- "absoluteFilePath": "/home/user/wordpress-backups/yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz",
- "createDate": "2023-02-08T21:14:13.000Z",
- "fileName": "yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz",
- "fileSize": 31100915
}
], - "total": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function restores a backup for an instance.
Note:
This function uses SSE. You can track the task's status via its sse_url path.
| fileName required | string Example: fileName=yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz The name of the backup file to restore. |
| id required | integer Example: id=73 The instance ID. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_restore \ id='73' \ fileName='yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz'
{- "apiversion": 3,
- "func": "backup_restore",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "backup_restore",
- "args": {
- "fileName": "yourdomain.tld__2023-02-08T21_36_13+0000.tar.gz",
- "instance_id": 73,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log"
}, - "sse_url": "/sse/UserTasks/00000000_63e5370cd4a39a/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63e5370cd4a39a"
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}Clone one instance to a new website.
| domain | string Example: domain=clone-it-there.com The domain to use for the new clone. Use a temporary domain when not provided. |
| id required | integer Example: id=42 The source instance id to clone. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ clone_instance \ id='42' \ domain='clone-it-there.com'
{- "apiversion": 3,
- "func": "clone_instance",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "clone_instance",
- "args": {
- "domain": "clone-it.tld",
- "instance_id": 60,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_clone_instance.60.clone-it.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_clone_instance.60.clone-it.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}This function returns whether a WPTK website can use a domain.
| domain required | string Example: domain=cptest.tld The domain being requested. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ can_use_domain \ domain='cptest.tld'
{- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables scheduled backups for a WordPress® instance by its ID.
| id required | integer Example: id=123 The ID of the WordPress instance for which to disable backups. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ disable_scheduled_backups \ id='123'
{- "apiversion": 3,
- "func": "disable_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "is_enabled": false
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function gets WP Squared notifications for an account.
| category | string Example: category=My Notification Category The category of notifications to get. |
| instance_id | integer Example: instance_id=23 The WP Toolkit instance ID for which to get the notifications. |
| type | string Possible Values: "info" "error" "warn" The specific type of notifications to get. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_all_notifications
{- "apiversion": 3,
- "func": "get_all_notifications",
- "module": "WP",
- "result": {
- "data": {
- "category": "My Category",
- "created_at": 1730904792,
- "custom_action": "do-that",
- "expired_at": 0,
- "id": 1,
- "instance_id": 1,
- "text": "This is a notification.",
- "title": "My Title",
- "type": "info"
}
}
}This function returns the maximum number of websites authorized for one account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_max_instances
{- "result": {
- "data": {
- "max_instances_authorized": 2
}
}
}This function enables scheduled backups for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to enable backups. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ enable_scheduled_backups \ id='42'
{- "apiversion": 3,
- "func": "enable_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "is_enabled": true
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the main id for an account (i.e., the id for the WPTK instance setup on the primary domain).
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_main_account_id
{- "apiversion": 3,
- "func": "get_main_account_id",
- "module": "WP",
- "result": {
- "data": {
- "main_id": 10
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the configuration of scheduled backups.
| id required | integer Example: id=120 The instance ID for which to the retrieve the backup settings. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_scheduled_backups \ id='120'
{- "apiversion": 3,
- "func": "get_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "schedule": {
- "is_enabled": true,
- "max": 5,
- "weekdays": [
- 0,
- 1
]
}
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}Similar to get_website_performance, this function returns performance score with full metrics.
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page.
If you call this API with force=1, it will wait for the cache to update if it is out of date before returning the information.
| force | integer Default: 0 Possible Values: 1 0 Example: force=1 Force refresh the statistics if needed. |
| id required | integer Example: id=42 The website instance id used to retrieve performance. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_site_performance_full \ id='42'
{- "apiversion": 3,
- "func": "get_site_performance_full",
- "module": "WP",
- "result": {
- "data": {
- "DESKTOP_PAGESPEED": { },
- "MOBILE_PAGESPEED": { },
- "_cache_cached_at": 1679436748,
- "_cache_expires_at": 1710972748
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Returns website performance average score.
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page.
This is a lighter version of get_site_performance_full which returns the whole data.
If you call this API with force=1, it will wait for the cache to update if it is out of date before returning the information.
| force | integer Default: 0 Possible Values: 1 0 Example: force=1 Force refresh the statistics if needed. |
| id required | integer Example: id=42 The website instance id used to retrieve performance. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_site_performance \ id='42'
{- "apiversion": 3,
- "func": "get_site_performance",
- "module": "WP",
- "result": {
- "data": {
- "_cache_cached_at": 1679436748,
- "_cache_expires_at": 1710972748,
- "desktop": {
- "performance": {
- "score": 0.93
}
}, - "mobile": {
- "performance": {
- "score": 0.73
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the daily stats.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_stats_daily
{- "result": {
- "data": {
- "domain": "cyclone.tld",
- "instance_id": 42,
- "stats": {
- "Wed Jan 31 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 81110,
- "hits": 6,
- "pages": 6,
- "visits": 5
}, - "Thu Feb 01 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 888296,
- "hits": 43,
- "pages": 14,
- "visits": 7
}
}
}
}
}Retrieve the sumup statistics from AwStats for one WP Toolkit instance. The metrics also include the trends over the last days.
| id required | integer Example: id=42 The website instance id used to retrieve statistics. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_stats_highlights \ id='42'
{- "apiversion": 3,
- "func": "get_stats_daily",
- "module": "WP",
- "result": {
- "data": {
- "domain": "my-domain.tld",
- "instance_id": 210,
- "stats": {
- "bandwidth": {
- "delta": 37.12,
- "total": 136840
}, - "hits": {
- "delta": 68.29,
- "total": 28
}, - "pages": {
- "delta": 70,
- "total": 28
}, - "visits": {
- "delta": 75.86,
- "total": 22
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Check whether this is the first time experience workflow.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ is_first_time_experience
{- "apiversion": 3,
- "func": "is_first_time_experience",
- "module": "WP",
- "result": {
- "data": {
- "is_first_time": 1
}
}
}This function list all WordPress websites for one cPanel account.
Warning:
We deprecated this function. Use UAPI's WP::list_websites function.
| limit | integer Default: 0 Example: limit=3 The maximum number of websites to return. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ list_domains
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "domains": [
- {
- "admin_email": "admin@my-domain.test",
- "blogdescription": "new month",
- "blogname": "June 1st",
- "current_theme": "Blockpress",
- "documentroot": "/home/junefirst/public_html/my-domain.test",
- "domain": "my-domain.test",
- "is_main_domain": 1,
- "is_staging": 0,
- "issues": [
- "string"
], - "labels": [
- {
- "name": "mylabel",
- "type": "user"
}
], - "preview_info": {
- "available": true,
- "enabled": false,
- "preview_domain": "idealistic-aqua-seal.127-0-0-1.wpsquared.site",
}, - "redirects": {
- "count": 1,
- "list": [
- {
- "displaydomain": "something.my-domain.test",
- "displaysourceurl": "/",
- "docroot": "/home/wpaccount/public_html/something.mysecond",
- "domain": "something.my-domain.test",
- "kind": "rewrite",
- "matchwww": 1,
- "matchwww_text": "checked",
- "opts": "L",
- "source": "/",
- "sourceurl": "/",
- "statuscode": 301,
- "type": "permanent",
- "urldomain": "something.my-domain.test",
- "wildcard": 0,
- "wildcard_text": ""
}
]
}, - "staged_domain": "parent-domain.tld",
- "staged_source_id": 12,
- "status": "",
- "template": "blockpress",
- "updates": {
- "amountOfPluginsWithUpdates": 0,
- "amountOfThemesWithUpdates": 0,
- "applicable": true,
- "autoUpdatesAvailable": true,
- "availableVersion": null,
- "currentVersion": "6.5.3",
- "php": {
- "applicable": true,
- "available": true,
- "taskStatus": "notExist"
}, - "smart": {
- "applicable": true,
- "available": true,
- "initiatedByAutoUpdater": false,
- "promoAvailable": false,
- "status": false,
- "taskStatus": "notExist"
}
}, - "wptk_id": 118
}
], - "info": {
- "disk_quota_reached": 0,
- "first_time_experience": 0,
- "max_instances_authorized": -1,
- "results": 2,
- "total": 2
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Rename a tag from an element.
| current_name required | string Example: current_name=my_tag The name of the tag to rename. |
| new_name required | string Example: new_name=xfoo The new name for the tag. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ rename_tag \ current_name='my_tag' \ new_name='xfoo'
{- "apiversion": 3,
- "func": "rename_tag",
- "module": "WP",
- "result": {
- "data": "Tag 'mytag' was renamed to 'xfoo'",
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates the scheduled backup settings for a WordPress® instance.
| id required | integer Example: id=120 The instance ID for which to update backup settings. |
| max required | integer Example: max=4 The maximum number of backups to retain. |
| weekday | Array of integers Example: weekday=1&weekday=3 Days of the week to schedule backups. Use multiple values for multiple days. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_scheduled_backups \ id='120' \ max='4'
{- "apiversion": 3,
- "func": "set_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "schedule": {
- "is_enabled": true,
- "max": 4,
- "weekdays": [
- 1,
- 3
]
}
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function monitors one API Task.
| id required | integer Example: id=42 The ID of the instance for the task. |
| task_id required | string Example: task_id=00000000/654a646ec5797c The unique identifier of the task to monitor. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ monitor_api_task \ id='42' \ task_id='00000000/654a646ec5797c'
{- "apiversion": 3,
- "func": "monitor_api_task",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "monitor",
- "args": {
- "instance_id": 274,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1699374190.80791_monitortaskmonitor.1699374190.log",
- "task_id": 5947
}, - "exclusive": "0",
- "sse_url": "/sse/UserTasks/00000000_654a646ec5797c/wp_1699374190.80791_monitortaskmonitor.1699374190.log",
- "subsystem": "WordPress::MonitorTask"
}, - "task_id": "00000000/654a646ec5797c"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function aborts the last Smart PHP Update for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to abort the last Smart PHP Update. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_discard \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_discard: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_discard",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}This function confirms and promotes the last Smart PHP Update for a WordPress® instance by its ID. instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to confirm the last Smart PHP Update. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_confirm \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_confirm: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_confirm",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}Update website title and tagline using one user task (async).
| id required | integer Example: id=42 The website instance id to update. |
| is_first_time | integer Possible Values: 1 0 Internally used to indicate the onboarding process was completed. |
| tagline | string Example: tagline=My New TagLine The new website tagline to use. |
| theme | string Example: theme=twentytwenty The theme slug to use. |
| title | string Example: title=My New Title The new website title to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_title_and_tagline_sse \ id='42'
{- "apiversion": 3,
- "func": "set_title_and_tagline_sse",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "set_title_and_tagline_sse",
- "args": {
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_set_title_and_tagline_sse.60.log",
- "tagline": "My New TagLine",
- "title": "My New Title"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_set_title_and_tagline_sse.60.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}This function retrieves the status of a Smart PHP Update for a WordPress® instance by its ID.
Note:
If the Smart Update failed, you would not be able to retrieve the status.
| id required | integer Example: id=42 The ID of the WordPress® instance for which to retrieve the Smart PHP Update status. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_retrieve \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_retrieve: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_retrieve",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}This function disables the smart update feature for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to disable smart update. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_disable \ id='42'
{- "apiversion": 3,
- "func": "smart_update_disable",
- "module": "WP",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "warnings": null
}
}This function initiates a Smart PHP Update for a WordPress® instance and shows the PHP version to which to update.
| id required | integer Example: id=42 The ID of the WordPress instance to update. |
| php required | string Example: php=ea-php81 The PHP version to which to update (for example, ea-php81). |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_start \ id='42' \ php='ea-php81'
{- "apiversion": 3,
- "func": "smart_php_update_start",
- "module": "WP",
- "result": {
- "data": {
- "id": 1234,
- "php": "ea-php81",
- "task": {
- "action": "monitor",
- "args": {
- "instance_id": 274,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1699296365.81464_smart_php_update_start2023110601.smartupdatetest.domaintask5920.log",
- "task_id": 5920
}, - "exclusive": "0",
- "sse_url": "/sse/UserTasks/00000000_6549346dc7319f/wp_1699296365.81464_smart_php_update_start2023110601.smartupdatetest.domain.testtask5920.log",
- "subsystem": "WordPress::MonitorTask"
}, - "task_id": "00000000/6549346dc7319f",
- "test_domain": "20240102-01.smartupdate-test.your-domain.tld"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Retrieves the smart update status for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance to check the smart update status. for. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_status \ id='42'
{- "apiversion": 3,
- "func": "smart_update_status",
- "module": "WP",
- "result": {
- "data": {
- "smartUpdate": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables the smart update feature for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to enable smart update. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_enable \ id='42'
{- "apiversion": 3,
- "func": "smart_update_enable",
- "module": "WP",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Update website title and tagline.
| id required | integer Example: id=42 The website instance id to update. |
| is_first_time | integer Possible Values: 1 0 Internally used to indicate the onboarding process was completed. |
| tagline | string Example: tagline=My New TagLine The new website tagline to use. |
| theme | string Example: theme=twentytwenty The theme slug you want to use. |
| title | string Example: title=My New Title The new website title to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_title_and_tagline \ id='42'
{- "apiversion": 3,
- "func": "set_title_and_tagline",
- "module": "WP",
- "result": {
- "data": "Blog Title Updated Successfully."
}
}Rename an existing website.
| domain required | string Example: domain=new-domain.com The new domain name for the website. |
| id required | integer Example: id=42 The instance id of the website to rename. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ rename_website \ id='42' \ domain='new-domain.com'
{- "apiversion": 3,
- "func": "rename_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "rename_website",
- "args": {
- "domain": "new-domain.com",
- "instance_id": 42,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_rename_website.42.new-domain.com.log"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_rename_website.42.new-domain.com.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}Queue a walk-through website installation for the given domain.
This queues a background task (UserTask) that you can monitor with the sse_url value in the response.
Warning:
When you call this function for the first time on the account's main domain, the system overwrites the existing auto-installed WordPress instance.
| domain | string Example: domain=mydomain.tld The name of the domain on which to install the walk-through website. If not provided, the system generates a temporary domain. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_walkthrough_website \ domain='mydomain.tld'
{- "apiversion": 3,
- "func": "create_walkthrough_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "create_walkthrough_website",
- "args": {
- "domain": "mydomain.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function duplicates the WP::import_website function and includes admin-level session creation. Integrators can use this function to receive a ready-to-use login URL without having to make a separate session-creation request.
Note:
url returned value is a single-use session URL. It expires at the Unix
timestamp provided in the expires return's value.url includes an encoded goto_uri destination parameter that points to
the WP Squared import progress view for the given domain.sse_url return value with the
WP::get_import_session function once the task is queued.| domain | string Example: domain=example.com The domain to use for the imported WordPress website. If you do not provide a domain, the system will automatically generate a temporary domain. |
| ignore_invalid_cert | integer Default: 0 Possible Values: 0 1 Whether to ignore SSL certificate errors when importing the source WordPress site.
Note: If you ignore SSL errors, the function will import the WordPress site even if the source site has an invalid, self-signed, expired, or mismatched SSL certificate. |
| is_first_time | integer Default: 0 Possible Values: 0 1 Whether this is the user's first-time setup flow. When the value is
set to |
| locale | string Example: locale=en The locale tag for the created cPanel session (for example, |
| overwrite | integer Default: 0 Possible Values: 0 1 Whether to overwrite an existing WordPress site on the target domain.
When the value is set to |
| password_type | string Default: "admin" Possible Values: "admin" "application" Example: password_type=admin The type of password provided in
|
| source_password required | string Example: source_password=12345luggage The WordPress admin or application password for the source WordPress website. |
| source_url required | string Example: source_url=https://oldsite.example.com The URL of the source WordPress website to import. |
| source_user required | string Example: source_user=import_user The WordPress admin username for the source website. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_import_session \ domain='example.com' \ source_url='https://oldsite.example.com' \ source_user='import_user' \ source_password='12345luggage'
{- "apiversion": 3,
- "func": "create_import_session",
- "module": "WP",
- "result": {
- "data": {
- "domain": "example.com",
- "expires": 1744329600,
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}Check the installation status of recommended plugins.
| id required | integer Example: id=42 The instance id to check recommended plugins. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ has_recommended_plugins \ id='42'
{- "apiversion": 3,
- "func": "has_recommended_plugins",
- "module": "WP",
- "result": {
- "data": {
- "is_installed": 1,
- "installed": [
- "clsop",
- "redis-cache"
], - "not_installed": [
- "extendify"
]
}
}
}Import an existing WordPress website into WP Squared.
Note:
This document uses the term source to refer to the installation from which you wish to import the WordPress website.
| domain | string Example: domain=example.com The domain to use for the imported WordPress website. If you do not provide a domain, the system will automatically generate a temporary domain. |
| ignore_invalid_cert | integer Default: 0 Possible Values: 0 1 Whether to ignore SSL certificate errors when importing the source WordPress site.
Note: If you ignore SSL errors, the function will import the WordPress site even if the source site has an invalid, self-signed, expired, or mismatched SSL certificate. |
| is_first_time | integer Possible Values: 0 1 Whether this is the first time the user sets up a WordPress site. When the value is set to |
| overwrite | integer Possible Values: 0 1 Whether to overwrite an existing WordPress site on the target domain. When the value is set to |
| password_type | string Default: "admin" Possible Values: "admin" "application" Example: password_type=admin The type of password provided in
|
| source_password required | string Example: source_password=12345luggage The password for the source WordPress website to import. |
| source_url required | string Example: source_url=https://oldurl.example.com The source URL of the WordPress website to import. |
| source_user required | string Example: source_user=import_user The source username for the WordPress website to import. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ import_website \ domain='mydomain.tld' \ source_user='import_user' \ source_password='123456luggage' \ source_url='https://source.example.test'
{- "apiversion": 3,
- "func": "import_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "import_website",
- "args": {
- "domain": "addon6.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves the DNS records for a WP Toolkit instance.
| instance_id required | integer Example: instance_id=123 The WP Toolkit instance ID. Note You can list a WP Squared account's WP Toolkit instance IDs with UAPI's |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPDNS \ fetch_zone_for_instance \ id='123'
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "hide": true,
- "instance_id": 42,
- "records": [
- {
- "data_b64": [
- "MTAuMi42Ni44MA=="
], - "dname_b64": "d3Aud2l0aC1hbmRyZXcuY29t",
- "line_index": 42,
- "record_type": [
- "A",
- "TXT",
- "MX",
- "CNAME"
], - "text_b64": "JFRUTCAxNDQwMA==",
- "ttl": 14400,
- "type": [
- "comment",
- "control",
- "record"
]
}
], - "requested_zone": [
- "example.com",
- "sub.example.com"
], - "zone": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Retrieve the cached import task data for a domain previously queued via
WP::create_import_session.
Use this function to check the status of an in-progress import, or to
retrieve the task's sse_url return value for monitoring via Server-Sent Events.
Note:
This function returns cached task data written at queue time. The data
reflects the task as it was when the create_import_session function ran, not its
current execution state. To monitor live progress, use the sse_url return
field in the returned task object.
| domain required | string Example: domain=example.com The domain to return the cached import session. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_import_session \ domain='example.com'
{- "apiversion": 3,
- "func": "get_import_session",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "import_website",
- "args": {
- "domain": "example.com",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1744300000.12345_add_domain.example.com.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1744300000.12345_add_domain.example.com.log",
- "subsystem": "WordPress"
}
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function fetches cPanel generated domains for a given domain. These are typically subdomains like webmail, mail, ftp, etc. that are automatically created by cPanel.
| domain required | string Example: domain=example.com The domain name to fetch generated domains for. Note This should be a valid domain name that exists in the account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPDNS \ fetch_generated_domains \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_generated_domains",
- "module": "WPDNS",
- "result": {
- "data": [
- {
- "domain": "webmail.example.com"
}
], - "errors": [
- "string"
], - "messages": [
- "string"
], - "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": [
- "string"
]
}
}Check the quota status of the user's account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ has_reached_quota
{- "apiversion": 3,
- "func": "has_reached_quota",
- "module": "WP",
- "result": {
- "data": {
- "has_reached_quota": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function list all WordPress websites for one cPanel account.
| id | integer Example: id=42 The WP Toolkit instance ID. When provided, returns only the website matching this ID. Use this parameter to fetch data for a single website instead of all websites. |
| limit | integer Default: 0 Example: limit=3 The maximum number of websites to return. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ list_websites
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "domains": [
- {
- "admin_email": "admin@my-domain.test",
- "blogdescription": "new month",
- "blogname": "June 1st",
- "current_theme": "Blockpress",
- "documentroot": "/home/junefirst/public_html/my-domain.test",
- "domain": "my-domain.test",
- "is_main_domain": 1,
- "is_staging": 0,
- "issues": [
- "string"
], - "labels": [
- {
- "name": "mylabel",
- "type": "user"
}
], - "preview_info": {
- "available": true,
- "enabled": false,
- "preview_domain": "idealistic-aqua-seal.127-0-0-1.wpsquared.site",
}, - "redirects": {
- "count": 1,
- "list": [
- {
- "displaydomain": "something.my-domain.test",
- "displaysourceurl": "/",
- "docroot": "/home/wpaccount/public_html/something.mysecond",
- "domain": "something.my-domain.test",
- "kind": "rewrite",
- "matchwww": 1,
- "matchwww_text": "checked",
- "opts": "L",
- "source": "/",
- "sourceurl": "/",
- "statuscode": 301,
- "type": "permanent",
- "urldomain": "something.my-domain.test",
- "wildcard": 0,
- "wildcard_text": ""
}
]
}, - "staged_domain": "parent-domain.tld",
- "staged_source_id": 12,
- "status": "",
- "template": "blockpress",
- "updates": {
- "amountOfPluginsWithUpdates": 0,
- "amountOfThemesWithUpdates": 0,
- "applicable": true,
- "autoUpdatesAvailable": true,
- "availableVersion": null,
- "currentVersion": "6.5.3",
- "php": {
- "applicable": true,
- "available": true,
- "taskStatus": "notExist"
}, - "smart": {
- "applicable": true,
- "available": true,
- "initiatedByAutoUpdater": false,
- "promoAvailable": false,
- "status": false,
- "taskStatus": "notExist"
}
}, - "wptk_id": 118
}
], - "info": {
- "disk_quota_reached": 0,
- "first_time_experience": 0,
- "max_instances_authorized": -1,
- "results": 2,
- "total": 2
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function checks whether NGINX caching is enabled for the WP Squared account.
Note:
ea-nginx package is installed, enabled, and not in standalone mode.enabled: 0 without an error.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ is_nginx_caching_enabled
{- "apiversion": 3,
- "func": "is_nginx_caching_enabled",
- "module": "WP",
- "result": {
- "data": {
- "enabled": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the bootstrap configuration properties for the
WP Squared Angular application. The Angular app fetches this once at
runtime during APP_INITIALIZER, replacing the legacy
window.PAGE injection that the Template Toolkit wrapper provided
before WPX-9614 decoupled wp-squared from Template Toolkit.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_page_config
{- "apiversion": 3,
- "func": "get_page_config",
- "module": "WP",
- "result": {
- "data": {
- "hostname": "server.example.com",
- "username": "cpuser",
- "locale": "en-US",
- "locale_direction": "ltr",
- "customizations": {
- "favicon": "string",
- "header_logo": "string",
- "main_menu_logo": "string",
- "logo_description_html": "string",
- "documentation_url": "string",
- "help_url": "string",
- "email_url": "string",
- "material_theme": "string"
}, - "custom_mat_theme": "teal",
- "custom_theme_mode": "light",
- "custom_theme_variables_file": "wp-teal-light-variables-custom.css",
- "contact_info": {
- "name": "string",
- "url": "string"
}, - "mixpanel_config": {
- "cp_analytics_data": {
- "UUID": "string",
- "company_id": "string",
- "server_main_ip": "string",
- "is_nat": null,
- "server_main_ip_is_private": null
}, - "is_sandbox": 0,
- "serverOptIn": 0,
- "accountOptIn": 0
}, - "debug_mode": 0,
- "nginx_installed": 0,
- "is_2fa_sec_policy_enabled": 0,
- "apps": [
- { }
], - "autossl_provider": "cPanel"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Remove a domain using one instance id or a domain.
| domain | string Example: domain=your-domain.com The domain name of the instance to delete. Provide either this or |
| id | integer Example: id=42 The instance id to delete. Provide either this or |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ remove_website \ id=42
{- "apiversion": 3,
- "func": "remove_website",
- "module": "WP",
- "result": {
- "data": {
- "reason": "The subdomain “sub.my-domain.net” has been removed."
}
}
}Add a domain and WP Toolkit website for it.
| domain | string Example: domain=mydomain.tld The name of the domain to add. Generate a temporary domain when not provided. |
| tagline | string Default: "" Example: tagline=Your number one source for WebPros merch. The tagline of the WordPress website. |
| theme required | string Example: theme=twentytwentyeight The theme to enable for the WordPress website. |
| title required | string Example: title=WebPros Gift Shop The title of the WordPress website. |
| use_existing_wp_installation | integer Default: 0 Possible Values: 0 1 Example: use_existing_wp_installation=0 Use an existing WordPress installation found in the domain's document root. NOTE:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ create_website \ domain='mydomain.tld' \ title='WebPros Gift Shop' \ theme='twentytwentyeight'
{- "apiversion": 3,
- "func": "create_website",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "create_website",
- "args": {
- "domain": "addon6.tld",
- "log_file": "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63d7f020927f8f"
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function marks a notification as acknowledged for the user.
| id required | integer Example: id=23 The notification ID to mark as acknowledged. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ acknowledge_notification \ id='23'
{- "apiversion": 3,
- "func": "acknowledge_notification",
- "module": "WP",
- "result": {
- "data": {
- "acknowledged": 1
}
}
}This function deletes one or more backups for a specified WordPress® instance.
| fileName required | Array of strings Example: fileName=yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz The name of the backup file to delete. |
| id required | integer Example: id=12 The ID of the backup instance to delete. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_delete \ id='12' \ fileName='yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz'
{- "apiversion": 3,
- "func": "backup_delete",
- "module": "WP",
- "result": {
- "data": "Successfully deleted backup file(s): yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz",
- "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function initiates a background backup for a specified WordPress® instance. SSE is used to track the status. SSE is used for tracking the status.
| instance_id required | integer Example: instance_id=50 The ID of the WordPress instance for which the backup is to be performed. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_perform \ instance_id='50'
{- "apiversion": 3,
- "func": "backup_perform",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "backup_perform",
- "args": {
- "instance_id": 73,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675966022.87987_backup_perform.73.1675966022.log"
}, - "sse_url": "/sse/UserTasks/00000000_63e53646d705c0/wp_1675966022.87987_backup_perform.73.1675966022.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63e53646d705c0"
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function retrieves a list of all backups for a specific WordPress® instance. instance.
| instance_id required | integer Example: instance_id=42 The ID of the WordPress instance. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_list \ instance_id='42'
{- "apiversion": 3,
- "func": "backup_list",
- "module": "WP",
- "result": {
- "data": {
- "backups": [
- {
- "absoluteFilePath": "/home/user/wordpress-backups/yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz",
- "createDate": "2023-02-08T21:14:13.000Z",
- "fileName": "yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz",
- "fileSize": 31100915
}
], - "total": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function restores a backup for an instance.
Note:
This function uses SSE. You can track the task's status via its sse_url path.
| fileName required | string Example: fileName=yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz The name of the backup file to restore. |
| id required | integer Example: id=73 The instance ID. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ backup_restore \ id='73' \ fileName='yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz'
{- "apiversion": 3,
- "func": "backup_restore",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "backup_restore",
- "args": {
- "fileName": "yourdomain.tld__2023-02-08T21_36_13+0000.tar.gz",
- "instance_id": 73,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log"
}, - "sse_url": "/sse/UserTasks/00000000_63e5370cd4a39a/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63e5370cd4a39a"
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}Clone one instance to a new website.
| domain | string Example: domain=clone-it-there.com The domain to use for the new clone. Use a temporary domain when not provided. |
| id required | integer Example: id=42 The source instance id to clone. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ clone_instance \ id='42' \ domain='clone-it-there.com'
{- "apiversion": 3,
- "func": "clone_instance",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "clone_instance",
- "args": {
- "domain": "clone-it.tld",
- "instance_id": 60,
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_clone_instance.60.clone-it.tld.log"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_clone_instance.60.clone-it.tld.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}This function returns whether a WPTK website can use a domain.
| domain required | string Example: domain=cptest.tld The domain being requested. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ can_use_domain \ domain='cptest.tld'
{- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables scheduled backups for a WordPress® instance by its ID.
| id required | integer Example: id=123 The ID of the WordPress instance for which to disable backups. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ disable_scheduled_backups \ id='123'
{- "apiversion": 3,
- "func": "disable_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "is_enabled": false
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function gets WP Squared notifications for an account.
| category | string Example: category=My Notification Category The category of notifications to get. |
| instance_id | integer Example: instance_id=23 The WP Toolkit instance ID for which to get the notifications. |
| type | string Possible Values: "info" "error" "warn" The specific type of notifications to get. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_all_notifications
{- "apiversion": 3,
- "func": "get_all_notifications",
- "module": "WP",
- "result": {
- "data": {
- "category": "My Category",
- "created_at": 1730904792,
- "custom_action": "do-that",
- "expired_at": 0,
- "id": 1,
- "instance_id": 1,
- "text": "This is a notification.",
- "title": "My Title",
- "type": "info"
}
}
}This function returns the maximum number of websites authorized for one account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_max_instances
{- "result": {
- "data": {
- "max_instances_authorized": 2
}
}
}This function enables scheduled backups for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to enable backups. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ enable_scheduled_backups \ id='42'
{- "apiversion": 3,
- "func": "enable_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "is_enabled": true
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the main id for an account (i.e., the id for the WPTK instance setup on the primary domain).
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_main_account_id
{- "apiversion": 3,
- "func": "get_main_account_id",
- "module": "WP",
- "result": {
- "data": {
- "main_id": 10
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the configuration of scheduled backups.
| id required | integer Example: id=120 The instance ID for which to the retrieve the backup settings. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_scheduled_backups \ id='120'
{- "apiversion": 3,
- "func": "get_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "schedule": {
- "is_enabled": true,
- "max": 5,
- "weekdays": [
- 0,
- 1
]
}
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}Similar to get_website_performance, this function returns performance score with full metrics.
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page.
If you call this API with force=1, it will wait for the cache to update if it is out of date before returning the information.
| force | integer Default: 0 Possible Values: 1 0 Example: force=1 Force refresh the statistics if needed. |
| id required | integer Example: id=42 The website instance id used to retrieve performance. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_site_performance_full \ id='42'
{- "apiversion": 3,
- "func": "get_site_performance_full",
- "module": "WP",
- "result": {
- "data": {
- "DESKTOP_PAGESPEED": { },
- "MOBILE_PAGESPEED": { },
- "_cache_cached_at": 1679436748,
- "_cache_expires_at": 1710972748
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Returns website performance average score.
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page.
This is a lighter version of get_site_performance_full which returns the whole data.
If you call this API with force=1, it will wait for the cache to update if it is out of date before returning the information.
| force | integer Default: 0 Possible Values: 1 0 Example: force=1 Force refresh the statistics if needed. |
| id required | integer Example: id=42 The website instance id used to retrieve performance. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_site_performance \ id='42'
{- "apiversion": 3,
- "func": "get_site_performance",
- "module": "WP",
- "result": {
- "data": {
- "_cache_cached_at": 1679436748,
- "_cache_expires_at": 1710972748,
- "desktop": {
- "performance": {
- "score": 0.93
}
}, - "mobile": {
- "performance": {
- "score": 0.73
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the daily stats.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_stats_daily
{- "result": {
- "data": {
- "domain": "cyclone.tld",
- "instance_id": 42,
- "stats": {
- "Wed Jan 31 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 81110,
- "hits": 6,
- "pages": 6,
- "visits": 5
}, - "Thu Feb 01 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 888296,
- "hits": 43,
- "pages": 14,
- "visits": 7
}
}
}
}
}Retrieve the sumup statistics from AwStats for one WP Toolkit instance. The metrics also include the trends over the last days.
| id required | integer Example: id=42 The website instance id used to retrieve statistics. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ get_stats_highlights \ id='42'
{- "apiversion": 3,
- "func": "get_stats_daily",
- "module": "WP",
- "result": {
- "data": {
- "domain": "my-domain.tld",
- "instance_id": 210,
- "stats": {
- "bandwidth": {
- "delta": 37.12,
- "total": 136840
}, - "hits": {
- "delta": 68.29,
- "total": 28
}, - "pages": {
- "delta": 70,
- "total": 28
}, - "visits": {
- "delta": 75.86,
- "total": 22
}
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Check whether this is the first time experience workflow.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ is_first_time_experience
{- "apiversion": 3,
- "func": "is_first_time_experience",
- "module": "WP",
- "result": {
- "data": {
- "is_first_time": 1
}
}
}This function list all WordPress websites for one cPanel account.
Warning:
We deprecated this function. Use UAPI's WP::list_websites function.
| limit | integer Default: 0 Example: limit=3 The maximum number of websites to return. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ list_domains
{- "apiversion": 3,
- "func": "start",
- "module": "WP",
- "result": {
- "data": {
- "domains": [
- {
- "admin_email": "admin@my-domain.test",
- "blogdescription": "new month",
- "blogname": "June 1st",
- "current_theme": "Blockpress",
- "documentroot": "/home/junefirst/public_html/my-domain.test",
- "domain": "my-domain.test",
- "is_main_domain": 1,
- "is_staging": 0,
- "issues": [
- "string"
], - "labels": [
- {
- "name": "mylabel",
- "type": "user"
}
], - "preview_info": {
- "available": true,
- "enabled": false,
- "preview_domain": "idealistic-aqua-seal.127-0-0-1.wpsquared.site",
}, - "redirects": {
- "count": 1,
- "list": [
- {
- "displaydomain": "something.my-domain.test",
- "displaysourceurl": "/",
- "docroot": "/home/wpaccount/public_html/something.mysecond",
- "domain": "something.my-domain.test",
- "kind": "rewrite",
- "matchwww": 1,
- "matchwww_text": "checked",
- "opts": "L",
- "source": "/",
- "sourceurl": "/",
- "statuscode": 301,
- "type": "permanent",
- "urldomain": "something.my-domain.test",
- "wildcard": 0,
- "wildcard_text": ""
}
]
}, - "staged_domain": "parent-domain.tld",
- "staged_source_id": 12,
- "status": "",
- "template": "blockpress",
- "updates": {
- "amountOfPluginsWithUpdates": 0,
- "amountOfThemesWithUpdates": 0,
- "applicable": true,
- "autoUpdatesAvailable": true,
- "availableVersion": null,
- "currentVersion": "6.5.3",
- "php": {
- "applicable": true,
- "available": true,
- "taskStatus": "notExist"
}, - "smart": {
- "applicable": true,
- "available": true,
- "initiatedByAutoUpdater": false,
- "promoAvailable": false,
- "status": false,
- "taskStatus": "notExist"
}
}, - "wptk_id": 118
}
], - "info": {
- "disk_quota_reached": 0,
- "first_time_experience": 0,
- "max_instances_authorized": -1,
- "results": 2,
- "total": 2
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Rename a tag from an element.
| current_name required | string Example: current_name=my_tag The name of the tag to rename. |
| new_name required | string Example: new_name=xfoo The new name for the tag. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ rename_tag \ current_name='my_tag' \ new_name='xfoo'
{- "apiversion": 3,
- "func": "rename_tag",
- "module": "WP",
- "result": {
- "data": "Tag 'mytag' was renamed to 'xfoo'",
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates the scheduled backup settings for a WordPress® instance.
| id required | integer Example: id=120 The instance ID for which to update backup settings. |
| max required | integer Example: max=4 The maximum number of backups to retain. |
| weekday | Array of integers Example: weekday=1&weekday=3 Days of the week to schedule backups. Use multiple values for multiple days. |
| apiversion | integer The API version. |
| func | string The function executed. |
| module | string The module handling the request. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_scheduled_backups \ id='120' \ max='4'
{- "apiversion": 3,
- "func": "set_scheduled_backups",
- "module": "WP",
- "result": {
- "data": {
- "schedule": {
- "is_enabled": true,
- "max": 4,
- "weekdays": [
- 1,
- 3
]
}
}, - "errors": "string",
- "messages": "string",
- "metadata": { },
- "status": 1,
- "warnings": "string"
}
}This function monitors one API Task.
| id required | integer Example: id=42 The ID of the instance for the task. |
| task_id required | string Example: task_id=00000000/654a646ec5797c The unique identifier of the task to monitor. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ monitor_api_task \ id='42' \ task_id='00000000/654a646ec5797c'
{- "apiversion": 3,
- "func": "monitor_api_task",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "monitor",
- "args": {
- "instance_id": 274,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1699374190.80791_monitortaskmonitor.1699374190.log",
- "task_id": 5947
}, - "exclusive": "0",
- "sse_url": "/sse/UserTasks/00000000_654a646ec5797c/wp_1699374190.80791_monitortaskmonitor.1699374190.log",
- "subsystem": "WordPress::MonitorTask"
}, - "task_id": "00000000/654a646ec5797c"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function aborts the last Smart PHP Update for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to abort the last Smart PHP Update. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_discard \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_discard: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_discard",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}This function confirms and promotes the last Smart PHP Update for a WordPress® instance by its ID. instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to confirm the last Smart PHP Update. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_confirm \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_confirm: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_confirm",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}Update website title and tagline using one user task (async).
| id required | integer Example: id=42 The website instance id to update. |
| is_first_time | integer Possible Values: 1 0 Internally used to indicate the onboarding process was completed. |
| tagline | string Example: tagline=My New TagLine The new website tagline to use. |
| theme | string Example: theme=twentytwenty The theme slug to use. |
| title | string Example: title=My New Title The new website title to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_title_and_tagline_sse \ id='42'
{- "apiversion": 3,
- "func": "set_title_and_tagline_sse",
- "module": "WP",
- "result": {
- "data": {
- "task": {
- "action": "set_title_and_tagline_sse",
- "args": {
- "log_file": "/home/xpress/.cpanel/logs/wp_1675446198.87724_set_title_and_tagline_sse.60.log",
- "tagline": "My New TagLine",
- "title": "My New Title"
}, - "sse_url": "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_set_title_and_tagline_sse.60.log",
- "subsystem": "WordPress"
}, - "task_id": "00000000/63dd47b6d65b7f"
}
}
}This function retrieves the status of a Smart PHP Update for a WordPress® instance by its ID.
Note:
If the Smart Update failed, you would not be able to retrieve the status.
| id required | integer Example: id=42 The ID of the WordPress® instance for which to retrieve the Smart PHP Update status. |
| apiversion | integer |
| errors | Array of strings |
| func | string |
| messages | string or null |
object | |
| module | string |
object | |
| status | integer |
| warnings | string or null |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_retrieve \ id='42'
{- "apiversion": 3,
- "errors": [
- "Error from wpt::smart_php_update_retrieve: 404 - Failed to find result of WordPress installation PHP smart update"
], - "func": "smart_php_update_retrieve",
- "messages": null,
- "metadata": { },
- "module": "WP",
- "result": {
- "data": { }
}, - "status": 0,
- "warnings": null
}This function disables the smart update feature for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to disable smart update. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_disable \ id='42'
{- "apiversion": 3,
- "func": "smart_update_disable",
- "module": "WP",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "warnings": null
}
}This function initiates a Smart PHP Update for a WordPress® instance and shows the PHP version to which to update.
| id required | integer Example: id=42 The ID of the WordPress instance to update. |
| php required | string Example: php=ea-php81 The PHP version to which to update (for example, ea-php81). |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_php_update_start \ id='42' \ php='ea-php81'
{- "apiversion": 3,
- "func": "smart_php_update_start",
- "module": "WP",
- "result": {
- "data": {
- "id": 1234,
- "php": "ea-php81",
- "task": {
- "action": "monitor",
- "args": {
- "instance_id": 274,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1699296365.81464_smart_php_update_start2023110601.smartupdatetest.domaintask5920.log",
- "task_id": 5920
}, - "exclusive": "0",
- "sse_url": "/sse/UserTasks/00000000_6549346dc7319f/wp_1699296365.81464_smart_php_update_start2023110601.smartupdatetest.domain.testtask5920.log",
- "subsystem": "WordPress::MonitorTask"
}, - "task_id": "00000000/6549346dc7319f",
- "test_domain": "20240102-01.smartupdate-test.your-domain.tld"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Retrieves the smart update status for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance to check the smart update status. for. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_status \ id='42'
{- "apiversion": 3,
- "func": "smart_update_status",
- "module": "WP",
- "result": {
- "data": {
- "smartUpdate": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables the smart update feature for a WordPress® instance by its ID.
| id required | integer Example: id=42 The ID of the WordPress instance for which to enable smart update. |
| apiversion | integer |
| func | string |
| module | string |
object |
uapi --output=jsonpretty \ --user=username \ WP \ smart_update_enable \ id='42'
{- "apiversion": 3,
- "func": "smart_update_enable",
- "module": "WP",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}Update website title and tagline.
| id required | integer Example: id=42 The website instance id to update. |
| is_first_time | integer Possible Values: 1 0 Internally used to indicate the onboarding process was completed. |
| tagline | string Example: tagline=My New TagLine The new website tagline to use. |
| theme | string Example: theme=twentytwenty The theme slug you want to use. |
| title | string Example: title=My New Title The new website title to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WP \ set_title_and_tagline \ id='42'
{- "apiversion": 3,
- "func": "set_title_and_tagline",
- "module": "WP",
- "result": {
- "data": "Blog Title Updated Successfully."
}
}This function synchronizes a staging instance of a WPTK website with its original production website.
| instance_id required | integer Example: instance_id=123 The ID of the WPTK staging instance to synchronize with production. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPStaging \ staging_instance_synchronize \ instance_id=123
{- "apiversion": 3,
- "func": "start",
- "module": "WPStaging",
- "result": {
- "data": {
- "task": {
- "action": "staging_instance_synchronize",
- "args": {
- "instance_id": 123,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1726173793.53065_staging_instance_synchronize.123.log"
}, - "exclusive": 1,
- "sse_url": "/sse/UserTasks/00000000_66e3526184dee1/wp_1726173793.53065_staging_instance_synchronize.123.log",
- "subsystem": "WordPress::Clone"
}, - "task_id": "00000000/66e3526184dee1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function publishes a staging instance of a WPTK website to production.
Note: Staging instances are not visible to WPTK website visitors, while production instances are.
| create_restore_point | integer Possible Values: 0 1 Example: create_restore_point=1 Whether to create a restore point for the production instance. You can use this restore point to roll back changes after the staging instance publishes.
The restore point is located in the user home directory at
|
| delete_staging_instance | integer Possible Values: 0 1 Example: delete_staging_instance=1 Whether to delete the staging instance after it publishes to production. If you do not delete the staging instance, the system will keep it when the production instance publishes.
|
| instance_id required | integer Example: instance_id=123 The ID of the WPTK staging instance to publish to production. |
| publish_database | integer Possible Values: 0 1 Example: publish_database=1 Whether to publish the staging instance's database to production.
Note:
You must set either this parameter or the |
| publish_database_type | string Possible Values: "default" "all" "new" Example: publish_database_type=default Which database tables from the staging instance publish to production.
Note:
You must set this parameter if you set the |
| publish_files | integer Possible Values: 0 1 Example: publish_files=1 Whether to publish files from the staging instance to production.
Note:
You must set either this parameter or the |
| remove_missing_files | integer Possible Values: 0 1 Example: remove_missing_files=1 Whether the production instance will remove files that do not exist on the staging instance.
Note:
This parameter only affects the publishing process if you set the |
| replace_modified_files | integer Possible Values: 0 1 Example: replace_modified_files=1 Whether files on the staging instance will overwrite production files.
Note:
This parameter only affects the publishing process if you set the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPStaging \ staging_instance_publish \ instance_id=123 \ publish_database=1 \ publish_database_type=default \ publish_files=1 \ remove_missing_files=1 \ replace_modified_files=1 \ create_restore_point=1
{- "apiversion": 3,
- "func": "start",
- "module": "WPStaging",
- "result": {
- "data": {
- "task": {
- "action": "staging_instance_publish",
- "args": {
- "create_restore_point": 1,
- "delete_staging_instance": 1,
- "instance_id": 123,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1726173793.53065_staging_instance_publish.123.log",
- "publish_database": 1,
- "publish_database_type": "default",
- "publish_files": 1,
- "remove_missing_files": 1,
- "replace_modified_files": 1
}, - "exclusive": 1,
- "sse_url": "/sse/UserTasks/00000000_66e3526184dee1/wp_1726173793.53065_staging_instance_publish.123.log",
- "subsystem": "WordPress::Clone"
}, - "task_id": "00000000/66e3526184dee1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a staging website for a WPTK instance.
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| password | string <password> Example: password=123456luggage The password to use to password protect the staging website. Only valid if |
| password_protected | integer Possible Values: 0 1 Example: password_protected=1 Whether to enable password protection on the staging website.
|
| username | string Example: username=example The username to use to password protect the staging website. Only valid if |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPStaging \ staging_instance_create \ instance_id='123'
{- "apiversion": 3,
- "func": "start",
- "module": "WPStaging",
- "result": {
- "data": {
- "task": {
- "action": "staging_instance_create",
- "args": {
- "instance_id": 123,
- "log_file": "/home/cpuser/.cpanel/logs/wp_1726173793.53065_staging_instance_create.123.log"
}, - "exclusive": 1,
- "sse_url": "/sse/UserTasks/00000000_66e3526184dee1/wp_1726173793.53065_staging_instance_create.123.log",
- "subsystem": "WordPress::Clone"
}, - "task_id": "00000000/66e3526184dee1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the account-level vulnerability protection details.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ has_vulnerability_protection
{- "apiversion": 3,
- "func": "start",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "has_vulnerability_protection": 1,
- "last_scan": 1400573272
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the website vulnerability protection details.
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ has_vulnerability_protection_for_website \ instance_id=123
{- "apiversion": 3,
- "func": "start",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "is_enabled": 1,
- "last_scan": 1400573272
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the website-level vulnerabilities data.
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ get_vulnerability_data \ instance_id=123
{- "apiversion": 3,
- "func": "get_vulnerability_data",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "last_scan_time": 1400573272,
- "vulnerabilites": [
- {
- "available_update_version": "1.0.1",
- "blocked": 1,
- "description": "This is a test vulnerability.",
- "fixed_in": "1.0.2",
- "is_fixed_by_update": 1,
- "is_update_available": 1,
- "location": "core",
- "location_id": "wp_squared",
- "name": "Test Vulnerability",
- "reported_at": 1400573272,
- "risk": "high",
- "theme_active": 1,
- "vulnerability_id": "CVE-PS-12345"
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets whether to ignore low-risk vulnerabilities.
| ignore required | integer Possible Values: 0 1 Example: ignore=1 Whether to ignore low risk vulnerabilities.
|
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ set_ignore_low_risk \ instance_id=123 \ ignore=1
{- "apiversion": 3,
- "func": "start",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "available": 1,
- "status": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function initiates a vulnerability scan for the specified instance.
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ scan_for_vulnerabilities \ instance_id=123
{- "apiversion": 3,
- "func": "scan_for_vulnerabilities",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "code": "check-vulnerabilitiy",
- "errors": null,
- "id": 1234567890,
- "progress": 50,
- "status": "done",
- "steps": null,
- "title": "The system performed a vulnerability scan."
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the website-level vulnerability protection summary.
| instance_id required | integer Example: instance_id=123 The WPTK instance ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPVulnerabilityProtection \ get_sumup \ instance_id=123
{- "apiversion": 3,
- "func": "get_sumup",
- "module": "WPVulnerabilityProtection",
- "result": {
- "data": {
- "action_required": 0,
- "active_vulnerabilities": 0,
- "blocked": {
- "current": 0,
- "yearly": 0
}, - "last_scan_time": 1400573272,
- "low_risk_ignored": 1,
- "sumup": {
- "low": {
- "blocked": 0,
- "unblocked": 0,
- "total": 0
}, - "medium": {
- "blocked": 0,
- "unblocked": 0,
- "total": 0
}, - "high": {
- "blocked": 0,
- "unblocked": 0,
- "total": 0
}, - "critical": {
- "blocked": 0,
- "unblocked": 0,
- "total": 0
}
}, - "requestsBlocked": {
- "day": 0,
- "sevenDays": 0,
- "thirtyDays": 0,
- "threeHundredSixtyFiveDays": 0
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function queries an account's bandwidth data and returns a report.
Note:
This function also returns the bandwidth use of a distributed cPanel account.
| domains | string <domain> Examples:
A pipe-separated list of domains for which to provided data. Note:
|
| end | integer <unix_timestamp> Example: end=1446664809 The end date of the report window. |
required | string or string Examples:
How to group the data in the report, in pipe-separated format. This list must contain one or both of the following parameters: A pipe-separated list that contains one or both of the following parameters:
This parameter can also include only one of the following start time interval types:
Note:
|
| interval | string Default: "daily" Possible Values: "daily" "hourly" "5min" Example: interval=daily Length of time between bandwidth data samples.
Note: The interval's retention period determines availability of the interval's data.
Use the |
| protocols | string Examples:
A pipe-separated list of the protocols for which to provide data.
|
| start | integer <unix_timestamp> Example: start=1445664609 The start date of the report window. |
| timezone | string <olson_timezone_name> Example: timezone=America/Chicago The timezone in which to report the data. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Bandwidth \ query \ grouping='domain|protocol|year'
grouping=domain
{- "data": {
- "UNKNOWN": 70447164,
- "example.com": 815258916235,
- "parkedexample.com": 18861122614,
- "subdomain.example.com": 11407,
- "subdomain2.example.com": 683533
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1
}This function returns a list of the server's enabled protocols.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Bandwidth \ get_enabled_protocols
{- "apiversion": 3,
- "func": "get_enabled_protocols",
- "module": "Bandwidth",
- "result": {
- "data": [
- "imap"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the retention periods for bandwidth data.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Bandwidth \ get_retention_periods
{- "apiversion": 3,
- "func": "get_retention_periods",
- "module": "Bandwidth",
- "result": {
- "data": [
- {
- "interval": "5min",
- "retention": 2678400
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function removes a host from the cPanel account's /home/user/.ssh/known_hosts file.
required | string or string Example: host_name=host.example.com The hostname or IP address of the host to delete. |
| port | integer >= 1 Default: 22 Example: port=1234 The SSH port to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ KnownHosts \ delete \ host_name='host.example.com'
{- "apiversion": 3,
- "func": "delete",
- "module": "KnownHosts",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates a host's entry in the cPanel account's /home/user/.ssh/known_hosts file.
required | string or string Example: host_name=host.example.com The host to update. |
| port | integer [ 1 .. 65535 ] Default: 22 Example: port=1234 The SSH port to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ KnownHosts \ update \ host_name='host.example.com'
{- "apiversion": 3,
- "func": "update",
- "module": "KnownHosts",
- "result": {
- "data": {
- "host": [
- {
- "host": "host.example.com",
- "key": "ssh-rsa AAAAB3NzaC1yc2AEEEEDAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9",
- "line": "host.example.com ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
- "meta": {
- "algorithm": "ssh-rsa",
- "body": "EEEEB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9\\bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9",
- "md5": "b6030e39868ed0e724cea3773e014219",
- "md5-printable": "MD5:b6:03:0e:39:97:2e:d0:e7:24:ab:c3:77:3d:01:42:09",
- "sha256": "55a405bcf4e11ab5b846e58ba0bf6dabd23dcc9e367cae17cb0c91b5b3b3fc55",
- "sha256-printable": "SHA256:RPLFvPThGrW4RuWLoL9tq9I9zJ42fK3XywyRtbOz/EQ"
}
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function checks whether a host's public key exists in the cPanel account's /home/user/.ssh/known_hosts file.
required | string or string Example: host_name=host.example.com The host to query. |
| port | integer [ 1 .. 65535 ] Default: 22 Example: port=1234 The SSH port to use. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ KnownHosts \ verify \ host_name='host.example.com'
{- "apiversion": 3,
- "func": "verify",
- "module": "KnownHosts",
- "result": {
- "data": {
- "errors": [
- "The example.com host does not exist in the known_hosts file."
], - "failure_type": "new",
- "host": [
- {
- "host": "host.example.com",
- "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==",
- "line": "host.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==",
- "meta": {
- "algorithm": "ssh-rsa",
- "body": "AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==",
- "md5": "b6030e39979ed0e724cea3773e014209",
- "md5-printable": "MD5:b6:03:0e:39:97:9e:d0:e7:24:ce:a3:77:3e:01:42:09",
- "sha256": "44e405bcf4e11ab5b846e58ba0bf6dabd23dcc9e367cae17cb0c91b5b3b3fc44",
- "sha256-printable": "SHA256:ROQFvPThGrW4RuWLoL9tq9I9zJ42fK4XywyRtbOz/EQ"
}
}
], - "status": 0
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function registers a host in the cPanel account's /home/user/.ssh/known_hosts file.
required | string or string Example: host_name=hostname.example.com The hostname or IP address to add. |
| port | integer Default: 22 Example: port=1234 The SSH port to use, if the system uses a non-standard SSH port. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ KnownHosts \ create \ host_name='hostname.example.com'
{- "apiversion": 3,
- "func": "create",
- "module": "KnownHosts",
- "result": {
- "data": {
- "host": [
- {
- "host": "hostname.example.com",
- "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPC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iS5ap43JXiUFFAaQ==",
- "md5": "b6030e39979ed0e724cea3773e014209",
- "md5-printable": "MD5:b6:03:0e:39:97:9e:d0:e7:24:ce:a3:77:3e:01:42:09",
- "sha256": "44e405bcf4e11ab5b846e58ba0bf6dabd23dcc9e367cae17cb0c91b5b 3b3fc44",
- "sha256-printable": "SHA256:ROQFvPThGrW4RuWLoL9tq9I9zJ42fK4XywyRtbOz/EQ"
}
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the IP address of the user who most recently logged in.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LastLogin \ get_last_or_current_logged_in_ip
{- "apiversion": 3,
- "func": "get_last_or_current_logged_in_ip",
- "module": "LastLogin",
- "result": {
- "data": [
- "192.168.0.1"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a web server's hostname.
| name | string Default: "host" Value: "host" Example: name=host The web server environment variable to retrieve. You can only retrieve the web server's hostname.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Variables \ get_session_information
{- "apiversion": 3,
- "func": "get_session_information",
- "module": "Variables",
- "result": {
- "data": {
- "host": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the number of server-wide notifications on an account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Notifications \ get_notifications_count
{- "apiversion": 3,
- "func": "get_notifications_count",
- "module": "Notifications",
- "result": {
- "data": 3,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves an application's minimum required password strength.
| app required | string Possible Values: "cpaddons" "createacct" "ftp" "htaccess" "mysql" "passwd" "pop" "postgres" "sshkey" "webdisk" "virtual" Example: app=webdisk The application's name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ PasswdStrength \ get_required_strength \ app='webdisk'
{- "apiversion": 3,
- "func": "get_required_strength",
- "module": "PasswdStrength",
- "result": {
- "data": {
- "strength": 0
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the server's SSH port.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSH \ get_port
{- "apiversion": 3,
- "func": "get_port",
- "module": "SSH",
- "result": {
- "data": {
- "port": 22
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns whether the cPanel account has shell access and the account's shell path.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSH \ get_shell
{- "apiversion": 3,
- "func": "get_shell",
- "module": "SSH",
- "result": {
- "data": {
- "has_terminal_access": true,
- "shell": "/bin/bash"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the status of each cPanel service (daemon), device, and server health check point on your server.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ServerInformation \ get_information
{- "apiversion": 3,
- "func": "get_information",
- "module": "ServerInformation",
- "result": {
- "data": [
- {
- "name": "apache_php_fpm",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "cpanel-dovecot-solr",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "cpanellogd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "cpdavd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "cphulkd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "cpsrvd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "crond",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "dnsadmin",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "exim",
- "status": 1,
- "type": "service",
- "value": "up",
- "version": "exim-4.92-1.cp1180.x86_64"
}, - {
- "name": "ftpd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "httpd",
- "status": 1,
- "type": "service",
- "value": "up",
- "version": "2.4.39"
}, - {
- "name": "imap",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "ipaliases",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "lmtp",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "mailman",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "mysql",
- "status": 1,
- "type": "service",
- "value": "up",
- "version": "5.7.25"
}, - {
- "name": "named",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "nscd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "pop",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "queueprocd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "rsyslogd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "spamd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "sshd",
- "status": 1,
- "type": "service",
- "value": "up"
}, - {
- "name": "Server Load",
- "status": 1,
- "type": "metric",
- "value": "1.73"
}, - {
- "name": "CPU Count",
- "status": 1,
- "type": "metric",
- "value": "2"
}, - {
- "name": "Memory Used",
- "status": 1,
- "type": "device",
- "value": "44.12%"
}, - {
- "name": "Swap",
- "status": 1,
- "type": "device",
- "value": "0.73%"
}, - {
- "name": "Disk / (/)",
- "status": 1,
- "type": "device",
- "value": "26%"
}, - {
- "name": "Disk /tmp (/tmp)",
- "status": 1,
- "type": "device",
- "value": "0%"
}, - {
- "name": "Disk /var/tmp (/var/tmp)",
- "status": 1,
- "type": "device",
- "value": "0%"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves the configuration settings for the cPanel & WHM server on which an account exists. This is useful, for example, to verify which applications and functionality are available on the account.
| name | string Possible Values: "default_theme" "email_filter_storage_directory" "allow_park_subdomain_on_hostname" "allow_remote_domains" "allow_unregistered_domains" "apache_port" "apache_ssl_port" "api_shell" "awstats_browser_update" "awstats_reverse_dns" "cpanel_root_directory" "database_prefix_required" "display_cpanel_doclinks" "dnsadmin_app" "empty_trash_days" "enable_file_protect" "file_upload_maximum_bytes" "file_upload_must_leave_bytes" "file_usage" "ftp_server" "htaccess_check_recurse" "invite_sub" "ipv6_listen" "local_nameserver_type" "logout_redirect_url" "mailbox_storage_format" "mail_server" "minimum_password_strength" "minimum_password_strength_mysql" "mysql_host" "mysql_version" "php_maximum_execution_time" "php_post_maximum_size" "php_system_default_version" "php_upload_maximum_filesize" "php_loader" "php_open_basedir_home" "phpmyadmin_disable_search_info_schema" "docroots_in_public_html_only" "require_ssl" "allow_reset_password" "allow_reset_password_for_subaccounts" "disable_analog" "skip_apache_clients_optimizer" "disable_awstats" "skip_mailbox_warnings_check" "disable_boxtrapper" "skip_bandwidth_limit_check" "disable_mailman" "disable_roundcube" "disable_spamassassin" "disable_spambox" "disable_webalizer" "ssl_default_key_type" "use_information_schema" "use_mail_for_mailman_url" "is_mod_userdir_enabled" "version" Examples:
The server configuration settings to return. Click to view information about the available server configuration settings.
Note:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Variables \ get_server_information
{- "apiversion": 3,
- "func": "get_server_information",
- "module": "Variables",
- "result": {
- "data": {
- "allow_park_subdomain_on_hostname": 0,
- "allow_remote_domains": 1,
- "allow_reset_password": 1,
- "allow_reset_password_for_subaccounts": 1,
- "allow_unregistered_domains": 1,
- "apache_port": "192.0.2.0:80",
- "apache_ssl_port": "192.0.2.0:443",
- "api_shell": 0,
- "awstats_browser_update": 0,
- "awstats_reverse_dns": 0,
- "cpanel_root_directory": "/usr/local/cpanel",
- "database_prefix_required": 1,
- "default_theme": "jupiter",
- "disable_analog": 0,
- "disable_awstats": 0,
- "disable_boxtrapper": 0,
- "disable_mailman": 0,
- "disable_roundcube": 0,
- "disable_spamassassin": 0,
- "disable_spambox": 0,
- "disable_webalizer": 0,
- "display_cpanel_doclinks": 0,
- "dnsadmin_app": "dnsadmin",
- "docroots_in_public_html_only": 1,
- "email_filter_storage_directory": "/etc/vfilters",
- "empty_trash_days": "disabled",
- "enable_file_protect": 1,
- "file_upload_maximum_bytes": null,
- "file_upload_must_leave_bytes": 5,
- "file_usage": 0,
- "ftp_server": "disabled",
- "htaccess_check_recurse": 2,
- "invite_sub": 1,
- "ipv6_listen": 0,
- "is_mod_userdir_enabled": 1,
- "local_nameserver_type": "powerdns",
- "mail_server": "dovecot",
- "mailbox_storage_format": "maildir",
- "minimum_password_strength": 65,
- "minimum_password_strength_mysql": 65,
- "mysql_host": "localhost",
- "mysql_version": "5.7",
- "php_loader": "ioncube",
- "php_maximum_execution_time": 90,
- "php_open_basedir_home": 0,
- "php_post_maximum_size": 55,
- "php_system_default_version": "ea-php73",
- "php_upload_maximum_filesize": 50,
- "phpmyadmin_disable_search_info_schema": 0,
- "require_ssl": 1,
- "skip_apache_clients_optimizer": 0,
- "skip_bandwidth_limit_check": 0,
- "skip_mailbox_warnings_check": 1,
- "ssl_default_key_type": "rsa-2048",
- "use_information_schema": 1,
- "use_mail_for_mailman_url": 0,
- "version": "3.4"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function reports a cPanel account's service proxying configuration.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ServiceProxy \ get_service_proxy_backends
{- "apiversion": 3,
- "func": "get_service_proxy_backends",
- "module": "ServiceProxy",
- "result": {
- "data": [
- {
- "backend": "example.com",
- "service_group": "Mail"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a cPanel account's service proxying.
Note:
set_service_proxy_backends function.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ServiceProxy \ unset_all_service_proxy_backends
{- "apiversion": 3,
- "func": "unset_all_service_proxy_backends",
- "module": "ServiceProxy",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lets you configure a cPanel account's service proxying.
Note:
unset_all_service_proxy_backends
function.string or string The hostname or IP address to assign as the server that handles the account's service proxy requests. This parameter defaults to the existing service proxy configuration, if one exists. | |
| service_group | string Value: "Mail" Examples:
The name of a service group for which to assign a proxy backend. The
corresponding
This parameter defaults to the existing setting, if one exists. Note:
|
string or string Examples:
The hostname or IP address of the server to assign as the corresponding
This parameter defaults to the existing setting, if one exists. Note:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ServiceProxy \ set_service_proxy_backends
{- "apiversion": 3,
- "func": "set_service_proxy_backends",
- "module": "ServiceProxy",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the AutoSSL renewal status for a domain. It indicates whether AutoSSL is active, the domain is excluded, the domain has DCV problems, and whether the certificate will auto-renew.
| domain required | string Example: domain=example.com The fully qualified domain name to check. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ get_autossl_renewal_status \ domain=example.com
{- "apiversion": 3,
- "func": "get_autossl_renewal_status",
- "module": "SSL",
- "result": {
- "data": {
- "has_problems": 0,
- "is_active": 1,
- "is_excluded": 0,
- "will_renew": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables AutoSSL for the domains that you specify.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domains required | string <domain> Example: domains=example.com,example2.com A comma-separated list of domains for which to disable AutoSSL. Note: For browser-based calls, use a URI encoded comma ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ add_autossl_excluded_domains \ domains='example.com,example2.com'
{- "apiversion": 3,
- "func": "add_autossl_excluded_domains",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the domains with AutoSSL disabled.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ get_autossl_excluded_domains
{- "apiversion": 3,
- "func": "get_autossl_excluded_domains",
- "module": "SSL",
- "result": {
- "data": [
- {
- "excluded_domain": "example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a list of domains that possess AutoSSL problems.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ get_autossl_problems
{- "apiversion": 3,
- "func": "get_autossl_problems",
- "module": "SSL",
- "result": {
- "data": [
- {
- "domain": "example.com",
- "problem": "example.com contains 400 domains, which exceeds the maximum number (200) of domains allowed for the \"Sectigo\" AutoSSL provider. This system will include those 200 domains on the certificate that appear to be the website's most important. To allow AutoSSL to secure each domain, divide the 400 domains among separate websites. (The websites can all serve the same content from the same document root.)",
- "time": "2018-06-07T05:30:09.000Z"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function verifies whether the autossl_check task is in progress for the current user.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ is_autossl_check_in_progress
{- "apiversion": 3,
- "func": "is_autossl_check_in_progress",
- "module": "SSL",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables AutoSSL for every domain that you specify.
Warning:
This function replaces the list of any domains that you previously excluded. To add domains to the list of excluded domains, use the UAPI function SSL::add_autossl_excluded_domains.
Important:
When you disable the the Calendar and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domains | string Example: domains=example.com,example.net A comma-separated list of domains for which to disable AutoSSL. Note: If you do not include this parameter, the function will enable AutoSSL for every domain on the account. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_autossl_excluded_domains
{- "apiversion": 3,
- "func": "set_autossl_excluded_domains",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables AutoSSL for the domains that you specify.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domains required | string Examples:
Enable AutoSSL for this domain. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ remove_autossl_excluded_domains \ domains='example.com'
{- "apiversion": 3,
- "func": "remove_autossl_excluded_domains",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ start_autossl_check
{- "apiversion": 3,
- "func": "start_autossl_check",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deletes a certificate signing request (CSR).
Note:
id or the friendly_name
parameter.SSL::delete_key function instead.Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestCSR The CSR's friendly name. |
| id | string Example: id=example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f The CSR's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ delete_csr
{- "apiversion": 3,
- "func": "delete_csr",
- "module": "SSL",
- "result": {
- "data": [
- {
- "commonName": "example.com",
- "created": 1538308800,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCSR",
- "id": "example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f",
- "key_algorithm": "rsaEncryption",
- "modulus": "a74f7636fa6ac93ee6836a83a995b55deb5019ea36d7ba3dafb00e38d693acd\nb0c81b2ff777d6b433a420fae523f127f352a68bcc8b8f2d6ee7b70395bafab\nd8237ada8164fdddf8376b30375c35d4d4cbcce7d33d08069c17b409176a368\n9f1ebc97c0b08fe6ae44c19a92ac6d68448e7f1d13f3b360affd4222a51b4f3\n5342de99b5a1fb5548e438f2d824664562a448002eed7fce24dedc7dc3e1ed1\n79973d1dae959b33716eeb410d172708954e00632cbf60a0e26419860c8c0bc\n285d6bfe4b479de0dd189772a5dae676bd2a92acccc1369821be8cffddd8a7e\n6ecc061f8a32a9ae0661e4e946ed8e3827b277138d3a76116567cbd129cbd86\n9ef9dddf"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function deletes a private key.
Note:
id or the friendly_name
parameter.SSL::delete_csr
function instead.Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestKey The private key's friendly name. |
| id | string Example: id=example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f The private key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ delete_key
{- "apiversion": 3,
- "func": "delete_key",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1538308800,
- "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestKey",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function deletes an SSL certificate.
Note:
id or the friendly_name
parameter.SSL::delete_ssl function instead.Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestCert The certificate's friendly name. |
| id | string Example: id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The certificate's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ delete_cert
{- "apiversion": 3,
- "func": "delete_cert",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1538308800,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3",
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "Organization",
- "issuer_text": "countryName\nUS\nstateOrProvinceName\nTX\nlocalityName\nHouston\norganizationName\nOrganization\ncommonName\nexample.com",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1569844800,
- "not_before": 1538308800,
- "serial": "45462cd0d6537b20cf2f3eb8aec07140",
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "subject_text": "commonName\nwww.example.com",
- "validation_type": "dv"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function generates a certificate signing request (CSR).
Note:
This function requires a valid key in the account's ssl directory.
You can generate a key with UAPI's SSL::generate_key function.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and WebServer roles, the system disables this function.
| countryName required | string <ISO-3166-1 (alpha-2)> Example: countryName=US The two-letter country code. |
| domains required | string Examples:
A comma-separated list of the domains for which to generate the certificate. |
| emailAddress | string <email> Default: "" Example: emailAddress=username@example.com An email address to associate with the certificate. |
| friendly_name | string Example: friendly_name=TestCert A friendly name for the new certificate. This parameter defaults to the domain name for which you generated the certificate. |
| key_id required | string Example: key_id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The key's ID. |
| localityName required | string Example: localityName=Houston The certificate's city or locality name. |
| organizationalUnitName | string Default: "" Example: organizationalUnitName=Department The certificate's organizational unit or department name. |
| organizationName required | string Example: organizationName=Organization The certificate's organization. |
| stateOrProvinceName required | string Example: stateOrProvinceName=Texas The certificate's state or locality name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ generate_csr \ domains='example.com' \ countryName='US' \ stateOrProvinceName='Texas' \ localityName='Houston' \ organizationName='Organization' \ key_id='example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3'
{- "apiversion": 3,
- "func": "generate_csr",
- "module": "SSL",
- "result": {
- "data": {
- "commonName": "example.com",
- "created": 1569884400,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCSR",
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "text": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC3TCCAcUCAQAwgZcxFDASBgNVBAMMC2V4YW1wbGUuY29tMRYwFAYDVQQLDA1E\nb2N1bWVudGF0aW9uMQswCQYDVQQGEwJVUzEiMCAGCSqGSIb3DQEJARYTbGF1cmVu\nY2VAY3BhbmVsLm5ldDEUMBIGA1UECgwLY1BhbmVsIEluYy4xDjAMBgNVBAgMBVRl\neGFzMRAwDgYDVQQHDAdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAp092NvpqyT7mg2qDqZW1XetQGeo217o9r7AOONaTrNsMgbL/d31rQzpC\nD65SPxJ/NSpovMi48tbue3A5W6+r2CN62oFk/d34N2swN1w11NTLzOfTPQgGnBe0\nCRdqNonx68l8Cwj+auRMGakqxtaESOfx0T87Ngr/1CIqUbTzU0LembWh+1VI5Djy\n2CRmRWKkSAAu7X/OJN7cfcPh7ReZc9Ha6VmzNxbutBDRcnCJVOAGMsv2Cg4mQZhg\nyMC8KF1r/ktHneDdGJdypdrmdr0qkqzMwTaYIb6M/93Yp+bswGH4oyqa4GYeTpRu\n2OOCeydxONOnYRZWfL0SnL2Gnvnd3wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEB\nAFlolzJbcviWcdZUv+PJ7G8cAqFAxa8a3W2a0Y1U0BaMrpDfuOHpQgOtO62rr+i+\nhkrIReuk7Isyl6GoZkX17KhQ1Vo9aW8a8Ur7+0RGDbxRlK9jJWnvSFn6cMMqRSfA\nDXpptxhqBFZJIZMc3pPX9Jqycuu8bxeIvUKeSMe3Jxcl1ZXEXX47FeRZxvd+WXF9\n4Xu4KZXHdzb5tB6jPhzIaN0/3d92N/KhvCcnw3YC2fEGDkpOlZaoa7O72+aq5K3b\nM1htFv9deAHqIHefV41iOrxUCIKIhdPIjvAm774lDHLzPpJVrshO/NpA74LEkny5\nFMwKKx+6Jgx1HSWucn5kWek=\n-----END CERTIFICATE REQUEST-----"
}, - "errors": null,
- "messages": [
- "Certificate Signing Request generated!"
], - "metadata": { },
- "status": 1,
- "warnings": null
}
}This function generates a self-signed SSL certificate.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| countryName required | string <ISO-3166-1 (alpha-2)> Example: countryName=US The two-letter country code. |
| domains required | string <domain> Examples:
A comma-separated list of domains for which to generate the certificate. |
| emailAddress | string <email> Default: "" Example: emailAddress=username@example.com An email address to associate with the certificate. |
| friendly_name | string Example: friendly_name=TestCert A friendly name for the new certificate. This parameter defaults to the domain's name for which you generated the certificate. |
| key_id required | string Example: key_id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The key's ID. |
| localityName required | string Example: localityName=Houston The certificate's city or locality name. |
| organizationalUnitName | string Default: "" Example: organizationalUnitName=Department The certificate's organizational unit or department name. |
| organizationName required | string Example: organizationName=Organization The certificate's Organization Name. |
| stateOrProvinceName required | string Example: stateOrProvinceName=TX The two-letter state or locality abbreviation. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ generate_cert \ domains='example.com' \ countryName='US' \ stateOrProvinceName='TX' \ localityName='Houston' \ organizationName='Organization' \ key_id='example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3'
{- "apiversion": 3,
- "func": "generate_cert",
- "module": "SSL",
- "result": {
- "data": {
- "created": 1538308800,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "Organization",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1569844800,
- "not_before": 1538308800,
- "serial": "01e57e4d92",
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "text": "-----BEGIN CERTIFICATE-----\nMIIGBzCCA++gAwIBAgIFAeV+TZIwDQYJKoZIhvcNAQELBQAwUjELMAkGA1UECAwC\nVFgxEDAOBgNVBAcMB0hvdXN0b24xCzAJBgNVBAYTAlVTMRMwEQYDVQQDDAptcmZy\nb2cuY29tMQ8wDQYDVQQKDAZjUGFuZWwwHhcNMjAwNjA4MTUyNjA0WhcNMjEwNjA4\nMTUyNjA0WjBSMQswCQYDVQQIDAJUWDEQMA4GA1UEBwwHSG91c3RvbjELMAkGA1UE\nBhMCVVMxEzARBgNVBAMMCm1yZnJvZy5jb20xDzANBgNVBAoMBmNQYW5lbDCCAiIw\nDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK/PpzRsms2ZZmA1EG2rNYZaAq2z\nbhUGN6YMpugDwPL9xuqDwf0WUdoBjSBbty7rb5zMCZ+Ty3xHFAo15TLQXqtM0zIo\nh/FRET9rtl6EuXFFFN+eAiV4GgZJVmVMmcgXNGgSjKZHhie5THkGJbwXXRxZryHN\nQIeLlT7DttSwoAh9rEbk6hHKyyoQQ4rSkNXREUZTN3Gk7u7et8iYWl1FBkmJkFDJ\nH4Ys678md7AiXndb4YkOQd2CEgoWXMaMLWJcFkdAmrIYhRmJvyp3BzF9hEkg+qPp\nVEyIL/xVxScdxiFKGWbiHr10UiFt/0+g0gToyUXCmsfo01p0oqrk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v8ZnHUF7MT+K6vtQd\nJ16+pszCF55t9w5uPqur67/R00dCWLpxvHRRF8J+2Xverhmex5kR6a1nUlbP1oOP\nVq+EmcAL0PP6qdDr8fkjgvNyX7hT+cuiPBbxpY6XfDSlat5+5T2lJ1Ny6GWhBnaR\n35g3EF8ysu3AYQnDwtZrOrEa08lDN3mbrkT3ImSa5oZKgOrlpCZ0dzi8p4wSrboq\n9eZyqikEvuudz+VeQf1WR/6/FsyRq2PEtjgX1atWZiPfatN5f1YVxcElTvuMzyOP\nZXjpUs8MO+CHF1FwtKm52NNItIlnUY7KPpFU8L+oa8O2BMr91wi8NpTR2gd0F+jH\n21NkfEM7YlXzgMw=\n-----END CERTIFICATE-----\n",
- "validation_type": null
}, - "errors": null,
- "messages": [
- "Certificate generated"
], - "metadata": { },
- "status": 1,
- "warnings": null
}
}This function generates a private key.
Important:
keytype and keysize parameters in a single call.| friendly_name | string Example: friendly_name=TestKey A friendly name for the new key. This parameter defaults to the key's type, creation date, and creation time. |
| keysize | integer Deprecated Default: 2048 Example: keysize=2048 The key's modulus size. Note: Use the |
| keytype | string Possible Values: "system" "rsa-2048" "rsa-4096" "ecdsa-prime256v1" "ecdsa-secp384r1" Example: keytype=rsa-2048 The key's type.
This parameter defaults to the user's default SSL/TLS key type. Note: If you do not use this parameter, the system defaults to the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ generate_key
{- "apiversion": 3,
- "func": "generate_key",
- "module": "SSL",
- "result": {
- "data": {
- "created": 1601467200,
- "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestKey",
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "text": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAyeiHvMuJuVk8ZEY6wMzUS1g0eWaHaIWmIRe+Qrn6SwiRrm1p\npsJCiGPPPQGOSg4FzrMXqE0zsi/Tk3hUO/EEsi7CcZe8cUanjlUeXhiwrb86FCMF\nOb9siRHQvlss7VCg8ZGXXTWZgf5yD3A1xPwdayYwF2Tc7GkNcZGUAI58geuYaq+U\nGiLczRGZep1IQ0b1cZnqDvGMx6AS6hiDqLISjnmXYY2OhG6Uyp+SuinjYzLPJ6eO\nN/7i9qqbcGmt0ssddmhR897+bTEom5SlSuyi03KZ9Rn4ZmNJgOsup9MclSBGxBys\nb6MuuM3N0/tF5QuwmDc8H6h2rNBP9vGV7RTTXQIDAQABAoIBAFS/WVoRRLmbjxG3\nuKl8UA9f8oaSVnu0vUpeoOl5Dmm4Kw2/tvzbxPlii3Xb1VGYGS/tVBy8atp74J6h\nfxm5zHLN1afAPMR/F41ShPCSBHapMUOKf4MBqhjOdYOw2Way1RsQNSxWdxxtJIr+\nWlNYTzDOUpk/KMvCPHZS2IBzTidpcFpDQ3pyDXjOoKJJH0EQWPtvxJNGrFqmU29D\n9WBqQemHnDrzg3s7JzQ5cGpbbCE+QX8IckNkslAkyhm771CtqWdeo+c45e6YfGcx\nKuAy1zGSVzQBuitzYoMUOL5olXLEj8fHzXd/cZP4yCyyabcGz2vi6luxF+28l1OL\nG1axyLECgYEA+bD5B+Y/Dp5hZ/uVR1bbvyraQpwbDesS1zgnJ53KOIl926dnWzIt\nUvM46+c9IF+UJrtzwIB6IvjAQioNFrK36bHgNGzNf9WQ54NN172qveaFLdW34z/i\nGR2ix/efm9OC41QREQ/5IKV07TibCwVazVBWascMPkH7FnguTvTCiosCgYEAzwJ+\nGPlIWjK+sqkK5JMUyuH43qAvgVfkZV906JpNRQH0Mob3bC0nXN95EoTwWXk68ULT\no1GHv9XLbj8e+Ok7kpJQZT5vEZnDN+cy3jdTLCvcjU5Q3ToImOTp9isSAFWRTbtk\nyabLNoIIsTR/ZwwPFTZcRiK2d8k7ZhcRKdfGnrcCgYAPZ06FoTukoDqsGoYkB4S4\n72DVmSHGIwlfg5ROylouULUV9ubWZmsLYfvR+cr4k0zlcsz6RDLEs4nQyx1RmCbm\nYNXPBiNLTpaI4b3MoGPHIVB3+mZEu60sFXr0UR9kkpDRi18eKVkaHXrwI3zVGjh2\n0Az0u2DS+mkOAs4AivLxbwKBgQC0XPqbLc+Bb0dCCREJmLD8GCkrZ6wcaQUB4krN\nQ2vhnVM0Fu5K3Yi3XapynUuA2aSmgtA9MxMw7MkjlHGa9DPIgBz2KZDCaBN0iMeE\nX/XivZCbucmxBxhohsLmjh5QFj3U2Vp2bBIQuvlx1EjQ8uvNUqDRJvuOoNFVIPH+\nYBeZPwKBgA//kXfNtNMHOpch699i3rgTzbRFDmGwsr1otzvJsXw7Pr2bM4WIzUJy\nG2SUSUlQRSZK4+BBKT9S0d7TynJD6X/6R7IBotZbfXs1myYxEsKj89/BQmr47x2h\nHjYVCClNoJlsbd5C2yu1R3PikweWGoVaxE3c+AN5knqjwJ0g21Cf\n-----END RSA PRIVATE KEY-----"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function installs an SSL certificate.
Note:
Due to their inherent complexities, SSL-related functions often present problems for third-party developers. For the additional steps required to successfully call this function, read our Call UAPI's SSL::install_ssl Function in Custom Code documentation.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| cabundle | string <pem-certificate> Example: cabundle=-----BEGIN%20CERTIFICATE-----%0AMIIB%2BjCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD%0AVQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv%0Ab3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV%0AUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU%0AcnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k%2B625h8cXyv%0ARLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz%2BiCWaEVh43KRuH6X4M%0AypqfpX%2F1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt%2F5%0A1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz%0AdcZfHeFhVYAA1IFLezEPI2PnPfMD%2BfQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl%0AIjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4%2F5ODFlitppK%2BULdjG%2BBqXH%2F9Apy%0AbW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY%0A-----END%20CERTIFICATE----- The Certificate Authority (CA) bundle data, if the certificate requires it. Note:
|
| cert required | string <pem-certificate> Example: cert=-----BEGIN%20CERTIFICATE-----%0AMIIEEzCCAvugAwIBAgIJALF%2FjFpw6p1bMA0GCSqGSIb3DQEBBQUAMIGfMRYwFAYD%0AVQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQswCQYD%0AVQQGEwJVUzEoMCYGCSqGSIb3DQEJARYZbGF1cmVu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RNfKLGvxiMXnZA1c6L4N0lowvXHgZxTTUXtDFLXyrcwrLsvUErEV7rbizuxqfPw%0AcaRtXn4uc%2Bt6HYuW7yWesBauCWnJNiKbjN%2FF%2BuCTurN3QMAeWf3ZJtsfkAgk8dyq%0AR%2F83a3kDtSPrpt%2BjX%2BqdjKEpRtQ5Qpm6XT2gCOQPgnfiUtOCH419pp922P%2FAAGc%2B%0AZUhYoWcRWKw%2Fy6gI7Ru%2B%2B9%2B8%2BwkadL9EbKMZxhVwD5qVm4ZlWK2a%5Cr%5Cn%0A-----END%20CERTIFICATE----- The certificate to install. Note:
|
| domain required | string <domain> Example: domain=example.com The domain name. |
| key required | string <pem-private-key> Example: key=-----BEGIN%20RSA%20PRIVATE%20KEY-----%0AMIIEpAIBAAKCAQEA4AVM6J4Qg3DIFWr%2FeJ5GRmIATYsJIepKbrDy70sq%2BudcO8R8%0Axxak0oMZ%2F9mUdpjSNK%2FfLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC%2Fnf%2FOEZLm3Zb%0ABgu8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ%2B%2Bq62bFV89jkHWTMcKyyqHENo3h%0Ac%2Blkpd9vnp8rZTinaVb7nX26uQqAFZYRo%2BWU0G%2FNPsq40QVSMoqPxyEz4qXo0hvu%0AIlCXmzFZq%2F6fCVPEKPLhQgMmpdBkMz4dVOazREfqXdjMD2%2BQXSNiA1AwWr8l0r4r%0AtzlxEYDJIR41yXp0xMl3KoolxMyvLBqZy32niQIDAQABAoIBAQCmbGmhWmPsMeoC%0At1WJFxQgD4goE0U6k%2BKt7vjbOt14Pk6v%2FB2yjaju1wSGpO59WLS4%2FXrwI2se6IXr%0Amba7u3VUEgWXLriNHoLy7%2FSMNTs%2BZEKhAMG36eNe3tVdT7busTag31r6sEMGGwCs%0AIwpU%2Bazosk0oylWLEX%2Fm%2FuHWEs1eaIEWWWtgHB%2BKZrrP7Rr9RYfVQ144DxmOxS3C%0Aa9%2BmST62WqAVP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1%2FUIAQPAWbxLoTM%2BndQ%2FuPEdfA%3D%3D%0A-----END%20RSA%20PRIVATE%20KEY----- The certificate's key. Note:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username SSL install_ssl domain='example.com' cert='-----BEGIN%20CERTIFICATE-----%0AMIIEEzCCAvugAwIBAgIJALF%2FjFpw6p1bMA0GCSqGSIb3DQEBBQUAMIGfMRYwFAYD%0AVQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQswCQYD%0AVQQGEwJVUzEoMCYGCSqGSIb3DQEJARYZbGF1cmVuY2Uuc2ltb25AY3BhbmVsLm5l%0AdDEUMBIGA1UEChMLY1BhbmVsIEluYy4xDjAMBgNVBAgTBVRleGFzMRAwDgYDVQQH%0AEwdIb3VzdG9uMB4XDTEzMDUxNzE2MTMwN1oXDTE0MDUxNzE2MTMwN1owgZ8xFjAU%0ABgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsTDURvY3VtZW50YXRpb24xCzAJ%0ABgNVBAYTAlVTMSgwJgYJKoZIhvcNAQkBFhlsYXVyZW5jZS5zaW1vbkBjcGFuZWwu%0AbmV0MRQwEgYDVQQKEwtjUGFuZWwgSW5jLjEOMAwGA1UECBMFVGV4YXMxEDAOBgNV%0ABAcTB0hvdXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRO0AP%0AN5XtjDqkEyJ6ctfYqUtt9yUXyRuCETFjW6opNLSmZSHeF6L2aZka646lhj02CFyl%0AkzsNSxysN66tY%2BWZcTmvgPisJdQFpFvjroJZgDjYRV0QqokKdRy%2F5BU0%2BtHXoYpj%0A9JOQlbvEWxiGR3R80sL1ma4AfSE6Gv8M%2FPULTadan51eHaikXqjOXdPJQKuWP3g9%0AFnIuf38WRYwzGrre88qsZrpsMrADX5dotHWgqAf7Tap6xfA4CUAgQo9tldariuVi%0ABz%2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KdNwhd2GlSPhXFbf%2B7M5GWW6BZk6rMvv7EOAVice2uvyFm8%2F4%2F1WbmF8R%2BT7%0ALX1rPLO5p%2Fm701QpvP11TabiwqRkqtSEQhSRF0AKTojSW%2FyyHCZFAawUhV%2FZ9EKi%0AHmKb97kCgYAyzmFc2it0HqnsOnRybop603nqMtWGTQO4cxa93HUDpYajuK2K3Dfr%0AxUj6lG3z%2FoKJGGE2JqgZ6LBAhNJtJWJu2ox3pKGE63QjLJnVwb8y1NFYpe%2FcrbLe%0APuBwIR0L7drXxfv7O5btY7h6QI2d1%2FUIAQPAWbxLoTM%2BndQ%2FuPEdfA%3D%3D%0A-----END%20RSA%20PRIVATE%20KEY-----'
{- "apiversion": 3,
- "func": "install_ssl",
- "module": "SSL",
- "result": {
- "data": {
- "action": "update",
- "cert_id": "example_com_bbe7e_16e2d_1369007999_1d87a0cdb540f5aae607b10e9a1a82fb",
- "domain": "example.com",
- "extra_certificate_domains": [
- "ssl.example.com"
], - "html": "The SSL certificate is now installed onto the domain \"example.com\" using the IP address \"192.168.0.1\".\nThe existing virtual host was updated with the new certificate. Apache is restarting in the background.",
- "ip": "192.168.0.1",
- "key_id": "bbe7e_16e2d_df7539f280eb1ecf6c1096190e41ada7",
- "message": "The SSL certificate is now installed onto the domain \"example.com\" using the IP address \"192.168.0.1\".\nThe existing virtual host was updated with the new certificate.\nApache is restarting in the background.",
- "statusmsg": "The SSL certificate is now installed onto the domain \"example.com\" using the IP address \"192.168.0.1\".\nThe existing virtual host was updated with the new certificate.\nApache is restarting in the background.\nThe SSL certificate is now installed onto the domain \"example.com\" using the IP address \"192.168.0.1\".\nThe existing virtual host was updated with the new certificate.\nApache is restarting in the background",
- "user": "example",
- "warning_domains": [
- "warning.com"
], - "working_domains": [
- "example.com"
]
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function changes a certificate's friendly name.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name required | string Example: friendly_name=TestCert The certificate's friendly name. |
| new_friendly_name required | string Example: new_friendly_name=TestCert2 The certificate's new friendly name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_cert_friendly_name \ friendly_name='TestCert' \ new_friendly_name='TestCert2'
{- "apiversion": 3,
- "func": "set_cert_friendly_name",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function changes a key's friendly name.
Important:
friendly_name or id parameter.| friendly_name required | string Example: friendly_name=TestKey The key's friendly name. |
| id required | string Example: id=a9b72_63971_2cb6d8897b362cfb1548e047d8428b8d The key's ID. |
| new_friendly_name required | string Example: new_friendly_name=TestKey2 The key's new friendly name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_key_friendly_name \ friendly_name='TestKey' \ id='a9b72_63971_2cb6d8897b362cfb1548e047d8428b8d' \ new_friendly_name='TestKey2'
{- "apiversion": 3,
- "func": "set_key_friendly_name",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets a new primary SSL website for a dedicated IP address.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| servername required | string <domain> Example: servername=hostname.example.com The primary SSL website's servername. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_primary_ssl \ servername='hostname.example.com'
{- "apiversion": 3,
- "func": "set_primary_ssl",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a certificate.
Note:
When you call this parameter, you must include either the id or
the friendly_name parameter.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestCert The certificate's friendly name. |
| id | string Example: id=example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041 The certificate's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ show_cert
{- "apiversion": 3,
- "func": "show_cert",
- "module": "SSL",
- "result": {
- "data": {
- "cert": "-----BEGIN CERTIFICATE-----MIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQIDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYyMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNVBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3PXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fWvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/daM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6PLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGj\\UDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3WhcDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVwFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2agqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPaKm6r7YmwfLN/YMZBHXSR58oOGP9W-----END CERTIFICATE-----",
- "details": {
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "is_self_signed": 1,
- "issuer": {
- "commonName": "example.com",
- "countryName": "US",
- "emailAddress": "username@example.com",
- "localityName": "Houston",
- "organizationName": "Organization",
- "stateOrProvinceName": "Texas"
}, - "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "not_after": 1601467200,
- "not_before": 1569844800,
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject": {
- "commonName": "example.com",
- "countryName": "US",
- "emailAddress": "username@example.com",
- "localityName": "Houston",
- "organizationName": "Organization",
- "stateOrProvinceName": "Texas"
}, - "validation_type": "dv"
}, - "text": "Certificate:\n Data:\n Version: 3 (0x2)\n Serial Number:\n d1:e8:74:8c:d0:69:d2:55\n Signature Algorithm: sha1WithRSAEncryption\n Issuer: CN = example.com, C = US, emailAddress = username@example.com, O = Example, ST = Texas, L = Houston\n Validity\n Not Before: Apr 10 22:38:10 2013 GMT\n Not After : Apr 10 22:38:10 2014 GMT\n Subject: CN = example.com, C = US, emailAddress = username@example.com, O = Example, ST = Texas, L = Houston\n Subject Public Key Info:\n Public Key Algorithm: rsaEncryption\n Public-Key: (2048 bit)\n Modulus:\n 00:c6:9c:e3:37:1a:fc:e6:1b:e4:29:4d:8e:ee:ec:\n bd:7a:52:12:ef: 34:71:64:77:e0:79:76:6d:ba:f0:\n 77:fd:f0:92:18:b0:84:c3:f7:12:3a:a9:b9:1d:16:\n 6c:a0:10:6d:f0:55:17:35:27:ff:81:a7:46:e6:d4:\n 36:97:34:01:3a:2f:6d:61:9a: 04:20:e3:fd:06:11:\n 8b:a4:5e:4f:6d:0d:93:8e:3b:cc:cb:19:b3:cb:74:\n 7a:54:82:ae:52:9e:46:31:7a:02:44:0b:7b:26:e8:\n 84:aa:91:2b:25:c1:42:0c:cc:5d:c4:d5: c4:cf:df:\n de:4c:7c:22:99:ab:06:79:99:16:1e:a7:49:5b:9b:\n 89:97:18:3c:1e:4b:c6:c5:b5:b2:9d:7d:be:b9:91:\n c6:08:38:7d:dc:81:18:2b:0c:2c:da:29:f4:aa:a2:\n 72:46:d9:c2:68:31:89:51:ab:32:af:7a:8d:9b:a7:\n d8:b8:b5:37:21:03:91:1d:4e:d8:fc:f1:0e:1f:96:\n 17:d6:90:25:c1:3a:1a:76:4c:9e:2b:7e:b9:9c:f5:\n 86:0a:cf:ea: 2f:eb:bc:33:ee:69:49:b9:c2:e6:a0:\n ef:ee:90:19:4a:2a:64:7e:ef:96:46:7e:7d:e2:35:\n ec:d9:cf:34:42:7a:3d:c1:22:b9:68:a2:b3:02:a3:\n 7f:f5\n Exponent: 65537 (0x10001)\n X509v3 extensions:\n X509v3 Subject Key Identifier:\n 6A:A1:EA:62:FB:B2:C4:AC:04:B0:43:DD:56:BE:8A:8D:FA:16:D3:F4\n X509v3 Authority Key Identifier:\n keyid:6A:A1:EA:62:FB:B2:C4:AC:04:B0:43:DD:56:BE:8A:8D:FA:16:D3:F4\n\n X509v3 Basic Constraints:\n CA:TRUE\n Signature Algorithm: sha1WithRSAEncryption\n 3c:1e:f7:3d:20:1b:a2:bd:5c:d6:0f:2a:9e:f3:b0:83:bf:a9:\n a0:90:9b:96:b1:a6:1e:8b:be:7c:f5:72:58:a0:48:3e:68: 43:\n 06:37:63:0a:cb:9c:23:98:c6:9e:f1:73:e8:4b:71:ac:07:fc:\n d0:5c:e1:55:4f:be:a7:75:5a:57:da:a1:c2:46:63:8f:3a:70:\n 4c:42:3c:03:4c:a0:47:a3:fc: ae:15:03:25:a5:78:63:a2:73:\n cd:47:d5:64:7c:d4:f5:85:f7:03:b8:b4:d8:95:75:6a:78:5c:\n e6:c7:69:02:7b:a4:fc:4d:8c:80:7b:c7:1c:71:04:ba:53:71:\n 7a: ce:00:cb:0e:5e:21:89:02:ba:90:02:8e:b5:79:8e:84:50:\n b0:21:63:b0:ac:19:80:c5:1d:a2:95:68:b7:ee:35:10:fa:db:\n f5:bf:b0:16:b1:34:76:f2:d6:ee:07:3b:6d:b6:0c:1d:b4:e5:\n 53:50:23:b8:c4:bf:fe:d6:77:ec:89:68:a0:d8:dd:f4:f5:fa:\n 7d:f6:c4:72:02:b1:e8:87:f7:e1:16:71:80:2e:e7:94:7b:eb:\n c6:a7:07:36:05:6d:34:b4:25:74:e9:c2:2c:9e:3d:bc:97:8e:\n 84:ce:cc:4f:1f:11:67:ad:30:f6:83:3e:be:bb:88:48:10:65:\n f7:4b:2f:80\n"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a certificate signing request (CSR).
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
Note:
When you call this function, you must include either the id
or the friendly_name parameter.
| friendly_name | string Example: friendly_name=TestCSR The CSR's friendly name. |
| id | string Example: id=example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f The CSR's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ show_csr
{- "apiversion": 3,
- "func": "show_csr",
- "module": "SSL",
- "result": {
- "data": {
- "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC3TCCAcUCAQAwgZcxFDASBgNVBAMMC2V4YW1wbGUuY29tMRYwFAYDVQQLDA1E\nb2N1bWVudGF0aW9uMQswCQYDVQQGEwJVUzEiMCAGCSqGSIb3DQEJARYTbGF1cmVu\nY2VAY3BhbmVsLm5ldDEUMBIGA1UECgwLY1BhbmVsIEluYy4xDjAMBgNVBAgMBVRl\neGFzMRAwDgYDVQQHDAdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAp092NvpqyT7mg2qDqZW1XetQGeo217o9r7AOONaTrNsMgbL/d31rQzpC\nD65SPxJ/NSpovMi48tbue3A5W6+r2CN62oFk/d34N2swN1w11NTLzOfTPQgGnBe0\nCRdqNonx68l8Cwj+auRMGakqxtaESOfx0T87Ngr/1CIqUbTzU0LembWh+1VI5Djy\n2CRmRWKkSAAu7X/OJN7cfcPh7ReZc9Ha6VmzNxbutBDRcnCJVOAGMsv2Cg4mQZhg\nyMC8KF1r/ktHneDdGJdypdrmdr0qkqzMwTaYIb6M/93Yp+bswGH4oyqa4GYeTpRu\n2OOCeydxONOnYRZWfL0SnL2Gnvnd3wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEB\nAFlolzJbcviWcdZUv+PJ7G8cAqFAxa8a3W2a0Y1U0BaMrpDfuOHpQgOtO62rr+i+\nhkrIReuk7Isyl6GoZkX17KhQ1Vo9aW8a8Ur7+0RGDbxRlK9jJWnvSFn6cMMqRSfA\nDXpptxhqBFZJIZMc3pPX9Jqycuu8bxeIvUKeSMe3Jxcl1ZXEXX47FeRZxvd+WXF9\n4Xu4KZXHdzb5tB6jPhzIaN0/3d92N/KhvCcnw3YC2fEGDkpOlZaoa7O72+aq5K3b\nM1htFv9deAHqIHefV41iOrxUCIKIhdPIjvAm774lDHLzPpJVrshO/NpA74LEkny5\nFMwKKx+6Jgx1HSWucn5kWek=\n-----END CERTIFICATE REQUEST-----",
- "details": {
- "commonName": "example.com",
- "countryName": "US",
- "created": 1538265600,
- "domains": [
- "example.com"
], - "emailAddress": "username@example.com",
- "friendly_name": "TestCSR",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "key_algorithm": "rsaEncryption",
- "localityName": "Houston",
- "modulus": "a74f7636fa6ac93ee6836a83a995b55deb5019ea36d7ba3dafb00e38d693acdb0c81b2ff777d6b433a420fae523f127f352a68bcc8b8f2d6ee7b70395bafabd8237ada8164fdddf8376b30375c35d4d4cbcce7d33d08069c17b409176a3689f1ebc97c0b08fe6ae44c19a92ac6d68448e7f1d13f3b360affd4222a51b4f35342de99b5a1fb5548e438f2d824664562a448002eed7fce24dedc7dc3e1ed179973d1dae959b33716eeb410d172708954e00632cbf60a0e26419860c8c0bc285d6bfe4b479de0dd189772a5dae676bd2a92acccc1369821be8cffddd8a7e6ecc061f8a32a9ae0661e4e946ed8e3827b277138d3a76116567cbd129cbd869ef9dddf",
- "organizationName": "Organization",
- "organizationalUnitName": "Department",
- "stateOrProvinceName": "Texas"
}, - "text": "Certificate Request:\n Data:\n Version: 0 (0x0)\n Subject: CN = example.com, C = US, emailAddress = username@example.com, O = Example, ST = Texas, L = Houston\n Subject Public Key Info:\n Public Key Algorithm: rsaEncryption\n Public-Key: (2048 bit)\n Modulus:\n 00:bf:44:22:cb:13:2b:7f:41:9f:48:85:d6:2c:77:\n 03:cf:84:db:90:5c:5a:ed:e5:9c:cb:d6:9d:4b:fc:\n 67:58:b7:db:71:dd:eb:8e:5a:77:6f:03:5d:96:85:\n 60:dc:91:45:59:85:ff:9e:57:76:a5:b5:cd:dc:48:\n 25:89:3f:8f:17:c1:c2:1e:4d:ec:f0:08:1a:a9:cc:\n 2d:45:34:be:82:77:a5:e4:bb:0b:82:bc:82:51:c3:\n ac:1b:ed:c3:a4:b3:e6:14:4f:ba:9e:39:af:08:ae:\n 3c:2c:15:bd:dc:03:17:93:01:95:4f:c0:2a:0f:3b:\n 46:5f:5e:6f:96:d5:b2:dd:53:22:a9:91:e4:36:8e:\n f2:60:5b:ca:b3:72:e6:be:53:8b:9e:b6:72:26:04:\n 85:37:f4:89:c1:78:91:7d:46:96:71:c4:be:39:f3:\n cc:1d:79:bc:33:61:5c:5f:76:52:4a:7d:d0:60:31:\n 79:96:44:6e:6a:77:72:70:1f:3f:08:24:e6:d1:50:\n c0:6a:86:98:df:56:8b:ae:2f:c1:97:bc:ed:4c:70:\n a1:a6:b2:7e:25:97:8f:95:73:a1:84:71:43:da:33:\n 48:d5:44:17:e1:28:1e:37:93:63:fa:ec:45:17:39:\n e5:ff:62:90:6b:b2:eb:11:5b:32:b2:ce:51:0b:8a:\n 3e:95\n Exponent: 65537 (0x10001)\n Attributes:\n a0:00\n Signature Algorithm: sha1WithRSAEncryption\n 41:bd:99:89:7a:1b:c2:71:90:f7:5a:17:05:c9:77:c8:f0:0e:\n 62:0f:85:0d:fb:16:02:74:34:5f:7a:93:3e:50:8e:cf:f4:6f:\n ee:ab:7b:c9:ef:7c:76:59:dd:85:fd:7d:4e:ac:95:9d:b7:ae:\n 8a:89:fc:1f:5b:ee:ee:6b:cd:9b:4e:2d:2a:fb:1b:32:8f:8f:\n 56:70:d1:42:c1:72:ed:04:4b:27:5a:ee:5a:e1:2b:6e:53:59:\n aa:14:25:87:7f:2b:c3:7a:f5:b2:6c:71:2a:93:62:40:ca:87:\n b4:fe:34:a1:95:77:1e:98:f1:71:5e:14:97:61:73:07:8d:bc:\n 3e:e1:f8:47:f7:00:8b:06:a5:1c:84:a3:88:9a:7b:37:74:5d:\n 34:a6:ae:22:ab:a3:b8:9f:d7:ab:60:9a:70:81:15:13:0f:d9:\n ff:ab:7a:2b:fd:cb:96:04:ad:00:6b:e4:74:4e:59:57:a5:9e:\n 84:c7:74:d8:62:08:37:b3:ee:cc:74:b2:b6:26:e8:c0:37:32:\n 19:dc:1c:ff:97:4a:cc:1c:36:c3:a7:2d:ca:77:53:c4:1d:1c:\n 3c:36:5b:f8:90:46:01:48:49:61:9b:ef:bb:b3:a8:94:0b:3f:\n 50:51:93:29:9f:aa:9a:ab:ae:3d:3c:72:8a:0b:bc:2f:3f:19:\n d7:5d:70:14\n"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function changes a certificate signing request's (CSR) friendly name.
Important:
friendly_name or id parameter.| friendly_name required | string Example: friendly_name=TestCSR The CSR's friendly name. |
| id required | string Example: id=example_com_eda9d_543fb_a3009b4b01a592390866ab3a47c0df18 The CSR's ID. Note: To retrieve a CSR's ID, use the UAPI |
| new_friendly_name required | string Example: new_friendly_name=TestCSR2 The CSR's new friendly name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_csr_friendly_name \ friendly_name='TestCSR' \ id='example_com_eda9d_543fb_a3009b4b01a592390866ab3a47c0df18' \ new_friendly_name='TestCSR2'
{- "apiversion": 3,
- "func": "set_csr_friendly_name",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a private key.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestKey The key's friendly name. Note: You must use either the |
| id | string Example: id=example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041 The key's ID. Note: You must use either the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ show_key
{- "apiversion": 3,
- "func": "show_key",
- "module": "SSL",
- "result": {
- "data": {
- "details": {
- "created": 1365633415,
- "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestKey",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIJJwIBAAKCAgEA4yilqsoCdEpiNOyLcPJ4FLT7vgwaLdOBeJLTMUeV2uZM4v65\n/tiZe7H0soDp1C55SCr3uEIEa7Lq7RUZ+F5p67BgRR19rmerKGxfN7N5Vu97pfTw\nW1f+lVsxUF/56lVeoAmm4okU98xJHiGGlI8ZHGJbUMYfLPy0OrA+gNwMHqMVOv1B\nSgpbEWCILMvnvtp0rwPutjnPVX2Dj40ia40L4Wqvp+0Yg7mZyhIOl+q6VZVIdXZs\nlR4ZywfRBYt3ieFBDYMyNw9wN3Xy44fCpHc77+ho84W3BqrGaWSSDyf6UkZGD5mf\nohGf2JSp+c8J6H7hsxo7pta3K1diVXFOSfnaA+k56zW445XruwYs/SN/zvGetGi6\nuqhMAcVRQcYCmLCixcC6RkcUx3exxgR4q3gthDnFvWC4+NuTh8/K0BcxcuCEhRug\n/MfVfO3+f7RJFSJPFb9m9Lf4HHBSVkDP5WtG4XiBKCe++9Wuvxbd4QxS7YrnSopN\nKxkuHKswH8ONpADMYDqfLODMhNrslHNHu95Nv7AlQr8weLqMGWMp7GFqzXcl39Rn\nVkF4Bxd3bAAsMN8/JvanMKCPjTTDrfzVFZcmHXPYOljYDdY1xfIstYVtbyFkUHZP\n2RPPBaPUAt90lzrKGVF8a2vdIKRiey5SZ5qu9c/mGri3oz7Lkk7qkNPAqDMCAwEA\nA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EFJnQH5H\nzxaQjWbsjm2uz0KROPNIK1X5L8kypsb+EzlJtvWUqxPaOaTv4DZVpFaVzk8/2PPG\nsYR3mUjqMqNFYMrNwYZAXvJ/huzDPqq6+w2Pn9jcAifHNw3S8UR650v8gl7BU4fV\nBvhamG8JelvwLqeGWoikST9NBXVqG5IKBpUkUiFOMUNmRih9ooKvhy7GosoK8MWb\nmhWo1v8TTSXSagACUhAoIzb6mMN/VFC5WDbFx5AEB/G9tq/zmTqQkuo39dvgl30w\nyZGRNwc1aFf1Kxeven10/JN9ipp0mTa7NYSdn0RAe9ZRp5cCkgmktqmB0g==\n-----END RSA PRIVATE KEY-----",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048
}, - "text": "Private-Key: (2048 bit)\nmodulus:\n 00:b1:16:ee:3e:de:ff:41:3c:f2:cb:b5:c5:0a:3d:\n c8:0d:64:bc:02:9f:e1:90:c9:7f:da:e8:03:e6:2c:\n 47:9f:e4:ff:5e:0d:95:64:5d:32:c2:b7:c9:01:ae:\n 30:e5:17:da:82:78:f4:15:b9:46:40:eb:8b:99:5c:\n cc:4b:e4:2a:e4:ee:0e:28:29:01:79:ee:d4:90:bc:\n 5d:9e:ab:b0:46:7c:de:4f:df:b2:d7:d1:76:89:88:\n ad:f3:6c:36:f3:a0:07:8c:90:88:19:52:0a:68:a1:\n 4d:c0:26:9e:8d:53:70:91:83:87:f4:8a:d9:b5:0f:\n a7:ed:31:f3:8f:34:d2:ca:e7:d1:31:ea:42:17:5d:\n 4d:48:7d:b3:73:07:72:40:9a:58:55:c8:b3:b6:ff:\n c2:b5:f6:ba:64:bd:3e:06:62:42:cd:44:0b:d2:f1:\n 76:5e:bb:20:55:47:d4:10:86:2d:ec:6b:e7:d2:0e:\n 5d:99:48:ca:4d:66:35:e1:1a:db:1b:96:0a:41:64:\n aa:c4:1b:1f:9d:90:e3:2e:aa:70:61:f7:77:b6:7b:\n f7:44:22:d8:73:0b:53:84:63:c3:f4:a4:19:e2:07:\n f6:0b:42:8a:3d:70:cb:92:24:80:44:e7:36:5d:01:\n a2:e0:e5:cd:50:e1:f7:7c:5a:9a:b5:da:c4:0f:c4:\n 73:f5\npublicExponent: 65537 (0x10001)\nprivateExponent:\n 5b:c3:ae:21:16:1c:df:09:5e:27:01:41:e1:54:b2:\n 5d:7e:5d:8e:5e:9a:dc:14:0e:14:b9:35:8c:08:55:\n f5:1d:0c:d7:07:e2:e9:e7:01:6e:b5:1d:8b:a9:5f:\n dc:d6:c7:7b:e4:81:56:e0:72:ef:21:1f:6d:91:10:\n ac:22:c7:b7:69:44:1c:bb:62:f0:74:39:e1:e6:39:\n fd:06:aa:89:5c:1b:36:f8:8c:0c:19:96:7b:1e:40:\n 45:6b:45:ee:68:76:80:f8:44:0e:1a:dd:19:ea:bc:\n 07:5d:fb:ba:f0:09:dc:dd:73:8d:dc:85:83:b5:61:\n 27:20:43:3d:69:f9:f0:f9:e1:73:76:29:5a:b0:05:\n 23:65:47:e8:39:f0:21:be:17:84:73:0a:08:15:4e:\n 7b:e2:14:6a:72:c7:d3:13:ff:98:ee:96:c9:40:a3:\n d3:0d:6c:90:48:25:7c:79:74:bf:be:fa:18:62:4d:\n c9:95:d4:d9:1a:47:59:4b:98:9a:2f:95:94:f4:4e:\n 78:cc:39:ef:9f:f7:6e:eb:db:cb:e5:95:ef:8f:ee:\n 5b:bf:c7:2a:29:e5:76:16:28:53:04:8e:ef:3f:66:\n 6f:34:a1:21:09:d6:da:ac:dd:ad:8c:2e:72:78:87:\n 01:45:f2:fa:3b:b9:23:2d:cf:5f:66:dc:c7:1c:0b:\n e1\nprime1:\n 00:e9:14:c4:18:92:16:8e:ad:fd:cf:17:f0:8c:f7:\n 55:e0:58:3d:e3:cd:bd:4d:4e:00:64:ee:f0:cf:a5:\n b0:14:19:85:ea:03:a8:be:18:78:34:3b:04:8c:b8:\n be:9a:ee:fc:0a:3e:6f:d2:8f:8f:fd:31:2d:02:97:\n 6e:bb:18:5b:9c:6a:85:6e:25:95:a4:40:4e:0b:91:\n a1:c3:85:bd:84:0c:d5:72:34:13:12:d9:20:56:52:\n 06:53:aa:06:2d:d0:61:2b:0b:d9:94:c6:d7:62:0f:\n c9:7d:17:cc:81:39:b3:59:e5:ce:77:d5:8a:82:ab:\n 2d:37:8a:51:49:3a:aa:c7:37\nprime2:\n 00:c2:80:b7:b4:85:25:37:30:b4:45:f3:3a:69:cf:\n c3:86:43:89:db:d4:09:6b:72:54:a6:89:b4:a7:43:\n 3c:dd:da:c6:46:89:93:0a:05:9a:8c:d6:05:5c:6a:\n 4d:34:1e:84:5b:14:28:b7:ef:d2:be:a5:10:9c:5f:\n e7:35:fb:15:e2:9e:4a:60:0a:73:01:f0:55:6c:75:\n 25:8a:9b:b0:32:d3:28:41:11:e2:85:2d:f6:35:76:\n 6c:68:14:ba:02:98:44:82:e1:c6:ca:f7:07:78:ca:\n ff:1a:60:3a:e1:88:91:55:a1:ae:11:46:29:4b:f0:\n 0f:e0:de:8a:0d:26:91:5c:33\nexponent1:\n 1d:2a:ad:13:4a:0c:aa:94:19:43:b6:02:33:11:ac:\n 5c:63:8e:73:18:46:cd:0a:aa:bf:f6:aa:89:c1:79:\n 14:3a:d1:68:24:47:14:6a:a9:78:17:be:8d:01:7d:\n 50:94:01:54:22:d6:09:6a:4f:a1:66:6a:f4:7d:10:\n ad:36:f2:17:d3:b8:98:bc:f9:49:d1:86:32:aa:69:\n ac:b6:ea:ad:40:91:e1:35:a5:01:61:cc:4b:20:fe:\n 8b:af:a6:10:4b:98:2d:33:d1:69:6d:ac:7c:27:ef:\n 95:c8:c9:9d:8e:23:e4:66:fe:7c:3e:6b:93:c8:69:\n e3:1e:5a:e7:a8:00:c0:e7\nexponent2:\n 6d:2e:3b:f0:c5:5c:a2:a2:60:4f:73:bd:32:70:41:\n dd:38:44:46:75:bb:e3:e8:85:c4:06:40:b6:33:74:\n 13:45:1f:4f:b1:22:2c:da:00:6b:56:28:24:3c:37:\n a2:2e:0f:35:e1:17:0a:49:41:0f:6b:30:eb:d6:99:\n bf:1f:76:a5:83:1d:54:d4:08:c2:e9:d9:c9:cb:e8:\n 8a:e9:e1:fa:65:b5:8e:f1:2f:2a:7b:26:5d:d4:5f:\n fd:fc:c4:7d:78:63:dc:e4:47:e6:de:cb:fe:ee:54:\n 4c:c5:ff:c7:62:15:d2:ef:b2:fa:57:5c:0f:18:6e:\n 91:57:da:3e:8f:8b:c1:29\ncoefficient:\n 00:bd:71:a9:3c:18:7b:0c:93:ab:d5:bf:f3:be:ea:\n 35:45:86:ce:60:0f:67:b3:2d:ba:5f:cf:9f:b6:1a:\n 13:27:cb:da:e7:ad:f3:c7:c2:06:7c:9e:00:d5:6c:\n 07:74:71:2c:35:39:c9:4b:24:cc:11:fd:60:c2:a2:\n 0b:28:b9:8b:4d:48:c6:0d:f0:39:34:dc:e2:c9:3a:\n b8:c6:64:0a:17:df:c4:f1:3d:fb:18:0b:af:ed:27:\n 3f:98:3b:e1:24:72:fc:5d:af:2c:e3:b6:07:3e:e1:\n 2f:fe:db:44:b0:8b:c3:e5:72:82:e5:a4:4a:3a:37:\n 8f:c4:9f:db:e9:1c:33:6a:f3\n"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function uploads a certificate.
Important:
| crt required | string <pem-certificate> Example: crt="-----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QhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2agqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPaKm6r7YmwfLN/YMZBHXSR58oOGP9W/n-----END CERTIFICATE-----" The certificate's contents. |
| friendly_name | string Example: friendly_name=TestCert The certificate's friendly name. |
The certificate's contents.
| crt | string <pem-certificate> The certificate file. |
| friendly_name | string The certificate's friendly name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --input=json --output=jsonpretty \ --user=username \ SSL \ upload_cert
{- "apiversion": 3,
- "func": "upload_cert",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1569844800,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "is_self_signed": 1,
- "issuer.commonName": "VeriSign Trial Secure Server CA - G2",
- "issuer.organizationName": "VeriSign, Inc.",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1601467200,
- "not_before": 1569844800,
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "validation_type": "dv"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function uploads a private key.
Note:
Due to the limited field length of HTTP GET method calls, you must use the HTTP POST method. For this reason, you cannot use a cPanel or Webmail session URL to call this function.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| friendly_name | string Example: friendly_name=TestKey The key's friendly name. |
| key required | string <pem-private-key> Example: key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAyeiHvMuJuVk8ZEY6wMzUS1g0eWaHaIWmIRe+Qrn6SwiRrm1p\npsJCiGPPPQGOSg4FzrMXqE0zsi/Tk3hUO/EEsi7CcZe8cUanjlUeXhiwrb86FCMF\nOb9siRHQvlss7VCg8ZGXXTWZgf5yD3A1xPwdayYwF2Tc7GkNcZGUAI58geuYaq+U\nGiLczRGZep1IQ0b1cZnqDvGMx6AS6hiDqLISjnmXYY2OhG6Uyp+SuinjYzLPJ6eO\nN/7i9qqbcGmt0ssddmhR897+bTEom5SlSuyi03KZ9Rn4ZmNJgOsup9MclSBGxBys\nb6MuuM3N0/tF5QuwmDc8H6h2rNBP9vGV7RTTXQIDAQABAoIBAFS/WVoRRLmbjxG3\nuKl8UA9f8oaSVnu0vUpeoOl5Dmm4Kw2/tvzbxPlii3Xb1VGYGS/tVBy8atp74J6h\nfxm5zHLN1afAPMR/F41ShPCSBHapMUOKf4MBqhjOdYOw2Way1RsQNSxWdxxtJIr+\nWlNYTzDOUpk/KMvCPHZS2IBzTidpcFpDQ3pyDXjOoKJJH0EQWPtvxJNGrFqmU29D\n9WBqQemHnDrzg3s7JzQ5cGpbbCE+QX8IckNkslAkyhm771CtqWdeo+c45e6YfGcx\nKuAy1zGSVzQBuitzYoMUOL5olXLEj8fHzXd/cZP4yCyyabcGz2vi6luxF+28l1OL\nG1axyLECgYEA+bD5B+Y/Dp5hZ/uVR1bbvyraQpwbDesS1zgnJ53KOIl926dnWzIt\nUvM46+c9IF+UJrtzwIB6IvjAQioNFrK36bHgNGzNf9WQ54NN172qveaFLdW34z/i\nGR2ix/efm9OC41QREQ/5IKV07TibCwVazVBWascMPkH7FnguTvTCiosCgYEAzwJ+\nGPlIWjK+sqkK5JMUyuH43qAvgVfkZV906JpNRQH0Mob3bC0nXN95EoTwWXk68ULT\no1GHv9XLbj8e+Ok7kpJQZT5vEZnDN+cy3jdTLCvcjU5Q3ToImOTp9isSAFWRTbtk\nyabLNoIIsTR/ZwwPFTZcRiK2d8k7ZhcRKdfGnrcCgYAPZ06FoTukoDqsGoYkB4S4\n72DVmSHGIwlfg5ROylouULUV9ubWZmsLYfvR+cr4k0zlcsz6RDLEs4nQyx1RmCbm\nYNXPBiNLTpaI4b3MoGPHIVB3+mZEu60sFXr0UR9kkpDRi18eKVkaHXrwI3zVGjh2\n0Az0u2DS+mkOAs4AivLxbwKBgQC0XPqbLc+Bb0dCCREJmLD8GCkrZ6wcaQUB4krN\nQ2vhnVM0Fu5K3Yi3XapynUuA2aSmgtA9MxMw7MkjlHGa9DPIgBz2KZDCaBN0iMeE\nX/XivZCbucmxBxhohsLmjh5QFj3U2Vp2bBIQuvlx1EjQ8uvNUqDRJvuOoNFVIPH+\nYBeZPwKBgA//kXfNtNMHOpch699i3rgTzbRFDmGwsr1otzvJsXw7Pr2bM4WIzUJy\nG2SUSUlQRSZK4+BBKT9S0d7TynJD6X/6R7IBotZbfXs1myYxEsKj89/BQmr47x2h\nHjYVCClNoJlsbd5C2yu1R3PikweWGoVaxE3c+AN5knqjwJ0g21Cf\n-----END RSA PRIVATE KEY-----" The key's contents. |
The certificate's contents.
| crt | string <pem-private-key> The key's contents. |
| friendly_name | string The key's friendly name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --input=json --output=jsonpretty \ --user=username \ SSL \ upload_key
{- "apiversion": 3,
- "func": "upload_key",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1569844800,
- "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestKey",
- "id": "bbe7e_16e2d_df7539f280eb1ecf6c1096190e41ada7",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function checks whether the account's domains can pass Domain Control Validation (DCV) via an HTTP request.
| dcv_file_allowed_characters | Array of strings Default: "A&dcv_file_allowed_characters=B&dcv_file_allowed_characters=C&dcv_file_allowed_characters=D&dcv_file_allowed_characters=E&dcv_file_allowed_characters=F&dcv_file_allowed_characters=G&dcv_file_allowed_characters=H&dcv_file_allowed_characters=I&dcv_file_allowed_characters=J&dcv_file_allowed_characters=K&dcv_file_allowed_characters=L&dcv_file_allowed_characters=M&dcv_file_allowed_characters=N&dcv_file_allowed_characters=O&dcv_file_allowed_characters=P&dcv_file_allowed_characters=Q&dcv_file_allowed_characters=R&dcv_file_allowed_characters=S&dcv_file_allowed_characters=T&dcv_file_allowed_characters=U&dcv_file_allowed_characters=V&dcv_file_allowed_characters=W&dcv_file_allowed_characters=X&dcv_file_allowed_characters=Y&dcv_file_allowed_characters=Z&dcv_file_allowed_characters=0&dcv_file_allowed_characters=1&dcv_file_allowed_characters=2&dcv_file_allowed_characters=3&dcv_file_allowed_characters=4&dcv_file_allowed_characters=5&dcv_file_allowed_characters=6&dcv_file_allowed_characters=7&dcv_file_allowed_characters=8&dcv_file_allowed_characters=9" An array of characters that the certificate provider allows in the DCV check file's filename. |
| dcv_file_extension | string Default: "" Example: dcv_file_extension=txt The DCV check file extension that the certificate provider requires. |
| dcv_file_random_character_count | integer >= 1 Default: 100 Example: dcv_file_random_character_count=32 The number of characters that the certificate provider allows in the DCV check file's filename. |
| dcv_file_relative_path | string Default: ".well-known/pki-validation" Example: dcv_file_relative_path=.well-known/pki-validation The DCV check file's file path, relative to the domain's document |
| dcv_max_redirects | integer or null >= 0 Default: null Example: dcv_max_redirects=2 The number of domain redirects the system permits the DCV check to follow. The function checks the provider's supported number of redirects.
It will then return the Note:
|
| dcv_user_agent_string | string Example: dcv_user_agent_string=SECTIGO+DCV The user agent string that the system uses for the imitated local DCV check. Important: The default value can change at any time. |
| domain required | string <domain> Examples:
The domains to check. Note: To check more than one domain, repeat or increment the parameter name. For
example, |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DCV \ check_domains_via_http \ domain='example.com'
{- "apiversion": 3,
- "func": "check_domains_via_http",
- "module": "DCV",
- "result": {
- "data": [
- {
- "failure_reason": "The system queried for a temporary file at http://example.com/.well-known/pki-validationD01511F4E E535A5442FC378AA946CF41.txt, but the web server responded with the following error: 404 (Not Found). A DNS (Domain Name System) or web server misconfiguration may exist. The domain example.com resolved to an IP address 93.184.216.34 that does not exist on this server.",
- "redirects": [
- {
- "content": "<!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML 2.0//EN\\\">\\n<html><head>\\n<title>301 Moved Permanently</title>\\n </head><body>\\n<h1>Moved Permanently</h1>\\n <p>The document has moved <a href=\\\"http://www.example.com/.well-known/pki-validation/770102 17B0CCF0CCF6211602F9A1B2B2.txt\\\">here</a>.</p>\\n</body></html>\\n",
- "headers": { },
- "protocol": "HTTP/1.1",
- "reason": "Moved Permanently",
- "redirects": null,
- "status": 301,
- "success": "",
}
], - "redirects_count": 0
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function indicates whether the account's domains can pass a Domain Control Validation (DCV) check.
Warning:
We deprecated this function. Use UAPI's DCV::check_domains_via_http function.
| domain required | string Examples:
The domains to check. Note: To check multiple domains, duplicate or increment the parameter name. For example,
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DCV \ ensure_domains_can_pass_dcv \ domain='example.com'
{- "apiversion": 3,
- "func": "ensure_domains_can_pass_dcv",
- "module": "DCV",
- "result": {
- "data": [
- null,
- null,
- "The domain resolves to Mars. Beep beep beep."
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function checks whether the account's domains can pass Domain Control Validation (DCV) via a DNS request.
| domain required | string <domain> Examples:
The domain or domains to check. Note: To check multiple domains, increment the parameter name. For example, |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ DCV \ check_domains_via_dns \ domain='example.com'
{- "apiversion": 3,
- "func": "check_domains_via_dns",
- "module": "DCV",
- "result": {
- "data": [
- {
- "dcv_string": "_dcv-test-record=wsWRlG9IsG7KNnLdIsx9Oz2oTw8m5q0imRR9L6LnDBz14sZelvDHqrJyJc6LA0DY",
- "domain": "example.com",
- "failure_reason": "The DNS query to _dcv-test-record.example2.org for the DCV challenge returned no TXT record that matches the value _dcv-test-record=wRUFPTN1DskKDG8KHfYM_5cQF5QUGWq1_A2ovO8rKsrIYO_HilAjsQABFCrbJkLX.",
- "query_results": [
- "_dcv-test-record=wsWRlG9IsG7KNnLdIsx9Oz2oTw8m5q0imRR9L6LnDBz14sZelvDHqrJyJc6LA0DY"
], - "succeeded": 1,
- "zone": "example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function replaces a custom SSL certificate with an AutoSSL-managed certificate. This is an atomic operation that:
The domain never loses HTTPS capability because a replacement certificate is installed immediately after the custom certificate is removed.
Note:
You cannot reset the SSL certificate for temporary domains.
Important:
This function requires both the autossl and sslinstall features.
| domain required | string <domain> Example: domain=example.com The domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ reset_certificate \ domain='example.com'
{- "apiversion": 3,
- "func": "reset_certificate",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": [
- "The system removed the custom SSL certificate and scheduled a replacement."
], - "metadata": { },
- "status": 1,
- "warnings": null
}
}This function determines whether the system can automatically redirect domains on a cPanel account to use SSL.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ can_ssl_redirect
{- "apiversion": 3,
- "func": "can_ssl_redirect",
- "module": "SSL",
- "result": {
- "data": 1,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes SSL from a domain.
Note:
This function removes domains from the current certificate to end SSL coverage for those
domains. To delete certificates from SSL storage, use the UAPI function SSL::delete_cert
instead.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ delete_ssl \ domain='example.com'
{- "apiversion": 3,
- "func": "delete_ssl",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": [
- "The SSL host was successfully removed."
], - "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the best-available certificate for the domain. The function also retrieves the certificate's associated private key and CA bundle, if available.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain name. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ fetch_best_for_domain \ domain='example.com'
{- "apiversion": 3,
- "func": "fetch_best_for_domain",
- "module": "SSL",
- "result": {
- "data": {
- "cab": "-----BEGIN CERTIFICATE-----\nMIID/DCCAuSgZwBBAvIFANEXIaYwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL\nZXhhbXBsZS5jb20wHhcNMjAwNDA2MTY0NDU2WhcNMjEwNDA2MTY0NDU2WjAWMRQw\nEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBALuCGWz/aFOr5TPBehISu3LkcGvnNFg9eY8rVXbNFfpBzyzdWrx5IiMtBcDx\nAZXMOU7GSZyFhSB6cjNfCaESXC/gBTa0sZ/b4b4etNUlNHUFAatb9WckQ6AtWbVA\npxu8aw/5AjAKgMbkaNrUY3vzLzin11CyGOFkbAKwVqT13Z3Yyz/xuz7x2+yMwPBh\n9mEP0tXjvCz7NzETFSTysn9Sf+VjUle0upnpl8Q7GK52CDpvwdqE/O6MrTx/XrXm\nYUfeSkZd+nqFm4oxmrf01hOL2IlEit1RupILwVm2/8CK2sAdazTqh4LapA962b9V\nSKm31YbsGT3kQg5EERbjIgiN6M8CAwEAAaOCAU8wggFLMB0GA1UdDgQWBBRhFUQb\nh7YE6tgcpiHke60td96d4zAJBgNVHRMEAjAAMEIGA1UdIwQ7MDmAFGEVRBuHtgTq\n2BymIeR7rS133p3joRqkGDAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbYIFANEXIaYw\nHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIG7BgNVHREEgbMwgbCCC2V4\nYW1wbGUuY29tghBtYWlsLmV4YW1wbGUuY29tgg93d3cuZXhhbXBsZS5jb22CEmNw\nYW5lbC5leGFtcGxlLmNvbYITd2V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Tqh4LapA962b9V\nSKm31YbsGT3kQg5EERbjIgiN6M8CAwEAAaOCAU8wggFLMB0GA1UdDgQWBBRhFUQb\nh7YE6tgcpiHke60td96d4zAJBgNVHRMEAjAAMEIGA1UdIwQ7MDmAFGEVRBuHtgTq\n2BymIeR7rS133p3joRqkGDAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbYIFANEXIaYw\nHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMIG7BgNVHREEgbMwgbCCC2V4\nYW1wbGUuY29tghBtYWlsLmV4YW1wbGUuY29tgg93d3cuZXhhbXBsZS5jb22CEmNw\nYW5lbC5leGFtcGxlLmNvbYITd2VibWFpbC5leGFtcGxlLmNvbYITd2ViZGlzay5l\neGFtcGxlLmNvbYIWY3Bjb250YWN0cy5leGFtcGxlLmNvbYIXY3BjYWxlbmRhcnMu\nZXhhbXBsZS5jb22CD3dobS5leGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEA\nT0TaI0ypM3eqtRSddgyoy5+nXi8a7a6xFKrwEAljBua3rNR6fOfedMOg9NFwCmQD\nw96/eZJjq+xMh57yLEGu05OBbyFVsdu2AXVhwHeBaURrGn5p7IjNMjdB+ld+oCmU\nex6iisbsfxwUqa7y2vqTU5XaUiXfccqEz8ofvuTcqNs8bgGn0Tm90XbgGnPVd7zl\nGm4t7Gf2pvMNd2R1prJ07z42bp/z8E2DcFhb/RPnblFOhJ8jPspxYK4G5XmwwYZD\n79NDK47OyG3hTiinxroKMjqIgnLT4ZabDMGHJkcg5xOL/VdYi7ZGHAnBEwA8eadO\ndh3jFPxGGIBJTTmKIScSbg==\n-----END CERTIFICATE-----",
- "crt_origin": "username",
- "domain": "example.com",
- "ip": "192.168.0.1",
- "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBBCKAAQNAu4IZbP0oU6vlM8F6EhK9cuRrs+c1WD24jytPds0V+kH+LN1a\nvHkiIy0FwPABlcw5TrZJnIWFIHpyM18JoRJ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KsfrIEYeL7FyeyyCd3dn6D4e0FLM6jwWTDln0iczalPbB7lEgrMpO0vv8ADsCD\nK6rX1ZxZoWoOQwF8zmRAcQKBgQC85weoJpOfXAt5zlq1+ulPKOXKs3NGfVG3bjOp\n4SuT2FvKad19b0EqZSDzR/ylIkQgvHyD/8BXexNMh9tE4aFys8UF6BMq4dnUqCiC\nDtgxJ575IY8+NKq5xcV+HenbO2KbC7RIDZqAkQauc3+o947ZvhhXKQcTJmF6pY+Y\nlLM/hQKBgQCplo1rGsimNitBb2iw2B+jDJoMBLYjWeZWcr8VMwVlN9DXPG19uXKq\nCsbrteMX3VedbeRYk/NITsasRefZq7JDSe9JbsPxj3I+/nzV0EbMXX9cxJL3hkCc\n5QAmE/BMR7yh0odK57o+mcQZtecIEO1BK/qW6Au0otQHPraygGCwkQ==\n-----END RSA PRIVATE KEY-----",
- "key_origin": "username",
- "searched_users": [
- "username"
], - "status": 1,
- "statusmsg": "ok",
- "user": "username"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function extracts the private key and CA bundle information from a certificate.
Note:
Due to the limited field length of HTTP GET method calls, you must use the HTTP POST method. For this reason, you cannot use a cPanel or Webmail session URL to call this function.
| certificate required | string <pem-certificate> Example: certificate=-----BEGIN CERTIFICATE-----MIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQIDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYyMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNVBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3PXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fWvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/daM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6PLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGjUDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3WhcDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVwFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2agqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPaKm6r7YmwfLN/YMZBHXSR58oOGP9W-----END CERTIFICATE----- An SSL certificate. |
The certificate's contents.
| certificate | string <pem-certificate> The certificate file. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --input=json --output=jsonpretty \ --user=username \ SSL \ fetch_key_and_cabundle_for_certificate
{- "apiversion": 3,
- "func": "fetch_key_and_cabundle_for_certificate",
- "module": "SSL",
- "result": {
- "data": {
- "cab": "-----BEGIN CERTIFICATE-----MIIB+jCCAWMCAgGj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WXpZ9E3PXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fWvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/daM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6PLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGjUDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3WhcDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVwFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2agqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPaKm6r7YmwfLN/YMZBHXSR58oOGP9W-----END CERTIFICATE-----",
- "crt_origin": "username",
- "domain": "example.com",
- "ip": "192.168.0.1",
- "key": "-----BEGIN RSA PRIVATE KEY-----MIIJJwIBAAKCAgEA4yilqsoCdEpiNOyLcPJ4FLT7vgwaLdOBeJLTMUeV2uZM4v65/tiZe7H0soDp1C55SCr3uEIEa7Lq7RUZ+F5p67BgRR19rmerKGxfN7N5Vu97pfTwW1f+lVsxUF/56lVeoAmm4okU98xJHiGGlI8ZHGJbUMYfLPy0OrA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/n5gKhIbt4D8q+9Zp0esyzGbT1d/c2rJHMwV1FMvzXkk5CwKs7enKl8FXMTRt4tXHtU8rl93JVq8+aY/YiJZuBAoIBAERG2lz7IFjeFHVtpTDRwIqilTfP2P8wnMe4PhInrgxdbu16SrUJKZ98e1I5BBNc8G0AYONtSoGItMo0z1phpkQ/GERLM8aplOB6qJ5XGg6VOuStHgwvfQOtPIp/nQvu9OK7/XRwj3Phu2KESiCyEXdAdDwDsdbdZLJXHwcqoh4Pf9EK2zW/seNIfBVJb9K5yHiZzicTZRQvhxBUw2T6MloCpH4GFM8GM3OHEV4pgeqSSvLxnLjFVmAq5EKL5Ei4cdjkExvj3aZH90N8KicOPgH8SkVhN8OL/Prein5c/LaKJV+8kEUzpTS1xc45cEGCteMsfjD97QINzpG0jgopUVECggEADIaKsx8NUQT3hm0wHRanEFJnQH5HzxaQjWbsjm2uz0KROPNIK1X5L8kypsb+EzlJtvWUqxPaOaTv4DZVpFaVzk8/2PPGsYR3mUjqMqNFYMrNwYZAXvJ/huzDPqq6+w2Pn9jcAifHNw3S8UR650v8gl7BU4fVBvhamG8JelvwLqeGWoikST9NBXVqG5IKBpUkUiFOMUNmRih9ooKvhy7GosoK8MWbmhWo1v8TTSXSagACUhAoIzb6mMN/VFC5WDbFx5AEB/G9tq/zmTqQkuo39dvgl30wyZGRNwc1aFf1Kxeven10/JN9ipp0mTa7NYSdn0RAe9ZRp5cCkgmktqmB0g==-----END RSA PRIVATE KEY-----",
- "key_origin": "username",
- "searched_users": [
- "username"
], - "status": 1,
- "statusmsg": "ok",
- "user": "username"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the certificate information for all fully qualified domain names (FQDNs) that the account owns.
| domains required | string Examples:
A domain or comma-delimited list of domains for which to retrieve information. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ fetch_certificates_for_fqdns \ domains='example.com'
{- "apiversion": 3,
- "func": "fetch_certificates_for_fqdns",
- "module": "SSL",
- "result": {
- "data": [
- {
- "cab": "-----BEGIN CERTIFICATE-----\nMIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD\nVQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv\nb3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV\nUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU\ncnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv\nRLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M\nypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5\n1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz\ndcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl\nIjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy\nbW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY\n-----END CERTIFICATE-----",
- "created": 1496950287,
- "crt": "-----BEGIN CERTIFICATE-----\nMIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJ\nc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQI\nDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYy\nMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNV\nBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0G\nCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3P\nXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fW\nvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/da\nM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC\n+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6\nPLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGj\nUDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw\n+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA\nA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3Wh\ncDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVw\nFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh\n/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2ag\nqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPa\nKm6r7YmwfLN/YMZBHXSR58oOGP9W\n-----END CERTIFICATE-----",
- "domain_is_configured": 1,
- "domains": [
- "example.servername.com",
- "example.com",
- "mail.example.com",
- "www.example.com",
- "www.example.servername.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "Cert for example.servername.com",
- "id": "example_servername_com_ce52d_6e643_2813308004_119580f9b01960cjones72bc519206bc",
- "is_self_signed": 1,
- "issuer.commonName": "example.servername.com",
- "issuer.organizationName": "Organization",
- "issuer_text": "stateOrProvinceName\\nTX\\nlocalityName\\nHouston\\ncountryName\\nUS\\ncommonName\\nexample.com\\norganizationName\\ncPanel",
- "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIJJwIBAAKCAgEA4yilqsoCdEpiNOyLcPJ4FLT7vgwaLdOBeJLTMUeV2uZM4v65/tiZe7H0soDp1C55SCr3uEIEa7Lq7RUZ+F5p67BgRR19rmerKGxfN7N5Vu97pfTwW1f+lVsxUF/56lVeoAmm4okU98xJHiGGlI8ZHGJbUMYfLPy0OrA+gNwMHqMVOv1BSgpbEWCILMvnvtp0rwPutjnPVX2Dj40ia40L4Wqvp+0Yg7mZyhIOl+q6VZVIdXZslR4ZywfRBYt3ieFBDYMyNw9wN3Xy44fCpHc77+ho84W3BqrGaWSSDyf6UkZGD5mfohGf2JSp+c8J6H7hsxo7pta3K1diVXFOSfnaA+k56zW445XruwYs/SN/zvGetGi6uqhMAcVRQcYCmLCixcC6RkcUx3exxgR4q3gthDnFvWC4+NuTh8/K0BcxcuCEhRug/MfVfO3+f7RJFSJPFb9m9Lf4HHBSVkDP5WtG4XiBKCe++9Wuvxbd4QxS7YrnSopNKxkuHKswH8ONpADMYDqfLODMhNrslHNHu95Nv7AlQr8weLqMGWMp7GFqzXcl39RnVkF4Bxd3bAAsMN8/JvanMKCPjTTDrfzVFZcmHXPYOljYDdY1xfIstYVtbyFkUHZP2RPPBaPUAt90lzrKGVF8a2vdIKRiey5SZ5qu9c/mGri3oz7Lkk7qkNPAqDMCAwEAAQKCAgA3f9raG3j2CKZt381Bzzvfc0h+al6LC736Q4Ut6RuH2/S1ER9IUItPWW87nZuDp8ciBr13W0nRNmmHezxZHlgqqXEb8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5IKBpUkUiFOMUNmRih9ooKvhy7GosoK8MWbmhWo1v8TTSXSagACUhAoIzb6mMN/VFC5WDbFx5AEB/G9tq/zmTqQkuo39dvgl30wyZGRNwc1aFf1Kxeven10/JN9ipp0mTa7NYSdn0RAe9ZRp5cCkgmktqmB0g==\n-----END RSA PRIVATE KEY-----",
- "key_algorithm": "rsaEncryption",
- "modulus": "ce52db786fd2776f69057ed8ee0d8ab267a2f328a66a3afd8\n76017a99d061ec5d24d646f80ec258c696cb742e2bcd2fef920177144d9126a4\n779c1a21ca5589ff06e673556116903493100dfba385a62d11aeec57f47e5b20\nad8d1142fbe93f003fb62403cdcc0012ccd407009ac21639623bc52a5d6d3814\nff9c45a7c246799f0229b4854af2aeddfa755ab13814132424f5b1680f2c357e\n1476af7422bd5863102cfc5982b3ddad7fecdeae5c1cb73789008be9ce2f24fe\n27c9202b3bca6524ba29a30972f14cbf06f0a1b7998c2361ed90221f40829faf\n644adc7b8da6f948d8745ffbe8e5b6f0c8e7ea9ef2bc26413f90666ef1200407\neab7c3b71c6e643",
- "modulus_length": 2048,
- "not_after": 1528486286,
- "not_before": 1496950286,
- "serial": "01e57e4d92",
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.servername.com",
- "subject_text": "stateOrProvinceName\\nTX\\nlocalityName\\nHouston\\ncountryName\\nUS\\ncommonName\\nexample.com\\norganizationName\\ncPanel",
- "validation_type": "dv",
- "verify_error": "DEPTH_ZERO_SELF_SIGNED_CERT"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves SSL certificates for a private key.
Note:
When you call this function, you must include either the id
or the friendly_name parameter.
| friendly_name | string Example: friendly_name=TestKey The key's friendly name. |
| id | string Example: id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ find_certificates_for_key
{- "apiversion": 3,
- "func": "find_certificates_for_key",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1538308800,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "The Example Organization",
- "issuer_text": "countryName\nUS\ncommonName\u001bxample.com\nlocalityName\nHouston\norganizationName\ncPanel\nstateOrProvinceName\ntx",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1569844800,
- "not_before": 1538308800,
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "subject_text": "countryName\nUS\ncommonName\u001bxample.com\nlocalityName\nHouston\norganizationName\ncPanel\nstateOrProvinceName\ntx",
- "validation_type": "dv"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves certificate signing requests (CSR) for a private key.
Note:
When you call this function, you must include either the id
or the friendly_name parameter.
| friendly_name | string Example: friendly_name=TestKey The key's friendly name. |
| id | string Example: id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The key's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ find_csrs_for_key
{- "apiversion": 3,
- "func": "find_csrs_for_key",
- "module": "SSL",
- "result": {
- "data": [
- {
- "commonName": "example.com",
- "created": 1538265600,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCSR",
- "id": "example_com_a74f7_9dddf_2c5d1615e85db817d6b640f65335fb62",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves a certificate's Certificate Authority (CA) bundle and hostname.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| cert required | string <pem-certificate> Example: cert=-----BEGIN CERTIFICATE-----\r\nMIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJ\r\nc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQI\r\nDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYy\r\nMj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- The certificate's text. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty --user=username SSL get_cabundle cert='-----BEGIN CERTIFICATE-----\r\nMIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJ\r\nc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQI\r\nDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYy\r\nMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNV\r\nBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0G\r\nCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3P\r\nXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fW\r\nvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/da\r\nM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC\r\n+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6\r\nPLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGj\r\nUDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw\r\n+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA\r\nA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3Wh\r\ncDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVw\r\nFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh\r\n/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2ag\r\nqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPa\r\nKm6r7YmwfLN/YMZBHXSR58oOGP9W\r\n-----END CERTIFICATE-----'
{- "apiversion": 3,
- "func": "get_cabundle",
- "module": "SSL",
- "result": {
- "data": {
- "bundle": "VeriSign Trial Secure Server CA - G2",
- "cab": "-----BEGIN CERTIFICATE----- MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY -----END CERTIFICATE-----",
- "domain": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the most secure domain for a service.
| add_mail_subdomain | integer Default: 0 Possible Values: 1 0 Example: add_mail_subdomain=0 Whether to append For example, if you specify the domain
|
required | string or string or string Example: domain=example.com A domain name, cPanel username, or email address. |
| service required | string Possible Values: "cpanel" "imap" "pop3" "smtp" Example: service=cpanel The service's name.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ get_cn_name \ domain='example.com' \ service='cpanel'
{- "apiversion": 3,
- "func": "get_cn_name",
- "module": "SSL",
- "result": {
- "data": {
- "cert_match_method": "hostname",
- "cert_valid_not_after": 1394288638,
- "is_currently_valid": 0,
- "is_self_signed": 1,
- "is_wild_card": 0,
- "ssldomain": "hostname.example.com",
- "ssldomain_matches_cert": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a list of the account's websites, their domains, and certificate information.
Important:
For a dedicated IP address, use the UAPI SSL::installed_host function.
Important:
When you disable the CalendarContact , MailReceive , WebDisk , Webmail , and WebServer roles, the system disables this function.
| hide_temporary_domains | integer Default: 0 Possible Values: 1 0 Example: hide_temporary_domains=1 Whether to hide temporary domains from the returned values.
If you set this parameter's value to |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ installed_hosts
{- "apiversion": 3,
- "func": "installed_hosts",
- "module": "SSL",
- "result": {
- "data": [
- {
- "certificate": {
- "auto_ssl_provider": "cPanel",
- "auto_ssl_provider_display_name": "Sectigo",
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "is_autossl": 1,
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "The Example Organization",
- "issuer_text": "example.com\ncountryName\nUS\nemailAddress\nusername@example.com\norganizationName\nExample\nstateOrProvinceName\nTexas\nlocalityName\nHouston",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1446659822,
- "not_before": 1415123822,
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "subject_text": "commonName\nexample.com",
- "validation_type": "dv"
}, - "certificate_text": "-----BEGIN CERTIFICATE-----\nMIIDcTCCAlmgAwIBAgIFAU+BNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJ\nc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQI\nDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYy\nMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNV\nBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0G\nCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3P\nXx3YHsjFEWW7e5pH0vZ+jVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD+o9fW\nvoK1tWJS72FSgPju+58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri/da\nM3PBWO8ET48FWkyU1kOeZaUlF67/+wrEiNgg+t1qhKOCAB61PdNVkLaSGHimksuC\n+Czk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB/F9ORe74yTzD+vlk0tFMG6\nPLj/ajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3/mgvit0v6dAgMBAAGj\nUDBOMB0GA1UdDgQWBBRw+wKBo34+bgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw\n+wKBo34+bgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA\nA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7/6DQ/I3hv3Wh\ncDDIO04I2/Xhe88MLBaLoM367Ya+vy7CaLr14aLi/SfQszMA0ALBvMao+Fis0iVw\nFYq/NLgSXw+fgnpFskt8v8iQZ+4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh\n/SD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ+Eioo3hhgwNavH2ag\nqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy/4oQNdg6fOq4l/FrajBv+WkzDVPa\nKm6r7YmwfLN/YMZBHXSR58oOGP9W\n-----END CERTIFICATE-----",
- "docroot": "/home/username/public_html",
- "domains": [
- "example.com"
], - "fqdns": [
- "www.example.com"
], - "ip": "192.168.0.1",
- "is_primary_on_ip": 1,
- "mail_sni_status": 1,
- "needs_sni": 0,
- "servername": "example.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves all of a certificate's available information.
Important:
friendly_name or id parameter.| friendly_name required | string Example: friendly_name=TestCert The certificate's human readable name. |
| id required | string Example: id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3 The certificate's ID. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ fetch_cert_info \ id='example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3' \ friendly_name='TestCert'
{- "apiversion": 3,
- "func": "fetch_cert_info",
- "module": "SSL",
- "result": {
- "data": {
- "cabundle": "-----BEGIN CERTIFICATE-----\nMIIB+DCCArDgBwIBAgIEWXcZhjANBgkzpkiG6w0BAQsFADATMREwDwYDVRRZZAhu\nZXcxLnRsZDAeFw1yMDAyMDcxMzE7MTdaFw0yMTAyMDYxMzE4MTdaMBMxETAPBgEJ\nBAMMCG5ldzEudGxkMIJBInANBgkqhkiG9w0BAQEFAAOKAR3AMIIBCgKCAQEA5n3Z\nUoGCgH48vcbZfrWtnrak4yOZk/UN45gc8bZGmqbzd3qKmGXkm11aW1ID2YKGKYjL\nmKt42HbXitlH6VhQcWviuYg+JIyTXDMLV0GiGpDT0uvde3YV21Ww2i5nzoFxWyVD\n67oize5gvq9gaw5nVj6UyZ0baIB01QeJ5x52xZyuSgiS0ssWlA3rvHx8wG0+1trR\naBwU0cn1cXP3ZMKzKus/yAUH4lMBFf8jgDzEWIwfMI5HmzUjg2kOPJQlBtZ1u0bJ\nGaKffWIMLs9Ux4p+f7FNeT/xJCHCTX7HpYDOyWwq109yHnD178NkywKoUvtx7f93\ntTI821mltPbC1PQUgQIDAQABo4IBIjCCAR4wHQYDVR0OBBYEFLThoqhCEONRK3X1\nFBgZ4gp+ESmJMAkGA1UdEwQCMAAwPgYDVR0jBDcwNYAUtOGiqEIQ41ErdfUUGBni\nCn4RKYmhF6QVMBMxETAPBgNVBAMMCG5ldzEudGxkggRZdxmGMB0GA1UdJQQWMBQG\nCCsGAQUFBwMBBggrBgEFBQcDAjCBkgYDVR0RBIGKMIGHg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kyQA5cn6QBBcAmo\nQL/hSrI20SGxumVXI8vIgCECgYAUJai9cx9LfsrAeoq5xY3Rev3FcAJ2XeVwYRuq\nWaRI2nFRe0TRl/+AOeOt7GW8lrJGpDwIa2NBp6KhFjAPW1AmwuVsvYg7z0bCRbcQ\nE3RaK/naGxTkbUqJqoFKatC0iSjqT88IQohOXnIU/GgEluoy1A/Bx/5asbVA4iCV\nZf6PjQKBgA0A3Q5lrWwuQlCXDiwsRLKSYEwgt5TFKfbiipB01m89PGd1ylz+Uzyn\niE01Cuar6yN9pJiTJ09Tmq3S2xxavY97KFHyu6R8/jHx4mZi9OMJfxffC+84q6d+\nXVABiqBs1l0ebWCsotdXoYDDQaVrCccxPfCjUCtPmgnarz11uhZo\n-----END RSA PRIVATE KEY-----",
- "subject.commonName_ip": "192.168.0.1"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists an account's certificates.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ list_certs
{- "apiversion": 3,
- "func": "list_certs",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1569884400,
- "domain_is_configured": 1,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCert",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "Organization",
- "issuer_text": "countryName\nUS\nstateOrProvinceName\nTX\nlocalityName\nHouston\norganizationName\nWebPros International, LLC\ncommonName\nWebPros International, LLC Certification Authority",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1601467200,
- "not_before": 1569844800,
- "serial": "45462cd0d6537b20cf2f3eb8aec07140",
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "subject_text": "commonName\nwww.example.com",
- "validation_type": "dv"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists an account's certificate signing requests (CSR).
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ list_csrs
{- "apiversion": 3,
- "func": "list_csrs",
- "module": "SSL",
- "result": {
- "data": [
- {
- "commonName": "example.com",
- "created": 1538265600,
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestCSR",
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves information about a certificate that is installed on a domain's dedicated IP address.
Important:
SSL::installed_hosts function.| domain | string <domain> Example: domain=example.com The domain name. Note: The parameter defaults to the account's main domain. |
| verify_certificate | integer Default: 0 Possible Values: 0 1 Example: verify_certificate=1 Verify the certificate.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ installed_host
{- "apiversion": 3,
- "func": "installed_host",
- "module": "SSL",
- "result": {
- "data": {
- "certificate": {
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041",
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "Organization",
- "issuer_text": "commonName\nexample.com\ncountryName\nUS\nemailAddress\nusername@example.com\norganizationName\nExample\nstateOrProvinceName\nTexas\nlocalityName\nHouston",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1397169490,
- "not_before": 1365633490,
- "signature_algorithm": "sha256WithRSAEncryption",
- "subject.commonName": "example.com",
- "subject_text": "commonName\nexample.com",
- "validation_type": "dv",
- "verify_error": ""
}, - "host": "example.com"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists an account's private keys.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ list_keys
{- "apiversion": 3,
- "func": "list_keys",
- "module": "SSL",
- "result": {
- "data": [
- {
- "created": 1569844800,
- "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "friendly_name": "TestKey",
- "id": "b116e_473f5_ad6b3bd9517fb157830d0e37a03bc596",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists SSL-related items on a domain.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
| domains | string Examples:
The domain name or names. |
| item | string Default: "key" Examples:
The SSL item type or types.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ list_ssl_items
{- "apiversion": 3,
- "func": "list_ssl_items",
- "module": "SSL",
- "result": {
- "data": [
- {
- "host": "example.com",
- "id": "example_com_a74f7_9dddf_1446659822_eae1ff43c4ec1991e195877c55755eff",
- "type": "key"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function rebuilds the account's SSL database.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ rebuildssldb
{- "apiversion": 3,
- "func": "rebuildssldb",
- "module": "SSL",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets a user’s preferred SSL/TLS key type.
| type required | string Possible Values: "system" "rsa-2048" "rsa-4096" "ecdsa-prime256v1" "ecdsa-secp384r1" Example: type=ecdsa-prime256v1 The key type to set.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ set_default_key_type \ type='ecdsa-prime256v1'
{- "apiversion": 3,
- "func": "set_default_key_type",
- "module": "SSL",
- "result": {
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables or disables secure redirects (HTTPS) for the cPanel account's domains that you specify.
Important:
To call this function, one of the following conditions must exist:
| domains required | string Example: domains=main.example,addon.example,addon.main.example A comma-separated list of the cPanel account's domains for which to enable or disable secure redirects. Important: To enable or disable redirects for addon domains, you must pass the addon domain and its subdomain. |
| state required | integer Possible Values: 0 1 Example: state=1 Whether to enable or disable redirects for the specified domains.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ SSL \ toggle_ssl_redirect_for_domains \ domains='main.example,addon.example,addon.main.example' \ state='1'
{- "apiversion": 3,
- "func": "toggle_ssl_redirect_for_domains",
- "module": "SSL",
- "result": {
- "data": [
- "main.example",
- "addon.example",
- "addon.main.example"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the daily AwStats statistics for a domain.
| domain required | string <domain> Example: domain=example.com The domain to retrieve statistics for. Must be owned by the current cPanel user. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Stats \ get_stats_daily \ domain='example.com'
{- "result": {
- "data": {
- "domain": "example.com",
- "stats": {
- "Wed Jan 31 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 81110,
- "hits": 6,
- "pages": 6,
- "visits": 5
}, - "Thu Feb 01 2024 18:00:00 GMT-0600 (Central Standard Time)": {
- "bandwidth": 888296,
- "hits": 43,
- "pages": 14,
- "visits": 7
}
}
}
}
}This function retrieves a list of bandwidth records for the domains on a cPanel account.
Note:
This function also returns the bandwidth use of a distributed cPanel account.
Warning:
This function requires the Bandwidth Stats feature. To enable this feature, use WHM's Feature Manager interface (WHM >> Home >> Packages >> Feature Manager).
| timezone | string Example: timezone=America/Chicago The timezone in which to report the data, in Olson tz format. Note: This parameter defaults to the server's timezone. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Stats \ get_bandwidth
{- "apiversion": 3,
- "func": "get_bandwidth",
- "module": "Stats",
- "result": {
- "data": [
- {
- "bytes": 74845,
- "domain": "example.com",
- "month_start": 1561957200,
- "protocol": "imap"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns entries from a domain's error log.
| domain required | string <domain> Example: domain=example.com The domain for which to return error log entries. |
| log | string Possible Values: "error" "suexec" Example: log=suexec The Apache log file to query. This parameter defaults to error.
|
| maxlines | integer [ 1 .. 5000 ] Default: 300 Example: maxlines=250 The number of lines to retrieve from the error log. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Stats \ get_site_errors \ domain='example.com'
{- "apiversion": 3,
- "func": "get_site_errors",
- "module": "Stats",
- "result": {
- "data": [
- {
- "date": 1234576704,
- "entry": "[Fri Feb 13 19:58:24.420593 2009] [core:error] [pid 29228:tid 47876185720577] (13)Permission denied: [client 10.0.0.2:62908] AH00132: file permissions deny server access: /home/user/public_html/index.html"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function displays the Analog statistics for the domains on a cPanel account.
| engine required | string Possible Values: "webalizer" "analog" Example: engine=webalizer The statistics engine.
|
| traffic | string Default: "http" Possible Values: "http" "ftp" Example: traffic=http The web traffic type.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Stats \ list_sites \ engine='webalizer'
{- "apiversion": 3,
- "func": "list_sites",
- "module": "Stats",
- "result": {
- "data": [
- {
- "all_domains": 1,
- "domain": "example.com",
- "path": "/tmp/user/webalizer/index.html",
- "ssl": 1
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a domain's Analog statistics.
| domain required | string <domain> Example: domain=example.com The domain from which to retrieve statistics. |
| engine required | string Value: "analog" Example: engine=analog The statistics engine. |
| ssl | integer Default: 1 Possible Values: 0 1 Example: ssl=1 Whether to return statistics from SSL requests.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Stats \ list_stats_by_domain \ engine='analog' \ domain='example.com'
{- "apiversion": 3,
- "func": "list_stats_by_domain",
- "module": "Stats",
- "result": {
- "data": [
- {
- "date": 1565795929,
- "url": "tmp/cptest/analog/8.html.com"
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the configuration of the web log anayzers for each domain on the cPanel account.
Important:
When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.
Note
Additional web log analyzer configuration such as if the user can edit their own configuration is provided in the metadata section of the return.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ StatsManager \ get_configuration
{- "apiversion": 3,
- "func": "get_configuration",
- "module": "StatsManager",
- "result": {
- "data": [
- {
- "analyzers": [
- {
- "enabled": 1,
- "enabled_by_user": 1,
- "name": "awstats"
}, - {
- "enabled": 0,
- "enabled_by_user": 0,
- "name": "analog"
}, - {
- "enabled": 0,
- "enabled_by_user": 1,
- "name": "webalizer"
}
], - "domain": "domain.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "analyzers": [
- {
- "available_for_user": 1,
- "enabled_by_default": 0,
- "name": "analog"
}, - {
- "available_for_user": 1,
- "enabled_by_default": 1,
- "name": "awstats"
}, - {
- "available_for_user": 1,
- "enabled_by_default": 0,
- "name": "webalizer"
}
], - "locked": 1,
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function saves the users choice about which web log anayzers are enabled for each domain on their cPanel users account. If the log anayzers are controlled by the reseller or root account, the user cannot manage which log analyzers are enabled or disabled.
Important:
When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.
List of domains and what web log analyzers to change.
Array of objects |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
{- "changes": [
- {
- "analyzers": [
- {
- "enabled": 1,
- "name": "awstats"
}, - {
- "enabled": 0,
- "name": "analog"
}, - {
- "enabled": 0,
- "name": "webalizer"
}
], - "domain": "domain.com"
}
]
}{- "apiversion": 3,
- "func": "save_configuration",
- "module": "StatsManager",
- "result": {
- "data": [
- {
- "analyzers": [
- {
- "available": 1,
- "enabled": 1,
- "locked": 0,
- "name": "awstats"
}, - {
- "available": 1,
- "enabled": 0,
- "locked": 0,
- "name": "analog"
}, - {
- "available": 0,
- "enabled": 0,
- "locked": 0,
- "name": "webalizer"
}
], - "domain": "user"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns all userdata key/value pairs for a given scope.
| scope required | string Example: scope=example_scope The scope name whose userdata you wish to retrieve. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ UserData \ get_scoped_userdata \ scope=ui_prefs
{- "apiversion": 3,
- "func": "get_scoped_userdata",
- "module": "UserData",
- "result": {
- "data": {
- "theme": "dark",
- "items_per_page": "50",
- "show_help_tour": "0"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets (creates or updates) a userdata key/value pair within a specified scope and returns the full updated mapping for that scope.
| json | string Example: json={"theme":"dark"} A json string to save to the specified scope. Note: The "json" argument cannot be used with the "key" or "value" arguments. |
| key | string Example: key=theme The userdata key to set. Note: The "json" argument cannot be used with the "key" or "value" arguments. |
| scope required | string Example: scope=example_scope The scope name to modify. |
| value | string Example: value=dark The value to assign to the key. Note: The "json" argument cannot be used with the "key" or "value" arguments. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ UserData \ set_scoped_userdata \ scope=ui_prefs \ key=theme \ value=dark
{- "apiversion": 3,
- "func": "set_scoped_userdata",
- "module": "UserData",
- "result": {
- "data": {
- "theme": "dark",
- "items_per_page": "50",
- "show_help_tour": "0"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a list of EasyApache 4 (EA4) configuration recommendations.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ EA4 \ get_recommendations
{- "apiversion": 3,
- "func": "get_recommendations",
- "module": "EA4",
- "result": {
- "data": {
- "ea-php55-php": [
- {
- "desc": "PHP DSO runs as the user [asis,nobody] by default. In a shared hosting environment, this is a security issue.",
- "level": "danger",
- "name": "PHP DSO",
- "on": "add",
- "options": [
- {
- "items": [
- "ea-apache24-mod_ruid2",
- "ea-apache24-mod_mpm_itk"
], - "level": "success",
- "recommended": true,
- "text": "We strongly recommend that you install one of the following packages unless this is a single-user system:"
}, - {
- "level": "warning",
- "recommended": false,
- "text": "If you use suPHP, you will add some security, but may experience performance issues on your server."
}
],
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a list of recommended PHP versions.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ EA4 \ get_php_recommendations
{- "apiversion": 3,
- "func": "get_php_recommendations",
- "module": "EA4",
- "result": {
- "data": [
- "php80"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function disables ModSecurity™ on a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ disable_all_domains
{- "apiversion": 3,
- "func": "disable_all_domains",
- "module": "ModSecurity",
- "result": {
- "data": [
- {
- "dependencies": [
- "dallas.com"
], - "domain": "dallas.example.com",
- "enabled": 0,
- "searchhint": "dallas.com",
- "type": "sub"
}, - {
- "dependencies": [
- "arkansas.com",
- "kansas.com",
- "nevada.com",
- "newmexico.com",
- "texas.com"
], - "domain": "example.com",
- "enabled": 0,
- "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
- "type": "main"
}, - {
- "dependencies": [
- "galveston.com"
], - "domain": "galveston.example.com",
- "enabled": 0,
- "searchhint": "galveston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "houston.com"
], - "domain": "houston.example.com",
- "enabled": 0,
- "searchhint": "houston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "neworleans.com"
], - "domain": "neworleans.example.com",
- "enabled": 0,
- "searchhint": "neworleans.com",
- "type": "sub"
}, - {
- "dependencies": [
- "sanantonio.com"
], - "domain": "sanantonio.example.com",
- "enabled": 0,
- "searchhint": "sanantonio.com",
- "type": "sub"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function disables ModSecurity™ on specified domains.
Important:
When you disable the WebServer role, the system disables this function.
| domains required | string Example: domains=example.com,dallas.example.com,galveston.example.com A comma-separated list of domains that the cPanel account owns. Important: The authenticated cPanel account must own these domains. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ disable_domains \ domains='example.com,dallas.example.com,galveston.example.com'
{- "apiversion": 3,
- "func": "disable_domains",
- "module": "ModSecurity",
- "result": {
- "data": [
- {
- "dependencies": [
- "dallas.com"
], - "domain": "dallas.example.com",
- "enabled": 0,
- "searchhint": "dallas.com",
- "type": "sub"
}, - {
- "dependencies": [
- "arkansas.com",
- "kansas.com",
- "nevada.com",
- "newmexico.com",
- "texas.com"
], - "domain": "example.com",
- "enabled": 0,
- "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
- "type": "main"
}, - {
- "dependencies": [
- "galveston.com"
], - "domain": "galveston.example.com",
- "enabled": 0,
- "searchhint": "galveston.com",
- "type": "sub"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function checks whether ModSecurity™ is installed on a server.
Important:
When you disable the Web Server role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ has_modsecurity_installed
{- "apiversion": 3,
- "func": "has_modsecurity_installed",
- "module": "ModSecurity",
- "result": {
- "data": {
- "installed": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables ModSecurity™ on a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ enable_all_domains
{- "apiversion": 3,
- "func": "enable_all_domains",
- "module": "ModSecurity",
- "result": {
- "data": [
- {
- "dependencies": [
- "dallas.com"
], - "domain": "dallas.example.com",
- "enabled": 1,
- "searchhint": "dallas.com",
- "type": "sub"
}, - {
- "dependencies": [
- "arkansas.com",
- "kansas.com",
- "nevada.com",
- "newmexico.com",
- "texas.com"
], - "domain": "example.com",
- "enabled": 1,
- "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
- "type": "main"
}, - {
- "dependencies": [
- "galveston.com"
], - "domain": "galveston.example.com",
- "enabled": 1,
- "searchhint": "galveston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "houston.com"
], - "domain": "houston.example.com",
- "enabled": 1,
- "searchhint": "houston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "neworleans.com"
], - "domain": "neworleans.example.com",
- "enabled": 1,
- "searchhint": "neworleans.com",
- "type": "sub"
}, - {
- "dependencies": [
- "sanantonio.com"
], - "domain": "sanantonio.example.com",
- "enabled": 1,
- "searchhint": "sanantonio.com",
- "type": "sub"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function enables ModSecurity™ for specified domains.
Important:
When you disable the WebServer role, the system disables this function.
| domains required | string Example: domains=example.com,dallas.example.com,galveston.example.com A comma-separated list of domains for which to enable ModSecurity. Important: The authenticated cPanel account must own these domains. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ enable_domains \ domains='example.com,dallas.example.com,galveston.example.com'
{- "apiversion": 3,
- "func": "enable_domains",
- "module": "ModSecurity",
- "result": {
- "data": [
- {
- "dependencies": [
- "dallas.com"
], - "domain": "dallas.example.com",
- "enabled": 1,
- "searchhint": "dallas.com",
- "type": "sub"
}, - {
- "dependencies": [
- "arkansas.com",
- "kansas.com",
- "nevada.com",
- "newmexico.com",
- "texas.com"
], - "domain": "example.com",
- "enabled": 1,
- "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
- "type": "main"
}, - {
- "dependencies": [
- "galveston.com"
], - "domain": "galveston.example.com",
- "enabled": 1,
- "searchhint": "galveston.com",
- "type": "sub"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns ModSecurity's™ status for a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ModSecurity \ list_domains
{- "apiversion": 3,
- "func": "list_domains",
- "module": "ModSecurity",
- "result": {
- "data": [
- {
- "dependencies": [
- "dallas.com"
], - "domain": "dallas.example.com",
- "enabled": 1,
- "searchhint": "dallas.com",
- "type": "sub"
}, - {
- "dependencies": [
- "arkansas.com",
- "kansas.com",
- "nevada.com",
- "newmexico.com",
- "texas.com"
], - "domain": "example.com",
- "enabled": 1,
- "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
- "type": "main"
}, - {
- "dependencies": [
- "galveston.com"
], - "domain": "galveston.example.com",
- "enabled": 1,
- "searchhint": "galveston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "houston.com"
], - "domain": "houston.example.com",
- "enabled": 0,
- "searchhint": "houston.com",
- "type": "sub"
}, - {
- "dependencies": [
- "neworleans.com"
], - "domain": "neworleans.example.com",
- "enabled": 0,
- "searchhint": "neworleans.com",
- "type": "sub"
}, - {
- "dependencies": [
- "sanantonio.com"
], - "domain": "sanantonio.example.com",
- "enabled": 0,
- "searchhint": "sanantonio.com",
- "type": "sub"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "modsec": {
- "total_disabled": 3,
- "total_enabled": 3
}, - "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function clears the user's NGINX cache.
Note:
ea-nginx package.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ NginxCaching \ clear_cache
{- "apiversion": 3,
- "func": "clear_cache",
- "module": "NginxCaching",
- "result": {
- "data": { },
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function enables the user's NGINX cache.
Note:
ea-nginx package.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ NginxCaching \ enable_cache
{- "apiversion": 3,
- "func": "enable_cache",
- "module": "NginxCaching",
- "result": {
- "data": { },
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function disables the user's NGINX cache.
Note:
ea-nginx package.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ NginxCaching \ disable_cache
{- "apiversion": 3,
- "func": "disable_cache",
- "module": "NginxCaching",
- "result": {
- "data": { },
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function resets the user's NGINX caching configuration.
Note:
ea-nginx package.| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ NginxCaching \ reset_cache_config
{- "apiversion": 3,
- "func": "reset_cache_config",
- "module": "NginxCaching",
- "result": {
- "data": { },
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns a PHP version's assigned PHP handler.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
| type required | string Possible Values: "home" "vhost" Example: type=vhost The type of
Important:
|
| vhost | string <domain> Example: vhost=clearly.com The name of a virtual host. Important: If the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_get_domain_handler \ type='vhost'
{- "apiversion": 3,
- "func": "php_get_domain_handler",
- "module": "LangPHP",
- "result": {
- "data": {
- "php_handler": "cgi"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists domains that obtain their PHP version from a specified PHP configuration.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function.
| domain | string <domain> Example: domain=example.com A domain on the system. Note:
|
| system_default | integer Possible Values: 1 0 Example: system_default=1 Whether to return domains that inherit the system's default PHP version.
Note: If you pass this parameter with a false value and do not also pass the domain parameter, the function returns an error. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_get_impacted_domains
{- "apiversion": 3,
- "func": "php_get_impacted_domains",
- "module": "LangPHP",
- "result": {
- "data": {
- "domains": [
- "example.com"
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the system's PHP versions.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_get_installed_versions
{- "apiversion": 3,
- "func": "php_get_installed_versions",
- "module": "LangPHP",
- "result": {
- "data": {
- "versions": [
- "ea-php72"
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the system’s default PHP version.
Important:
When you disable the Web Server role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_get_system_default_version
{- "apiversion": 3,
- "func": "php_get_system_default_version",
- "module": "LangPHP",
- "result": {
- "data": {
- "version": "ea-php73"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the contents of a virtual host's php.ini file.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
| type required | string Example: type=vhost The type of
Important: If you set this parameter to |
| vhost | string <domain> Example: vhost=clearly.com The name of a virtual host. Important: If the type value is |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_ini_get_user_content \ type='vhost'
{- "apiversion": 3,
- "func": "php_ini_get_user_content",
- "module": "LangPHP",
- "result": {
- "data": {
- "content": "allow_url_fopen = On\\nallow_url_include = On\\nasp_tags = Off\\ndisplay_errors = On\\nenable_dl = Off\\nfile_uploads = On\\ninclude_path = ".;/path/to/php/pear"\\nmax_execution_time = 30\\nmax_input_time = 60\\nmax_input_vars = 1050\\nmemory_limit = 32M\\nupload_max_filesize = 2M"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists a virtual host's basic PHP directives. The Basic Mode section of cPanel's MultiPHP INI Editor interface (Home >> Software >> MultiPHP INI Editor) also lists these directives.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
| type required | string Possible Values: "home" "vhost" Example: type=vhost The type of
Important: If you set this parameter to |
| vhost | string <domain> Example: vhost=clearly.com The name of a virtual host. Important: If the type value is |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_ini_get_user_basic_directives \ type='vhost'
{- "apiversion": 3,
- "func": "php_ini_get_user_basic_directives",
- "module": "LangPHP",
- "result": {
- "data": {
- "directives": [
- {
- "default_value": 1,
- "info": "This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.",
- "key": "allow_url_fopen",
- "php_ini_mode": "PHP_INI_SYSTEM",
- "type": "integer",
- "value": "On"
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the php.ini file paths for the user's home directory and virtual host document roots.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_ini_get_user_paths
{- "apiversion": 3,
- "func": "php_ini_get_user_paths",
- "module": "LangPHP",
- "result": {
- "data": {
- "paths": [
- {
- "account": "allthethings",
- "documentroot": "/home/allthethings/public_html",
- "homedir": "/home/allthethings/",
- "main_domain": 1,
- "path": "php.ini",
- "type": "vhost",
- "version": "ea-php72",
- "vhost": "clearly.com"
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets a virtual host's PHP version.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function.
| version required | string Example: version=ea-php72 The PHP version of a virtual host. |
| vhost required | string <domain> Examples:
The virtual host's name. Note: To change the PHP version of multiple virtual hosts, duplicate or increment the parameter name. For example, |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_set_vhost_versions \ version='ea-php72' \ vhost='example.com'
{- "apiversion": 3,
- "func": "php_set_vhost_versions",
- "module": "LangPHP",
- "result": {
- "data": {
- "vhosts": [
- "example.com"
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function sets the values of any basic PHP directive. The Basic Mode section of cPanel's MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor) lists these directives.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the Web Server role, the system disables this function.
| directive required | string Examples:
The name of a PHP directive and its value. Note:
|
| type required | string Possible Values: "home" "vhost" Example: type=vhost The type of
Important: If you set this parameter to |
| vhost | string <domain> Example: vhost=clearly.com The name of a virtual host. Important: If the |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_ini_set_user_basic_directives \ type='vhost' \ directive='allow_url_fopen:0'
{- "apiversion": 3,
- "func": "php_ini_set_user_basic_directives",
- "module": "LangPHP",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": {
- "LangPHP": {
- "path": "/home/allthethings/public_html/php.ini",
- "phpversion": "ea-php55",
- "type": "vhost",
- "vhost": "clearly.com"
}
}, - "status": 1,
- "warnings": null
}
}This function changes the contents of a virtual host's php.ini file.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
| content required | string Example: content=%5BPHP%5D%0D%0A%3B+About+php.ini%0D%0A%3B+php.ini+is+responsible+for+configuring+many+of+the+aspects+of+PHP%27s+behavior.%0D%0Apcre.backtrack_limit%3D100000 The content of the |
| type required | string Possible Values: "host" "vhost" Example: type=vhost The type of
Important: If you set this parameter to |
| vhost | string <domain> Example: vhost=clearly.com The name of a virtual host. Important: If the type value is |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_ini_set_user_content \ type='vhost' \ content='%5BPHP%5D%0D%0A%3B+About+php.ini%0D%0A%3B+php.ini+is+responsible+for+configuring+many+of+the+aspects+of+PHP%27s+behavior.%0D%0Apcre.backtrack_limit%3D100000'
{- "apiversion": 3,
- "func": "php_ini_set_user_content",
- "module": "LangPHP",
- "result": {
- "data": { },
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the PHP version of every virtual host that a reseller controls.
You can get the version of a single virtual host by providing an optional vhost name.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the Web Server role, the system disables this function.
| vhost | string Example: vhost=your-domain.test The PHP Virtual Hostname. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LangPHP \ php_get_vhost_versions
{- "apiversion": 3,
- "func": "php_get_vhost_versions",
- "module": "LangPHP",
- "result": {
- "data": [
- {
- "account": "blee",
- "account_owner": "blee",
- "documentroot": "/home/blee/public_html",
- "homedir": "/home/blee",
- "main_domain": 1,
- "php_fpm": 1,
- "php_fpm_pool_parms": {
- "pm_max_children": 5,
- "pm_max_requests": 20,
- "pm_process_idle_timeout": 10
}, - "phpversion_source": [
- {
- "domain": "blee.com",
- "system_default": 1
}
], - "version": "ea-php72",
- "vhost": "blee.com"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function enables or disables the website preview for an instance.
Note:
id or domain parameters.| domain | string Example: domain=mydomain.tld The domain name whose website preview state you wish to change. |
| enabled required | integer Possible Values: 0 1 Example: enabled=1 Whether to enable or disable the website preview.
|
| id required | integer Example: id=42 The instance ID whose website preview state you wish to change. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WebProxy \ set_website_preview \ enabled='1' \ id='42'
{- "apiversion": 3,
- "func": "set_website_preview",
- "module": "WebProxy",
- "result": {
- "data": {
- "changed": true,
- "domain": "mydomain.tld",
- "enabled": true,
- "instance_id": 42,
- "preview_domain": "straightforward-purple-beetle.192-0-2-1.wpsquared.site",
}
}
}This function retrieves metadata for a specific WP Squared website when creating a website-level backup.
| instance_id required | integer Example: instance_id=123 The instance ID. |
| apiversion | integer The API version. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ WPBackup \ get_website_metadata \ instance_id='123'
{- "apiversion": 3,
- "func": "get_website_metadata",
- "module": "WPBackup",
- "result": {
- "data": {
- "domain": "attentive-magenta-turtle.10-0-0-1.wpsquared.site",
- "external_data": {
- "databases": [
- {
- "charset": "utf8",
- "host": "localhost:3306",
- "name": "wpuser_wp_smt3w",
- "password": "gXCd3*tRKO4SI?1P",
- "table_prefix": "gJ6SA3S_",
- "user": "wpuser_wp_ftvcc"
}
], - "paths": [
- {
- "group": "nobody",
- "mode": 16872,
- "mode_string": "0750",
- "name": "documentroot",
- "path": "/home/wpuser/public_html/attentive-magenta-turtle.10-0-0-1.wpsquared.site",
- "type": "directory"
}
]
}, - "metadata_version": 1,
- "original_instance_id": 123
}
}
}This function restores metadata for a specific WP Squared website.
| website_metadata | object The complete |
| apiversion | integer The API version. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
{- "website_metadata": {
- "metadata_version": 1
}
}{- "apiversion": 3,
- "func": "restore_website_metadata",
- "module": "WPBackup",
- "result": {
- "data": {
- "instance_id": 123
}
}
}This function creates an Apache MIME type handler for a file extension.
Important:
When you disable the Web Server role, the system disables this function.
| extension required | string Example: extension=.foo The file extension. |
| handler required | string Example: handler=txt-foo The Apache MIME handler. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ add_handler \ extension='.foo' \ handler='txt-foo'
{- "apiversion": 3,
- "func": "add_handler",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function deletes an Apache MIME type handler.
Important:
When you disable the WebServer role, the system disables this function.
| extension required | string Example: extension=.foo The file extension. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ delete_handler \ extension='.foo'
{- "apiversion": 3,
- "func": "delete_handler",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves redirect information for a URL or ** All Public Domains **.
Important:
When you disable the Web Server role, the system disables this function.
| domain required | string <domain> Example: domain=example.com The domain for which to retrieve redirector information. |
| url required | string <url> Example: url=http://redirect.example.com The URL for which to retrieve redirector information. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ redirect_info \ url='http://redirect.example.com' \ domain='example.com'
{- "apiversion": 3,
- "func": "redirect_info",
- "module": "Mime",
- "result": {
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists all of Apache's MIME handlers.
Important:
When you disable the WebServer role, the system disables this function.
| type required | string Possible Values: "system" "user" Example: type=user Whether to retrieve system or user handlers. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ list_handlers \ type='user'
{- "apiversion": 3,
- "func": "list_handlers",
- "module": "Mime",
- "result": {
- "data": [
- {
- "extension": ".foo",
- "handler": "text-foo",
- "origin": "user"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}Delete a specific log archive file from the authenticated user's ~/logs directory.
| file required | string Example: file=example.com-Aug-2024.gz The log archive filename to delete. Requirements:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LogManager \ delete_archive \ file=example.com-Aug-2024.gz
{- "apiversion": 3,
- "func": "delete_archive",
- "module": "LogManager",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the account's log archival settings.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LogManager \ get_settings
{- "apiversion": 3,
- "func": "get_settings",
- "module": "LogManager",
- "result": {
- "data": {
- "archive_logs": 1,
- "prune_archive": 1,
- "retention_days": 30,
- "using_default": 1
}, - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function returns a list of the user's archive files.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LogManager \ list_archives
{- "apiversion": 3,
- "func": "list_archives",
- "module": "LogManager",
- "result": {
- "data": [
- {
- "file": "domain.com-May-2019.gz",
- "mtime": 1557835866,
- "path": "/home/user/logs/domain.com-May-2019.gz"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function saves the account's log archive settings.
Note:
You must pass at least one of the archive_logs, prune_archive, or retention_days parameters.
| archive_logs | integer Possible Values: 0 1 Example: archive_logs=1 Whether to archive log files to your home directory after the system processes statistics.
Note:
|
| prune_archive | integer Possible Values: 0 1 Example: prune_archive=1 Whether to remove the previous month's archived logs from the
Note:
|
| retention_days | integer >= -1 Example: retention_days=30 The number of days to retain archived log files before automatic removal.
When not provided, the existing value is preserved. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ LogManager \ set_settings \ archive_logs=1 \ prune_archive=1 \ retention_days=30
{- "apiversion": 3,
- "func": "set_settings",
- "module": "LogManager",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function adds a MIME type to Apache.
Important:
When you disable the Web Server role, the system disables this function.
| extension required | string Example: extension=.foo The file extension. |
| type required | string <MIME> Example: type=text/foo The MIME type. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ add_mime \ type='text/foo' \ extension='.foo'
{- "apiversion": 3,
- "func": "add_mime",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function removes a MIME type from Apache.
Important:
When you disable the WebServer role, the system disables this function.
| type required | string Example: type=text/foo The MIME type. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ delete_mime \ type='text/foo'
{- "apiversion": 3,
- "func": "delete_mime",
- "module": "Mime",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "status": 1,
- "warnings": null
}
}This function lists all of Apache's MIME types.
Note:
This function does not list PHP versions with MIME types when the user or domain enables PHP-FPM. The system displays only custom MIME types.
Important:
When you disable the Web Server role, the system disables this function.
| type required | string Possible Values: "system" "user" Example: type=user The MIME types to list.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Mime \ list_mime \ type='user'
{- "apiversion": 3,
- "func": "list_mime",
- "module": "Mime",
- "result": {
- "data": [
- {
- "extension": ".foo",
- "origin": "user",
- "type": "application/foo"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function retrieves the user's account configuration settings.
| name | string Examples:
The user configuration variables to retrieve. If you don't use this parameter, this function returns all of the user's configuration data. Note: To retrieve multiple account configuration settings for a user, increment the parameter name. For example: |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Variables \ get_user_information
{- "apiversion": 3,
- "func": "get_user_information",
- "module": "Variables",
- "result": {
- "data": {
- "backup_enabled": 1,
- "bandwidth_limit": 0,
- "cgi_enabled": 1,
- "contact_email": "user@example.com",
- "contact_email_2": "user2@example.com",
- "cpanel_root_directory": "/usr/local/cpanel",
- "created": 1432220941,
- "created_in_version": "11.94.0.0",
- "database_owner": "root",
- "dead_domains": [
- "example.example.com"
], - "demo_mode": 1,
- "disk_block_limit": 100000000,
- "dkim_enabled": 1,
- "domain": "example.com",
- "domains": [
- "example.com"
], - "feature": {
- "custom_feature": 1
}, - "feature_list": "feature_list",
- "gid": 5678,
- "home": "/home/user",
- "home_directory_links": [
- "symlink"
], - "ip": "192.0.2.0",
- "lang": "english",
- "last_modified": 1416586493,
- "legacy_backup_enabled": 1,
- "locale": "en",
- "mailbox_format": "maildir",
- "maximum_addon_domains": "unlimited",
- "maximum_databases": "unlimited",
- "maximum_defer_fail_percentage": "unlimited",
- "maximum_email_account_disk_quota": "unlimited",
- "maximum_emails_per_hour": "unlimited",
- "maximum_ftp_accounts": "unlimited",
- "maximum_mail_accounts": "0",
- "maximum_mailing_lists": "unlimited",
- "maximum_parked_domains": "unlimited",
- "maximum_passenger_apps": "unlimited",
- "maximum_subdomains": "unlimited",
- "mxcheck": {
- "example.com": "local",
- "example2.com": "remote"
}, - "notify_account_authn_link": 1,
- "notify_account_authn_link_notification_disabled": 1,
- "notify_account_login": 1,
- "notify_account_login_for_known_netblock": 1,
- "notify_account_login_notification_disabled": 1,
- "notify_autossl_expiry": 1,
- "notify_autossl_expiry_coverage": 1,
- "notify_autossl_renewal_coverage": 1,
- "notify_autossl_renewal_coverage_reduced": 1,
- "notify_autossl_renewal_uncovered_domains": 1,
- "notify_bandwidth_limit": 1,
- "notify_contact_address_change": 1,
- "notify_contact_address_change_notification_disabled": 1,
- "notify_disk_limit": 1,
- "notify_password_change": 1,
- "notify_password_change_notification_disabled": 1,
- "notify_ssl_expiry": 1,
- "notify_twofactorauth_change": 1,
- "notify_twofactorauth_change_notification_disabled": 1,
- "owner": "root",
- "package_extensions": [
- "ext1",
- "ext2",
- "ext3"
], - "plan": "packagename",
- "pushbullet_access_token": "1234567890",
- "shell": "/bin/bash",
- "spf_enabled": 1,
- "ssl_default_key_type": "rsa-2048",
- "theme": "jupiter",
- "uid": 1234,
- "user": "username",
- "utf8_mailbox": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates the cPanel account's password.
| enabledigest | integer Default: "The previously-set value or 0" Possible Values: 0 1 Example: enabledigest=0 Whether to use Digest Authentication.
Note:
|
| enablemysql | integer Default: 0 Possible Values: 0 1 Example: enablemysql=0 Whether to update the cPanel account's MySQL password.
|
| newpass required | string <password> Example: newpass=MyNewPassw0rd! The new password. |
| oldpass required | string <password> Example: oldpass=ThisWasMyPassword! The current password. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Users \ change_password \ oldpass='MyPreviousPassword' \ newpass='MyUpdatedPassword'
{- "apiversion": 3,
- "func": "change_password",
- "module": "Users",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function updates the cPanel account's password.
| enablemysql | integer Default: 0 Possible Values: 0 1 Example: enablemysql=0 Whether to update the cPanel account's MySQL password.
|
| newpass required | string <password> Example: newpass=MyNewPassw0rd! The new password. |
| oldpass required | string <password> Example: oldpass=ThisWasMyPassword! The current password. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ UserManager \ change_password \ oldpass='MyPreviousPassword' \ newpass='MyUpdatedPassword'
{- "apiversion": 3,
- "func": "change_password",
- "module": "UserManager",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the cPanel account's quota for the server where you run the function. For example, a distributed cPanel account could approach its quota. The servers will balance that cPanel user's quota between the parent and the child node.
Note:
This function runs on only the local server. To retrieve the cPanel account's total quota, use the UAPI Quota::get_quota function instead.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Quota \ get_local_quota_info
{- "apiversion": 3,
- "func": "get_local_quota_info",
- "module": "Quota",
- "result": {
- "data": {
- "byte_limit": 262144000,
- "bytes_used": 4149284,
- "inode_limit": 0,
- "inodes_used": 1035
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the cPanel account's quota.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Quota \ get_quota_info
{- "apiversion": 3,
- "func": "get_quota_info",
- "module": "Quota",
- "result": {
- "data": {
- "inode_limit": 0,
- "inodes_remain": 0,
- "inodes_used": 1035,
- "megabyte_limit": 0,
- "megabytes_remain": 0,
- "megabytes_used": 5.46,
- "under_inode_limit": 0,
- "under_megabyte_limit": 1,
- "under_quota_overall": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function saves its data to an NVData file on disk. cPanel NVData is a per-account configuration storage mechanism that you can use to maintain persistent cPanel & WHM settings across multiple sessions. This includes custom settings for your own themes and plugins.
Note:
NVData keys and values are limited to 128 and 2048 bytes, respectively.
object The NVData keys and values to update. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
{- "personalization": {
- "coffee": "hot",
- "milk": "cold"
}
}{- "apiversion": 3,
- "func": "set",
- "module": "Personalization",
- "result": {
- "data": {
- "coffee": {
- "reason": "OK",
- "success": 1,
- "value": "hot"
}, - "milk": {
- "reason": "OK",
- "success": 1,
- "value": "cold"
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves the data from an NVData file on disk. cPanel NVData is a per-account configuration storage mechanism that you can use to maintain persistent cPanel & WHM settings across multiple sessions. This includes custom settings for your own themes and plugins.
Note:
NVData keys and values are limited to 128 and 2048 bytes, respectively.
| names | Array of strings List of NVData keys to query the server about. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
{- "names": [
- "coffee",
- "milk"
]
}{- "apiversion": 3,
- "func": "get",
- "module": "Personalization",
- "result": {
- "data": {
- "coffee": {
- "reason": "OK",
- "success": 1,
- "value": "hot"
}, - "milk": {
- "reason": "OK",
- "success": 1,
- "value": "cold"
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves resource usage and custom statistics for a cPanel user account.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ ResourceUsage \ get_usages
{- "apiversion": 3,
- "func": "get_usages",
- "module": "ResourceUsage",
- "result": {
- "data": [
- {
- "description": "MySQL® Databases",
- "error": null,
- "formatter": "format_bytes",
- "id": "mysql_databases",
- "maximum": 15,
- "url": "sql/index.html",
- "usage": 0
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves a cPanel account's statistics.
| display required | string Example: display=bandwidthusage|diskusage A pipe-delimited list of the account's statistics. Click for a list of available display parameters.
Note:
|
| infinityimg | string or null Default: null Example: infinityimg=/home/example/infinity.png The absolute file path to an alternative infinity symbol image. |
| infinitylang | string or null Default: null Example: infinitylang=infinity A phrase to represent infinity that the locales system can use. |
| rowcounter | string or null Default: null Example: rowcounter=even The type of row.
|
| warninglevel | integer or null [ 1 .. 100 ] Default: null Example: warninglevel=87 The minimum level at which to return warnings. |
| warnings | integer or null Default: null Possible Values: 1 0 Example: warnings=0 Whether to return all results with a warning.
|
| warnout | integer or null Default: null Possible Values: 1 0 Example: warnout=0 Whether to display results with a value of
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ StatsBar \ get_stats \ display='bandwidthusage|diskusage'
{- "apiversion": 3,
- "func": "get_stats",
- "module": "StatsBar",
- "result": {
- "data": [
- {
- "_count": "0.00",
- "_max": "1024.00",
- "_maxed": 0,
- "count": "0 bytes",
- "feature": "bandwidth",
- "id": "bandwidthusage",
- "is_maxed": 0,
- "item": "Monthly Bandwidth Transfer",
- "max": "1 GB",
- "maxed_phrase": "You have transferred your maximum allotment of data ([format_bytes,_1]) for this month.",
- "module": "Stats",
- "name": "bandwidthusage",
- "near_limit_phrase": "You have transferred [format_bytes,_1] of your [format_bytes,_2] data allotment for this month.",
- "normalized": 1,
- "percent": 0,
- "percent10": 0,
- "percent20": 0,
- "percent5": 0,
- "phrase": "Monthly Bandwidth Transfer",
- "rowtype": "even",
- "units": "MB",
- "zeroisunlimited": 1
}, - {
- "_count": "1.75",
- "_max": "1024.00",
- "_maxed": 0,
- "count": "1.75 MB",
- "id": "diskusage",
- "is_maxed": 0,
- "item": "Disk Space Usage",
- "langkey": "INDXDiskUsage",
- "max": "1 GB",
- "maxed_phrase": "You are using your maximum storage allotment, [format_bytes,_1].",
- "module": "Quota",
- "name": "diskusage",
- "near_limit_phrase": "You are using [format_bytes,_1] of the [format_bytes,_2] of storage available to you.",
- "normalized": 1,
- "percent": 0,
- "percent10": 0,
- "percent20": 0,
- "percent5": 0,
- "phrase": "Disk Space Usage",
- "rowtype": "odd",
- "units": "MB",
- "zeroisunlimited": 1
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a full backup to the user's home directory. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss_username.tar.gz filename format.
string <email> Default: null Example: email=username@example.com The email address to receive a confirmation email when the backup process completes. Note: The system does not provide confirmation if you do not pass this parameter. | |
| homedir | string Default: "include" Possible Values: "include" "skip" Example: homedir=include How to manage the home directory in the backup.
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Backup \ fullbackup_to_homedir
{- "apiversion": 3,
- "func": "fullbackup_to_homedir",
- "module": "Backup",
- "result": {
- "data": {
- "pid": "2857"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists the account's backup files.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Backup \ list_backups
{- "apiversion": 3,
- "func": "list_backups",
- "module": "Backup",
- "result": {
- "data": [
- "2014-12-02T00:00:00.000Z"
], - "errors": null,
- "messages": null,
- "metadata": {
- "cnt": 1,
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function creates a full backup to the remote server via File Transfer Protocol (FTP). The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss.tar.gz filename format.
| directory | string Example: directory=/public_ftp The directory on the remote server that will store the backup. Note:
|
string <email> Default: null Example: email=username@example.com The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter. | |
| homedir | string Default: "include" Possible Values: "include" "skip" Example: homedir=include How to manage the home directory in the backup.
|
required | string or string Example: host=example.com The remote server's hostname or IP address. |
| password required | string Example: password=luggage123456 The remote server account's password. |
| port | integer [ 1 .. 65535 ] Default: 21 Example: port=21 The port number to use during the transfer. |
| username required | string Example: username=username The remote server account's username. |
| variant | string Default: "active" Possible Values: "active" "passive" Example: variant=active Whether to use the
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Backup \ fullbackup_to_ftp \ username='username' \ password='luggage123456' \ host='example.com'
{- "apiversion": 3,
- "func": "fullbackup_to_ftp",
- "module": "Backup",
- "result": {
- "data": {
- "pid": "2857"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a full backup to a remote server via the secure copy protocol (scp) command with a password. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss.tar.gz filename format.
| directory | string Example: directory=/user The directory on the remote server that will store the backup. Note: This parameter defaults to the remote server account's default login directory. |
string <email> Default: null Example: email=username@example.com The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter. | |
| homedir | string Default: "include" Possible Values: "include" "skip" Example: homedir=include How to manage the home directory in the backup.
|
required | string or string Example: host=example.com The remote server's hostname or IP address. |
| password required | string Example: password=luggage123456 The remote server account's password. |
| port | integer [ 1 .. 65335 ] Default: 22 Example: port=22 The port to use during the transfer. |
| username required | string Example: username=username The remote server account's username. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Backup \ fullbackup_to_scp_with_password \ host='example.com' \ username='username' \ password='luggage123456'
{- "apiversion": 3,
- "func": "fullbackup_to_scp_with_password",
- "module": "Backup",
- "result": {
- "data": {
- "pid": "2857"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function creates a full backup to a remote server with a private SSH key via the secure copy protocol (scp) command. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss_username.tar.gz filename format.
| directory | string Example: directory=/user The directory on the remote server that will store the backup. Note: This parameter defaults to the remote server account's default login directory. |
string <email> Default: null Example: email=username@example.com The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter. | |
| homedir | string Default: "include" Possible Values: "include" "skip" Example: homedir=include How to manage the home directory in the backup.
|
required | string or string Example: host=example.com The remote server's hostname or IP address. |
| key_name required | string Example: key_name=examplesshkey The SSH key's name. Notes:
|
| key_passphrase required | string >= 4 characters Example: key_passphrase=123456luggage The SSH key's password. |
| port | integer [ 1 .. 65335 ] Default: 22 Example: port=22 The port to use during the transfer. |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Backup \ fullbackup_to_scp_with_key \ host='example.com' \ key_name='examplesshkey' \ key_passphrase='123456luggage'
{- "apiversion": 3,
- "func": "fullbackup_to_scp_with_key",
- "module": "Backup",
- "result": {
- "data": {
- "pid": "2857"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists all of the backup files and directories in the user's home directory.
Important:
When you disable the File Storage role, the system disables this function.
| path required | string Example: path=/public_html/ A path to a subdirectory within the user's home directory, or any level below it. Note: The value of this parameter must begin and end with a forward slash ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Restore \ directory_listing \ path='/public_html/'
{- "apiversion": 3,
- "func": "directory_listing",
- "module": "Restore",
- "result": {
- "data": [
- {
- "conflict": 0,
- "exists": 1,
- "name": "public_html",
- "onDiskType": "file",
- "type": "file"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function lists all of an item's backup locations. An item can be a file, a directory, or a symlink.
Important:
When you disable the File Storage role, the system disables this function.
| exists | integer Default: 0 Possible Values: 1 0 Example: exists=0 Whether to show the
|
| path required | string <path> Example: path=/public_html/index.php A file, directory, or symlink in the user's directory tree. Note: The value of this parameter must begin with a forward slash ( |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Restore \ query_file_info \ path='/public_html/index.php'
{- "apiversion": 3,
- "func": "query_file_info",
- "module": "Restore",
- "result": {
- "data": [
- {
- "backupDate": "2020-07-01T00:00:00.000Z",
- "backupID": "weekly/2017-07-01",
- "backupType": "compressed",
- "exists": 1,
- "fileSize": 199,
- "mtime": 1520043240,
- "path": "/public_html/index.php",
- "type": "file"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function restores a file or directory from a backup to the file or directory's original location.
Important:
When you disable the File Storage role, the system disables this function.
required | string or string or string or string Example: backupID=weekly/2017-07-03 The backup's identification.
|
| overwrite required | integer Possible Values: 1 0 Example: overwrite=1 Whether to overwrite the file or directory on the disc with its backup replacement.
|
| path required | string <path> Example: path=/public_html/index.php The absolute file or directory's path, within a backup, that you wish to restore. Important:
|
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Restore \ restore_file \ backupID='weekly/2017-07-03' \ path='/public_html/index.php' \ overwrite='1'
{- "apiversion": 3,
- "func": "restore_file",
- "module": "Restore",
- "result": {
- "data": {
- "success": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists a reseller's users that have existing backup metadata.
Note:
When you disable the File Storage role, the system disables this function.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Restore \ get_users
{- "apiversion": 3,
- "func": "get_users",
- "module": "Restore",
- "result": {
- "data": [
- "username"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function restores an account's files.
Important:
When the File Storage role is disabled, the system also disables this function.
Note:
You must use the backup parameter when you call this function in one of the following formats:
multipart/form-data request body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's POST Method documentation.| backup | string Examples:
The backup file to restore. Important: Only pass this parameter to restore backup files that already exist on the server. Note: To restore multiple backup files, increment the parameter name. For example: |
| directory | string <path> Example: directory=/home/user/example The directory to which to restore the file. The default is the user's |
| timeout | integer >= 0 Default: 172800 Example: timeout=7200 The maximum number of seconds to try to restore the file.
|
| verbose | integer Default: 0 Possible Values: 0 1 Example: verbose=1 Whether to return additional information from the
|
The backup file to upload and restore.
Important:
Note:
To upload and restore multiple backup files, increment the parameter name. For example: backup-1, backup-2, and backup-3.
| backup | string <binary> |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --input=json --output=jsonpretty \ --user=username \ Backup \ restore_files
{- "apiversion": 3,
- "func": "restore_files",
- "module": "Backup",
- "result": {
- "data": {
- "log_id": "2019-08-13T15:10:07Z.1",
- "log_path": "/home/cptest/.cpanel/logs/restorefiles/2019-08-13T15:10:07Z.1.log",
- "messages": [
- "The system successfully restored the directory /home/cpuser/point2 from the backup file backup-cpuser.tld-9-10-2019_1.tar.gz"
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function restores a database's backup files.
Important:
When the MySQL Client role is disabled, the system also disables this function.
Note:
You must pass either the file or backup parameter.
| backup | string Examples:
The database backup file to restore. Important: Only pass this parameter to restore files already on the server. Note: To restore multiple database backup files, increment the parameter name. For example: |
| timeout | integer >= 0 Default: 7200 Example: timeout=3600 The maximum number of seconds to try to restore the file.
|
| verbose | integer Default: 0 Possible Values: 0 1 Example: verbose=1 Whether to return additional information from the
|
The database backup file to upload and restore.
Important:
Note:
file-1, file-2, and file-3.| file | string <binary> |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --input=json --output=jsonpretty \ --user=username \ Backup \ restore_databases
{- "apiversion": 3,
- "func": "restore_databases",
- "module": "Backup",
- "result": {
- "data": {
- "log_id": "2019-08-13T15:10:07Z.1",
- "log_path": "/home/cptest/logs/restoredb/2019-08-13T15:10:07Z.1.log",
- "messages": [
- "The system successfully restored the database 'user_db1' from the backup file 'user_db1.sql.gz'"
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function generates a random integer (the CacheBuster ID). Use this ID to work with and around a browser's caching mechanism.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CacheBuster \ update
{- "apiversion": 3,
- "func": "update",
- "module": "CacheBuster",
- "result": {
- "data": {
- "cache_id": 11381138
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function returns the current CacheBuster id. The system uses this ID to force the browser to fetch a new resource when that resource already exists in the web browser cache. This is useful when an application has updated the resource on the server. You should append this ID to the end of the url in the query-string. For example, if you are accessing a url like:
https://example.com/styled/basic/sprites/icon_spritemap.css
To force the browser to fetch the updated version, you would append the following:
https://example.com/styled/basic/sprites/icon_spritemap.css?<CacheBusterID>
Note
The application that updates the resource at this url on the server must call the CacheBuster::update function when it updates the resource to signify that update.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ CacheBuster \ read
{- "apiversion": 3,
- "func": "read",
- "module": "CacheBuster",
- "result": {
- "data": {
- "cache_id": 11381138
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function retrieves information about the user's current locale setting.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Locale \ get_attributes
{- "apiversion": 3,
- "func": "get_attributes",
- "module": "Locale",
- "result": {
- "data": {
- "direction": "ltr",
- "encoding": "utf-8",
- "locale": "en",
- "name": "English"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}This function lists an account's available interface languages.
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Locale \ list_locales
{- "apiversion": 3,
- "func": "list_locales",
- "module": "Locale",
- "result": {
- "data": [
- {
- "direction": "ltr",
- "local_name": "Deutsch",
- "locale": "de",
- "name": "German"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}This function sets the account's locale.
| locale required | string Example: locale=en The locale's abbreviated name according to UAPI's |
| apiversion | integer The version of the API. |
| func | string The name of the method called. |
| module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Locale \ set_locale \ locale='en'
{- "apiversion": 3,
- "func": "set_locale",
- "module": "Locale",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}