Show an Account's Information — accountsummary

This function displays pertinent information about a specific account.

Calling Functions

Using the XML API

To use the XML API to perform the accountsummary function from within your custom script:

  • Append the /xml-api/accountsummary function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/xml-api/accountsummary

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Using the JSON API

To use the JSON API to perform the accountsummary function from within your custom script:

  • Append the /json-api/accountsummary function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/json-api/accountsummary

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Variables

Input

The accountsummary function takes the following required variable as input:

  • user — Username associated with the acount you wish to display.

Output

  • accountsummary — Root-level XML tag for the output of the accountsummary function.
    • acct — Container for the account information.
      • disklimit (string) — Disk space usage limit for the account, in Megabytes.
      • diskused (string) — Current disk space usage for the account, in Megabytes.
      • domain (string) — Name of the root domain for the account.
      • email (string) — Contact email address for the account.
      • ip (string) — The IP address of the root domain on the account.
      • maxaddons(int) — The maximum number of Addon Domains available to the account.
      • maxftp(int) — The maximum number of FTP accounts available to the account.
      • maxlst(int) — The maximum number of mailing lists available to the account.
      • maxparked(int) — The maximum number of parked domains available to the account.
      • maxpop(int) — The maximum number of email account available to the account.
      • maxsql(int) — The maximum number of SQL databases available to the account.
      • maxsub(int) — The maximum number of subdomains available to the account.
      • owner (string) — Reseller or root owner of the account.
      • partition (string) — The disk/partition that the user's home directory is located on.
      • plan (string) — Hosting package associated with the account.
      • shell (string) — The current shell the account is set to use.
      • startdate (string) — The date the account was created.
      • suspended — Shows whether an account is suspended or not.
        • 1 — yes.
        • 0 — no.
      • suspendedreason (string) — Account suspension reason. This is added by the reseller/user who suspended the account.
      • theme (string) — cPanel interface theme associated with the account.
      • unix_startdate (integer) — Date and time the account was created. Format: Unix time.
      • user (string) — Username associated with the account.
    • status (boolean) — Status of the operation.
      • 1 — success.
      • 0 — failure.
    • statusmsg (string) — Relevant information about the operation.

Examples

XML API

Calling this URL in WebHost Manager:

https://example.com:2087/xml-api/accountsummary?user=username

will produce output similar to:

<accountsummary> 
     <acct>
            <disklimit>1000M</disklimit>
            <diskused>172M</diskused>
            <domain>domain.tld</domain>
            <email>email@domain.tld</email>
            <ip>127.0.0.1</ip>
            <owner>root</owner>
            <partition>home</partition>
            <plan>reseller_planname</plan>
            <startdate>04 May 8 21:12</startdate>
            <suspended>1</suspended>
            <suspendedreason>Account suspended due to hosting 
             of pirated software.</suspendedreason>
            <theme>x3</theme>
            <unix_startdate>1104173413</unix_startdate>
            <user>username</user>
      </acct>
      <status>1</status>
      <statusmsg>Ok</statusmsg> 
</accountsummary> 

JSON API

Calling this URL in WebHost Manager:

https://example.com:2087/json-api/accountsummary?user=username

will produce output similar to:

{
   "status":1,
   "statusmsg":"Ok",
   "acct":[
      {
         "partition":"home",
         "startdate":"09 May 19 07:49",
         "plan":"level3 ",
         "suspended":0,
         "theme":"x3",
         "user":"gus",
         "unix_startdate":1242737345,
         "suspendreason":"not suspended",
         "suspendtime":null,
         "ip":"127.0.0.1",
         "domain":"example.com",
         "diskused":"0M",
         "owner":"username",
         "email":"*unknown*",
         "disklimit":"unlimited"
      }
   ]
}

Topic revision: r3 - 19 Nov 2009 - 15:11:01 - Main.MattDees
 

Copyright © cPanel 2000-2009.