Description

This function lists suspended accounts on the server.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/listsuspended
https://hostname.example.com:2087/cpsess##########/xml-api/listsuspended
whmapi1 listsuspended

{
  "data": {
    "account": [
      {
        "owner": "root",
        "time": "Tue Jul  9 09:17:43 2013",
        "reason": "Too many pictures of cats",
        "is_locked": "0",
        "user": "example",
        "Unixtime": 1373379463
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "listsuspended"
  }
}
<result>
    <data>
        <account>
            <owner>root</owner>
            <time>Tue Jul 9 09:17:43 2013</time>
            <reason>Too many pictures of cats</reason>
            <is_locked>0</is_locked>
            <user>example</user>
            <Unixtime>1373379463</Unixtime>
        </account>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>listsuspended</command>
    </metadata>
</result>

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
accountarray of hashesAn array of hashes of suspended account data.Each hash contains the owner, reason, time, Unixtime, user, and is_locked returns. 

owner

string

The account's owner.

The function returns this value in the account array.

  • root
  • A reseller's username.
  • The account's username.
owner_username

reason

string

The reason why the account is suspended, if one exists.

The function returns this value in the account array.

A valid string.

Suspended for nonpayment.

time

string

The current date and time.

The function returns this value in the account array.

The date and time in Day Mon DD HH:mm:SS YYYY human-readable format, where:

  • Day represents the day of the week as a three-letter abbreviation.
  • Mon represents the month's three-letter abbreviation.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
  • YYYY represents the year.
Thu Nov 18 10:34:34 2014

Unixtime

integer

The current date and time.

The function returns this value in the account array.

A date in Unix time format.1416306874

user

string

The account's username.

The function returns this value in the account array.

A valid cPanel username.username

is_locked

Boolean

Whether the account is locked.

We introduced this return in cPanel & WHM version 11.40.

The function returns this value in the account array.

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