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

 

Description

This function retrieves a user's account summary.

Examples 


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

Notes:

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

 Output (JSON)
{
  "acct": [
    {
      "maxaddons": "unlimited",
      "inodesused":"1",
      "inodeslimit":"unlimited",
      "ip": "192.168.0.128",
      "outgoing_mail_suspended": 0,
      "outgoing_mail_hold": 0,
      "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,
      "suspendtime": null,
      "email": "username@example.com",
      "domain": "example.com",
      "unix_startdate": 1369256589,
      "user": "username",
      "plan": "packagename",
      "shell": "/bin/bash",
      "maxpop": "unlimited",
      "backup": 0,
      "theme": "paper_lantern",
      "owner": "root",
      "max_email_per_hour": "unlimited",
      "ipv6": [
        
      ],
      "suspendreason": "not suspended",
      "maxlst": "unlimited",
      "suspended": 0,
      "maxsql": "unlimited",
      "maxparked": "unlimited",
      "partition": "home",
      "maxsub": "unlimited"
    }
  ],
  "statusmsg": "Ok",
  "status": 1
}
 Output (XML)
<accountsummary>
    <acct>
        <backup>0</backup>
        <disklimit>unlimited</disklimit>
        <diskused>14M</diskused>
        <domain>example.com</domain>
        <email>username@example.com</email>
        <inodesused>none</inodesused>
        <inodeslimit>unlimited</inodeslimit>
        <ip>192.168.0.128</ip>
        <ipv6>0101:ca75:0101:ca75:0101:ca75:0101:ca75</ipv6>
        <outgoing_mail_suspended>0</outgoing_mail_suspended>
        <outgoing_mail_hold>0<outgoing_mail_hold>
        <is_locked>0</is_locked>
        <legacy_backup>0</legacy_backup>
        <max_defer_fail_percentage>unlimited</max_defer_fail_percentage>
        <max_email_per_hour>unlimited</max_email_per_hour>
        <maxaddons>unlimited</maxaddons>
        <maxftp>unlimited</maxftp>
        <maxlst>unlimited</maxlst>
        <maxparked>unlimited</maxparked>
        <maxpop>unlimited</maxpop>
        <maxsql>unlimited</maxsql>
        <maxsub>unlimited</maxsub>
        <min_defer_fail_to_trigger_protection>5</min_defer_fail_to_trigger_protection>
        <owner>root</owner>
        <partition>home</partition>
        <plan>packagename</plan>
        <shell>/bin/bash</shell>
        <startdate>13 May 22 16:03</startdate>
        <suspended>0</suspended>
        <suspendreason>not suspended</suspendreason>
        <suspendtime/>
        <theme>paper_lantern</theme>
        <unix_startdate>1369256589</unix_startdate>
        <user>username</user>
    </acct>
    <status>1</status>
    <statusmsg>Ok</statusmsg>
</accountsummary>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The account's username.

The username of a cPanel account or WHM account on the server.

username

Returns

ReturnTypeDescriptionPossible valuesExample
acctarray of hashesAn array of hashes of account data.Each hash includes the ipv6 array and the backup, disklimit, diskused, domain, email, ip, is_locked, legacy_backup, max_defer_fail_percentage, max_email_per_hour, maxaddons, maxftp, maxlst, maxparked, maxpop, maxsql, maxsub, 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 IPv4 address.192.168.0.128

ipv6

array

The account's main domain's IPv6 address.

The function returns this array 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 — The account is locked.
  • 0 — The account is 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 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 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 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 force failure of 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 force failure 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 — Retain outgoing email failure.
  • 0 — Do not retain 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 account creation date and time, in YY Mon DD HH:MM format, where:

  • YY represents the year.
  • Mon represents the month.
  • DD represents the day.
  • 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.
  • 0Not suspended.
0

suspendreason

string

The reason for account suspension, if the suspender provided one.

The function returns this value in the acct hash.

  • null — The account is not currently suspended.
  • A blank value, if the suspender did 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.

The user input parameter's value.username

status

BooleanWhether the system successfully called the function.
  • 1 — Success.
  • 0 — Failure.

 

1
statusmsgstringA message of success or a reason for failure.
  • Ok
  • An error message.
Ok