Return email accounts with disk information

This function lists the cPanel account's email accounts with disk information.

Important:

When you disable the Receive Mail role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
domain
string <domain>

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.

Example: domain=example.com
email
string <username>

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.

Note:

To retrieve information for a single email address, add the domain parameter. For example, email=user&domain=example.com will return information for the email address user@example.com.

Example: email=user
get_restrictions
integer
Default: 0

Whether to display restriction status for each of the email addresses.

  • 1 — Display.
  • 0 — Do not display.
Enum: 0 1
Example: get_restrictions=0
infinityimg
string

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.

Example: infinityimg=images/myimg.jpg
infinitylang
integer
Default: 0

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.

Note:

If you specify 1 for this parameter and the infinityimg parameter, the function ignores this parameter and returns HTML code for unlimited diskquota values.

Enum: 0 1
Example: infinitylang=0
maxaccounts
integer >= 1
Default: "unlimited"

The maximum number of email addresses to return. If you do not use this parameter, the function returns an unlimited number of email addresses.

Example: maxaccounts=500
no_disk
integer
Default: 0

Whether to skip the collection of disk usage information.

  • 1 — Do not collect.
  • 0 — Collect.
Enum: 0 1
Example: no_disk=0
no_validate
integer
Default: 0

Whether to skip email database validation.

  • 1 — Skip validation.
  • 0 — Perform the validation.
Enum: 0 1
Example: no_validate=0
regex
string
Default: "An empty string"

A Perl Compatible Regular Expression (PCRE) 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.

Example: regex=/^[a-z0-9_-]{6,18}$/
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Email/list_pops_with_disk
Request samples
uapi --output=jsonpretty \
  --user=username \
  Email \
  list_pops_with_disk
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "list_pops_with_disk",
  • "module": "Email",
  • "result": {
    • "data": [
      • {
        • "_diskquota": 0,
        • "_diskused": 483,
        • "diskquota": "unlimited",
        • "diskused": 0,
        • "diskusedpercent": 0,
        • "diskusedpercent20": 0,
        • "diskusedpercent_float": 0,
        • "domain": "example.com",
        • "email": "user@example.com",
        • "has_suspended": 0,
        • "hold_outgoing": 0,
        • "humandiskquota": "None",
        • "humandiskused": "483 bytes",
        • "login": "user@example.com",
        • "mtime": 1415894498,
        • "suspended_incoming": 0,
        • "suspended_login": 0,
        • "suspended_outgoing": 0,
        • "txtdiskquota": "unlimited",
        • "user": "user"
        }
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}