cPanel/SiteQuality
cPanel module

SiteQuality

13 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="SiteQuality", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

create_project POST#

Add domain to monitoring

This function creates a Site Quality Monitoring project. A project bundles together one or more URLs with a shared domain for monitoring.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

idinteger
The project ID number.
identifierstring
The project identifier.
locationstring
The region where monitoring checks originate.
namestring
The project's name.
roleobject
Information about the user that owns the project.
idinteger
The user's role ID number.
namestring
The user's role title.
systemsarray<object>
Information about the system that the project monitors.
namestring
The name of the system.
descriptionstring
A description of the system.
domainstring
The system's base domain.
idinteger
The system's ID number.
intervalstring
The time interval for monitoring checks.
limitsobject
Restrictions placed on the monitoring checks.
maximumCrawlDepthinteger
The maximum number of URLs to check for dead links on a page.
system_typeobject
The monitoring template used for the system.
namestring
The name of the system type.
idany
The system's type ID number.
fixedComponentsboolean
Whether the system components are immutable. true - The components are immutable. false - The components are not immutable..

create_site_quality_user POST#

Register cPanel user for monitoring

This function creates a Site Quality Monitoring user account associated with a cPanel user account.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

app_tokenstring
The long-lived token for this account. The <a href="https://go.cpanel.net/5k" target="_blank">koality</a> servers require this token to authenticate. If this token is lost, the user must create a new account.
usernamestring
The account's username. This value reflects the email parameter.
enabledboolean
Whether the account is enabled to process user data. false - The account is disabled. true - The account is enabled.

delete_site_quality_user GET#

Delete Site Quality Monitoring account

This function initiates the deletion of the Site Quality Monitoring user account associated with a cPanel user account.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

deletedinteger
Whether or not the account has been successfully deleted. 1 - Success 0 - Failed
One of: 0 1

get_all_scores POST#

Return all projects' monitoring results

This function returns information about the cPanel user's Site Quality Monitoring projects' most recent monitoring check results.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

scoresarray<object>
An array of objects containing score data and the associated system information.
systemobject
namestring
The name of the project.
idinteger
The project's ID number.
scoresobject
basic-uptimeany
basic-performanceany
basic-seoany
basic-contentany
basic-techany
basic-securityany

get_app_token GET#

Return koality authentication token

This function returns the long-lived application token used to authenticate with <a href="https://go.cpanel.net/5k" target="_blank">koality's</a> authentication servers.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

app_tokenstring
The long-lived token for this account. The <a href="https://go.cpanel.net/5k" target="_blank">koality</a> servers require this token to authenticate. If this token is lost, the user must create a new account.

get_monitored_domains GET#

Return the user's monitored domains.

This function returns a list of the user's Site Quality Monitoring-enabled domains. It also returns the domains' associated project and system IDs.

No parameters.

get_monitored_system_scores GET#

Return status for a user's monitored domains.

This function returns a monitoring score and system ID for each domain the user monitors with Site Quality Monitoring.

No parameters.

has_site_quality_user GET#

Validate monitoring account existence

This function returns whether the cPanel user has an associated Site Quality Monitoring account.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

has_site_quality_userinteger
Whether the cPanel user has an associated Site Quality Monitoring account. 1 - The user does have an associated account. 0 - The user does not have an associated account.
One of: 0 1

is_site_quality_user_enabled GET#

Validate monitoring account enablement

This function verifies that <a href="https://go.cpanel.net/5k" target="_blank">koality</a> has enabled the cPanel user's Site Quality Monitoring account.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

enabledinteger
Whether or not the account has been enabled. 1 - Enabled 0 - Disabled
One of: 0 1

reset_config GET#

Remove monitoring user from cPanel configuration

This function will remove Site Quality Monitoring account data from the cPanel user's configuration.

Note:

  • This function will prevent cPanel & WHM from automatically logging the user into their Site Quality Monitoring account.
  • This function does not delete the Site Quality Monitoring account from the <a href="https://go.cpanel.net/5k" target="_blank">koality</a> servers.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

resetinteger
Whether the account data was removed. 1 - The account data was removed. 0 - The account data was not removed.
One of: 0 1

send_activation_email GET#

Request activation email

This function sends a Site Quality Monitoring activation email to the currently-authenticated Site Quality Monitoring user.

Note: This email contains the Site Quality Monitoring activation code.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

send_activation_emailinteger
Whether the request to send an activation email was successful. 1 - The request was successful. An activation email will send. 0 - The request was not successful. An activation email will not send.
One of: 0 1

update_domain POST#

Update domain name in Site Quality Monitoring project

This function updates the domain name for a Site Quality Monitoring project. It searches through all projects owned by the user to find systems that match the specified old domain and updates them to use the new domain. This is typically used when a website's domain name changes and the monitoring configuration needs to be updated accordingly.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

systemobject
Information about the updated monitoring system.
idinteger
The system's ID number.
namestring
The updated system name (typically the new domain).
system_sizeobject
Information about the system's subscription plan.
idinteger
The system size ID number.
namestring
The name of the system size/subscription plan.
urlstring
The updated system URL with the new domain.

verify_code GET#

Validate activation code

This function validates the activation code in a cPanel user's Site Quality Monitoring registration email.

codestringRequired
The user's Site Quality Monitoring activation code. Note: A user will receive an email with their activation code when they create a Site Quality Monitoring user account.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

statusinteger
Whether the user's activation code is valid. 1 - Valid. 0 - Invalid.
One of: 0 1