cPanel/Sitejet
cPanel module

Sitejet

13 functions, invoked through the cpanel_uapi tool.

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

add_api_token GET#

Add an existing Sitejet API token.

This function adds an existing Sitejet API token to a cPanel user.

Note:

You can create a Sitejet API token with the Sitejet:create_account function.

api_tokenstringRequired
The Sitejet API token to add.

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

Payload varies by call.

can_create_domains GET#

Return Domain Availability

This function returns whether a cPanel account can create new subdomains or addon domains.

Note:

Creating a new addon domain is dependent on the creation of subdomains. If the cPanel account has reached its limit for subdomains, you cannot create a new addon domain, even if the limit for addon domains has not been reached.

No parameters.

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

Whether the cPanel user can create a new subdomin or addon domain. 1 - The cPanel user can create a new subdomain or addon domain. 0 - The cPanel user can not create a new subdomain or addon domain.

create_account GET#

Generate a Sitejet API key.

This function creates a Sitejet API token for a cPanel account.

No parameters.

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

keystring
The Sitejet API token for the cPanel account.

create_restore_point GET#

Create a restore point.

This function creates a restore point for a domain's document root and removes the domain's files.

domainstringRequired
A cPanel account's domain.

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

Payload varies by call.

create_website GET#

Create Sitejet domain ID

This function creates a Sitejet ID for the specified domain.

Note:

A unique Sitejet ID is assigned to each domain on the cPanel account.

companystringRequired
The name of the company the website represents.
domainstringRequired
A cPanel account's domain.
assignTostringOptional
Assign website to other user.
citystringOptional
The city where the company or website owner is located.
countrystringOptional
The country where the company or website owner is located.
emailstringOptional
The email address of the website owner.
firstnamestringOptional
The first name of the website owner.
languagestringOptional
The language to use for the Sitejet Website Builder.
lastnamestringOptional
The last name of the website owner.
metadatastringOptional
Additional metadata for the website.
notestringOptional
Additional notes about the website.
phonestringOptional
The phone number of the company or website owner.
streetstringOptional
The street address of the company or website owner.
titlestringOptional
The website title.
zipstringOptional
The zip code where the company or website owner is located.

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

websiteIDinteger
The website ID of the created website.

get_all_user_sitejet_info GET#

Return Sitejet domains

This function returns the Sitejet domains' information for the cPanel account.

domainstringOptional
The single domain to return Sitejet information.

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

Payload varies by call.

get_api_token GET#

Return Sitejet API token

This function returns the cPanel account's Sitejet API token.

No parameters.

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

The cPanel account's Sitejet API token.

get_preview_url GET#

Return Sitejet preview URL

This function returns a Sitejet website's preview URL.

websiteIdintegerRequired
The Sitejet website ID for the domain.

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

The Sitejet website's preview URL.

get_templates GET#

Return Sitejet templates

This function fetches the list of available Sitejet templates.

No parameters.

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

Payload varies by call.

restore_document_root GET#

Restore a domain from the restore point.

This function reverts a document root to the restore point.

domainstringRequired
A cPanel account's domain.

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

Payload varies by call.

set_template GET#

Update Sitejet template

This function sets a Sitejet website's template.

domainstringRequired
A cPanel account's domain.
templateIdstringRequired
The Sitejet template's ID.
templateNamestringRequired
The Sitejet template name.

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

Payload varies by call.

start_publish GET#

Publish Sitejet domain

This function publishes a domain's Sitejet website.

domainstringRequired
The domain for the Sitejet website.
cleanupintegerOptional
Whether to cleanup the domain's document_root directory during the publication process. 1 — Remove previous files in domain's document_root directory during the publication process. 0 — Do not remove any files in domain's document_root directory during the publication process.

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

file_namestring
Deprecated. The publish process's log file name. The poll_publish function no longer requires this value; it derives the log path server-side from pid. This field is retained for backward compatibility and may be removed in a future release. The system stores this file in the logs/ directory, relative to the cPanel account's home directory.
pidinteger
The publish action's process ID.