Page tree
Skip to end of metadata
Go to start of metadata

Description

This function retrieves a summary of a user's account.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/accountsummary?api.version=1&user=username
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/accountsummary?api.version=1&user=username
 Command Line
whmapi1 accountsummary user=username

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "data": {
    "acct": [
      {
        "maxaddons": "unlimited",
        "outgoing_mail_suspended": 0,
        "outgoing_mail_hold": 0,
        "ip": "10.215.214.95",
        "uid": 999,
        "min_defer_fail_to_trigger_protection": "5",
        "legacy_backup": 0,
        "diskused": "14M",
        "maxftp": "unlimited",
        "startdate": "13 May 22 16:03",
        "max_defer_fail_percentage": "unlimited",
        "disklimit": "unlimited",
        "is_locked": 0,
        "inodesused":"1",
        "inodeslimit":"unlimited",
        "suspendtime": null,
        "email": "user@example.com",
        "domain": "example.com",
        "unix_startdate": 1369256589,
        "user": "user",
        "plan": "extensions_user_user",
        "shell": "/bin/bash",
        "maxpop": "unlimited",
        "backup": 0,
        "theme": "paper_lantern",
        "owner": "root",
        "max_email_per_hour": "unlimited",
        "ipv6": ["0101:ca75:0101:ca75:0101:ca75:0101:ca77"
          
        ],
        "suspendreason": "not suspended",
        "maxlst": "unlimited",
        "suspended": 0,
        "maxsql": "unlimited",
        "maxparked": "unlimited",
        "partition": "home",
        "maxsub": "unlimited"
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "accountsummary"
  }
}
 Output (XML)
<result>
    <data>
        <acct>
            <maxaddons>unlimited</maxaddons>
            <inodesused>1</inodesused>
            <inodeslimit>unlimited</inodeslimit>
            <ip>10.215.214.95</ip>
            <uid>999</uid>
            <ipv6>0101:ca75:0101:ca75:0101:ca75:0101:ca75</ipv6>
            <outgoing_mail_suspended>0</outgoing_mail_suspended>
            <outgoing_mail_hold>0<outgoing_mail_hold>
 <min_defer_fail_to_trigger_protection>5</min_defer_fail_to_trigger_protection>
            <legacy_backup>0</legacy_backup>
            <diskused>14M</diskused>
            <maxftp>unlimited</maxftp>
            <startdate>13 May 22 16:03</startdate>
            <max_defer_fail_percentage>unlimited</max_defer_fail_percentage>
            <disklimit>unlimited</disklimit>
            <is_locked>0</is_locked>
            <suspendtime/>
            <email>user@example.com</email>
            <domain>example.com</domain>
            <unix_startdate>1369256589</unix_startdate>
            <user>user</user>
            <plan>extensions_user_user</plan>
            <shell>/bin/bash</shell>
            <maxpop>unlimited</maxpop>
            <backup>0</backup>
            <theme>paper_lantern</theme>
            <owner>root</owner>
            <max_email_per_hour>unlimited</max_email_per_hour>
            <suspendreason>not suspended</suspendreason>
            <maxlst>unlimited</maxlst>
            <suspended>0</suspended>
            <maxsql>unlimited</maxsql>
            <maxparked>unlimited</maxparked>
            <partition>home</partition>
            <maxsub>unlimited</maxsub>
        </acct>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>accountsummary</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

Note:

You must use either the user or domain parameters. 

ParameterTypeDescriptionPossible valuesExample
userstring

The account's username.

The username of an account on the server.

username
domainstringThe account's main domain.The main domain for an account on the server.example.com

 

Returns

ReturnTypeDescriptionPossible valuesExample
acctarray of hashesAn array of hashes of account data.Each hash includes the backup, disklimit, diskused, domain, email, ip, ipv6, is_locked, legacy_backup, max_defer_fail_percentage, max_email_per_hour, maxaddons, maxftp, maxlst, maxparked, maxpop, maxsql, maxsub, uid, min_defer_fail_to_trigger_protection, outgoing_mail_suspended, outgoing_mail_hold, owner, partition, plan, shell, startdate, suspended, suspendreason, suspendtime, theme, unix_startdate, and user returns. 

backup

Boolean

Whether backups are enabled.

The function returns this value in the acct hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

disklimit

string

The account's disk space quota.

The function returns this value in the acct hash.

  • unlimited
  • A maximum amount of disk space, in Megabytes (MB).
unlimited

diskused

string

The account's current disk space usage.

The function returns this value in the acct hash.

An integer that represents an amount of disk space, in Megabytes (MB).

For example, 14M represents 14 MB of disk space.

14M

domain

string

The account's main domain.

The function returns this value in the acct hash.

A valid domain name on the account.example.com

email

string

The account's contact email address.

The function returns this value in the acct hash.

A valid email address.username@example.com

inodesused

integer

The number of files that the account owns.

Note:

We introduced this return in cPanel & WHM version 64.

The function returns this value in the acct array.

  • A positive integer.
1

inodeslimit

integer
The limit on the number of files that the account owns .

Note:

We introduced this return in cPanel & WHM version 64.

This function returns this value in the acct array.

  • unlimited
  • A positive integer.
unlimited

ip

string

The account's main domain's IP address.

The function returns this value in the acct hash.

A valid IP address.192.168.0.128

uid

integer

The account's user ID on the system.

Note:

We introduced this return in cPanel & WHM version 62.

The function returns this value in the acct hash.

A valid integer. 

ipv6

hash

The account's main domain's IPv6 address.

The function returns this value in the acct hash.

A valid IPv6 address.
0101:ca75:0101:ca75:0101:ca75:0101:ca77

is_locked

Boolean

Whether the account is currently locked.

The function returns this value in the acct hash.

  • 1 — Locked.
  • 0 — Not locked.
0

legacy_backup

Boolean

Whether legacy backups are enabled.

The function returns this value in the acct hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

max_defer_fail_percentage

string

The percentage of failed or deferred email messages that the account can send per hour before outgoing mail is rate-limited.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a percentage of messages.
unlimited

max_email_per_hour

string

The maximum number of emails that the account can send in one hour.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of sent emails.
unlimited

maxaddons

string

The account's maximum number of addon domains.

The function returns this value in the acct hash.

  • unlimited
  • *unknown* — The account cannot use any addon domains.
  • An integer that represents a number of addon domains.
unlimited

maxftp

string

The account's maximum number of FTP accounts.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of FTP accounts.
unlimited

maxlst

string

The account's maximum number of mailing lists.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of mailing lists.
unlimited

maxparked

string

The account's maximum number of parked domains (aliases).

The function returns this value in the acct hash.

  • unlimited
  • *unknown* — The account cannot use any parked domains.
  • An integer that represents a number of parked domains.
unlimited  

maxpop

string

The account's maximum number of email addresses.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of email accounts.
unlimited

maxsql

string

The account's maximum number of SQL databases.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of SQL databases.
unlimited  

maxsub

string

The account's maximum number of subdomains.

The function returns this value in the acct hash.

  • unlimited
  • *unknown* — The account cannot use any subdomains.
  • An integer that represents a number of subdomains.
unlimited  

min_defer_fail_to_trigger_protection

string

The minimum number of failed or deferred messages that the account can send before outgoing mail is subject to rate-limiting.

The function returns this value in the acct hash.

  • unlimited
  • An integer that represents a number of failed or deferred messages.
5

outgoing_mail_suspended

Boolean

Whether to suspend outgoing email from the account's users and forcefailureof any of their mail currently in the mail queue.

Note:

If mail for a cPanel user's account is suspended, the system will reject their email before the system puts it in the mail server queue.

The function returns this value in the acct hash.

Note:

We introduced this return in cPanel & WHM version 56.

  • 1 — Suspend and forcefailure of outgoing email.
  • 0 — Unsuspend outgoing email.
0

outgoing_mail_hold

Boolean

Whether to retain outgoing mail in the mail queue for the account's users.

The function returns this value in the acct hash.

Note:

We introduced this return in cPanel & WHM version 56.

  • 1 — Suspend and forcefailure of outgoing email.
  • 0 — Unsuspend outgoing email.
0

owner

string

The account's owner.

The function returns this value in the acct hash.

  • root
  • A reseller account's username.
root

partition

string

The partition that contains the account's home directory.

The function returns this value in the acct hash.

The name of a partition on the server.home

plan

string

The account's hosting package.

The function returns this value in the acct hash.

The name of a package on the server.packagename

shell

string

The account's shell.

The function returns this value in the acct hash.

A shell location on the server./bin/bash

startdate

string

The account creation date.

The function returns this value in the acct hash.

The date in YY-Mon-DD HH-mm human-readable format, where:

  • YY represents the year.
  • Mon represents the month.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
13 May 22 16:03

suspended

Boolean

Whether the account is currently suspended.

The function returns this value in the acct hash.

  • 1 — Suspended.
  • 0 — Not suspended.
0

suspendreason

string

The reason for account suspension, if one was provided.

The function returns this value in the acct hash.

  • null — The account is not currently suspended.
  • A blank value, if thesuspenderdid not provide a reason.
  • A message that explains the suspension.
not suspended

suspendtime

string

The time of suspension.

The function returns this value in the acct hash.

  • null — The account is not currently suspended.
  • The time at which the account became suspended.
null

theme

string

The account's cPanel interface theme.

The function returns this value in the acct hash.

  • paper_lantern
  • Another valid theme on the server.
paper_lantern

unix_startdate

string

The account creation date.

The function returns this value in the acct hash.

The account creation date and time, in Unix time format.1369256589

user

string

The account username.

The function returns this value in the acct hash.

A cPanel account or reseller username on the server.username