cPanel

App · 20 actions

Inspect domains, mailboxes, databases, usage and hosting settings in cPanel.

Actions

ActionWhat it does
Count email accountsCount email accounts.
Get default PHP versionGet default PHP version.
Get disk quotaGet disk quota.
Get domain settingsGet domain settings.
Get MySQL server informationGet MySQL server information.
Get primary domainGet primary domain.
Get resource usageGet resource usage.
List domain mail forwardersList domain mail forwarders.
List domain PHP versionsList domain PHP versions.
List domain settingsList domain settings.
List domainsList domains.
List email accountsList email accounts.
List email domainsList email domains.
List Git repositoriesList Git repositories.
List installed PHP versionsList installed PHP versions.
List mail exchanger recordsList mail exchanger records.
List mailbox storage usageList mailbox storage usage.
List MySQL databasesList MySQL databases.
List MySQL usersList MySQL users.
List Passenger applicationsList Passenger applications.

Count email accounts

Count email accounts.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": 1,
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get default PHP version

Get default PHP version.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "version": "example"
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get disk quota

Get disk quota.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "inode_limit": "example",
        "inodes_remain": "example",
        "inodes_used": "example",
        "megabyte_limit": "example",
        "megabytes_remain": "example",
        "megabytes_used": "example",
        "under_inode_limit": 1,
        "under_megabyte_limit": 1,
        "under_quota_overall": 1
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get domain settings

Get domain settings.

Inputs

DomaindomaintextRequired
The domain on the cPanel account.
Hide temporary domainshide_temporary_domainsnumber
Whether to hide temporary domains from the returned values.One of: 1, 0.
Return HTTPS redirect statusreturn_https_redirect_statusnumber
Whether to return the secure redirect status of the addon domains. * 1 - Return status. * 0 - Do **not** return status.One of: 0, 1.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "all_aliases_valid": 1,
        "can_https_redirect": 1,
        "customlog": {
          "domain": "example",
          "target": "example"
        },
        "documentroot": "example",
        "domain": "example",
        "group": "example",
        "hascgi": 1,
        "homedir": "example",
        "ifmodulemodsuphpc": {
          "group": "example"
        },
        "ip": "example",
        "is_https_redirecting": 1,
        "is_temporary": 1,
        "options": "example",
        "owner": "example",
        "phpopenbasedirprotect": 1,
        "port": 1,
        "scriptalias": {
          "path": "example",
          "url": "example"
        },
        "serveradmin": "example",
        "serveralias": "example",
        "servername": "example",
        "type": "example",
        "usecanonicalname": "example",
        "user": "example",
        "userdirprotect": 1
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get MySQL server information

Get MySQL server information.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "host": "example",
        "is_remote": 1,
        "version": "example"
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get primary domain

Get primary domain.

Inputs

Hide temporary domainshide_temporary_domainsnumber
Whether to hide temporary domains from the response.One of: 1, 0.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "primary_domain": "example"
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

Get resource usage

Get resource usage.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "description": "example",
          "error": "example",
          "formatter": "example",
          "id": "example",
          "maximum": 1,
          "url": "example",
          "usage": 1
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List domain mail forwarders

List domain mail forwarders.

Inputs

Domaindomaintext
The domain name to query. If you do not use this parameter, the function returns all domain-level forwarders on the cPanel account.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "dest": "example",
          "forward": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List domain PHP versions

List domain PHP versions.

Inputs

Vhostvhosttext
The PHP Virtual Hostname.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "account": "example",
          "account_owner": "example",
          "documentroot": "example",
          "homedir": "example",
          "main_domain": 1,
          "php_fpm": 1,
          "php_fpm_pool_parms": {},
          "phpversion_source": [
            {}
          ],
          "version": "example",
          "vhost": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List domain settings

List domain settings.

Inputs

Formatformattext
The function's return format.One of: hash, list.
Hide temporary domainshide_temporary_domainsnumber
Whether to hide temporary domains from the response arrays.One of: 1, 0.
Return HTTPS redirects statusreturn_https_redirects_statusnumber
Whether to return the secure redirect status of the addon domains.One of: 1, 0.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": "example",
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List domains

List domains.

Inputs

Hide temporary domainshide_temporary_domainsnumber
Whether to hide temporary domains from the response arrays.One of: 1, 0.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "addon_domains": [
          "example"
        ],
        "is_temporary": {},
        "main_domain": "example",
        "parked_domains": [
          "example"
        ],
        "sub_domains": [
          "example"
        ]
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List email accounts

List email accounts.

Inputs

No validateno_validatenumber
Whether to skip the email database's validation check. * 1 ; Skip the validation check. * 0 ; Run the validation check.One of: 0, 1.
Regexregextext
A [Perl Compatible Regular Expression (PCRE)](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) that filters the results.
Skip mainskip_mainnumber
Whether to exclude the cPanel account's main account from the results. * 1 ; Exclude the main account. * 0 ; Include the main account.One of: 0, 1.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "email": "example",
          "login": "example",
          "suspended_incoming": 1,
          "suspended_login": 1
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List email domains

List email domains.

Inputs

Add wwwadd_wwwnumber
Whether to list www. addresses. * 1 ; List www. addresses. * 0 ; Do **not** list www. addresses. For example, if you specify 1, the function's output would include both example.com and www.example.com. If you specify 0, the output would include **only** example.com.One of: 0, 1.
Include wildcardinclude_wildcardnumber
Whether to list wildcard addresses. * 1 ; List wildcard addresses. * 0 ; Do **not** list wildcard addresses. For example, if you specify 1, the function's output would include both example.com and *.example.com. If you specify 0, the output would include **only** example.com.One of: 0, 1.
Return temporary domainreturn_temporary_domaintrue/false
Whether to include temporary domains (*.cpanel.site) in the output. By default, temporary domains are excluded.
Selectselecttext
The name of the domain that the function returns with the select output parameter. If you do **not** use this parameter, the function will **not** return the select parameter with any domains.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "domain": "example",
          "select": 1
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List Git repositories

List Git repositories.

Inputs

Fieldsfieldstext
A comma-separated list of desired return values.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "available_branches": [
            "example"
          ],
          "branch": "example",
          "clone_urls": {},
          "deployable": 1,
          "last_deployment": {},
          "last_update": {},
          "name": "example",
          "repository_root": "example",
          "source_repository": {},
          "tasks": [
            {}
          ],
          "type": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List installed PHP versions

List installed PHP versions.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {
        "versions": [
          "example"
        ]
      },
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List mail exchanger records

List mail exchanger records.

Inputs

Domaindomaintext
The domain to query. If you do **not** use this parameter, the function returns MX records for all of the cPanel account's domains.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "alwaysaccept": 1,
          "detected": "example",
          "domain": "example",
          "entries": [
            {}
          ],
          "local": 1,
          "mx": "example",
          "mxcheck": "example",
          "remote": 1,
          "secondary": 1,
          "status": 1,
          "statusmsg": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List mailbox storage usage

List mailbox storage usage.

Inputs

Domaindomaintext
A domain name to filter the results by. If you do **not** use this parameter, the function returns **all** of the cPanel account's email addresses.
Emailemailtext
The cPanel user account to query. If you do **not** use this parameter, the function returns the email addresses for **all** cPanel accounts that the user owns.
Get restrictionsget_restrictionsnumber
Whether to display restriction status for each of the email addresses. * 1 ; Display. * 0 ; Do **not** display.One of: 0, 1.
Infinityimginfinityimgtext
An image to display for email addresses with an unlimited quota. If you specify an infinityimg value, the function returns HTML code to display that image as the diskquota parameter's value.
Infinitylanginfinitylangnumber
Whether to return the ∞ character for email addresses with an unlimited quota. * 1 ; Return the ∞ character for unlimited diskquota values. * 0 ; Return the string unlimited for unlimited diskquota values.One of: 0, 1.
Maxaccountsmaxaccountsnumber
The maximum number of email addresses to return. If you do not use this parameter, the function returns an unlimited number of email addresses.At least 1.
No diskno_disknumber
Whether to skip the collection of disk usage information. * 1 ; Do **not** collect. * 0 ; Collect.One of: 0, 1.
No validateno_validatenumber
Whether to skip email database validation. * 1 ; Skip validation. * 0 ; Perform the validation.One of: 0, 1.
Regexregextext
A [Perl Compatible Regular Expression (PCRE)](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) that filters the results. For example, /^[a-z0-9_-]{6,18}$/ matches the local portion of an email address, if it contains between six and 18 characters.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "_diskquota": 1,
          "_diskused": 1,
          "diskquota": "example",
          "diskused": 1,
          "diskusedpercent": 1,
          "diskusedpercent20": 1,
          "diskusedpercent_float": 1,
          "domain": "example",
          "email": "example",
          "has_suspended": 1,
          "hold_outgoing": 1,
          "humandiskquota": "example",
          "humandiskused": "example",
          "login": "example",
          "mtime": 1,
          "suspended_incoming": 1,
          "suspended_login": 1,
          "suspended_outgoing": 1,
          "txtdiskquota": "example",
          "user": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List MySQL databases

List MySQL databases.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "database": "example",
          "disk_usage": 1,
          "users": [
            "example"
          ]
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List MySQL users

List MySQL users.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": [
        {
          "databases": [
            "example"
          ],
          "shortuser": "example",
          "user": "example"
        }
      ],
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {
        "transformed": 1
      },
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

List Passenger applications

List Passenger applications.

Inputs

None.

Outputs

dataobject
The response from cPanel.
Example output
{
  "data": {
    "apiversion": 1,
    "func": "example",
    "module": "example",
    "result": {
      "data": {},
      "errors": [
        "example"
      ],
      "messages": [
        "example"
      ],
      "metadata": {},
      "status": 1,
      "warnings": [
        "example"
      ]
    }
  }
}

On this page