listaccounts — EAPI
List all hosting accounts using the local Eenos command-line API, with syntax, output fields, errors and Shell/Python/PHP examples.
/usr/bin/eapi listaccountsLocal read-only commandReturns full stored hosting-account mappings, sorted by eligible registry filename, plus computed is_reseller and suspended booleans and disk_usage. These computed fields replace any same-named stored values. This is a server-wide inventory, including reseller hosting accounts; it is not scoped to a reseller API identity. disk_usage is the current-month recorded MB value. Missing/unreadable usage data or invalid/negative amounts produce null; a genuine zero remains zero. The tool does not refresh quotas or repair the database. An unreadable or malformed account record fails the command instead of returning an incomplete success.
Command
Run locally on an Eenos server as effective OS user root or eenos. No HTTP URL, API headers, API password or hosting password is supplied. The command reads server-wide information; it is not a reseller-scoped API call.
/usr/bin/eapi listaccounts --json| Argument or option | Meaning |
|---|---|
--json | JSON output, used by the examples. |
--yaml | YAML output, the default when no format flag is supplied. |
-h, --help | Command help. |
Use only one output format; format flags can precede or follow the subcommand. Do not combine --json and --yaml. Options cannot be abbreviated. This command has no other declared options.
The Python example uses argument-list execution and a 30-second timeout. The PHP example requires PHP 7.4 or later for array-form proc_open (PHP 8 recommended); it bypasses shell parsing and discards stderr while validating stdout JSON and exit status. It has no built-in deadline: the integration worker must impose a process/runtime timeout. Run integrations only in an already authorized local worker context; these snippets do not grant OS privileges. Replace exampleuser/example.com where applicable.
Success output
Exit 0, with string status ok. Illustrative records and version; complete stored mappings can contain additional fields.
{
"status": "ok",
"command": "listaccounts",
"message": "Accounts retrieved successfully",
"data": {
"accounts": [
{
"contactemail": "owner@example.com",
"dedicatedip": {
"ipv4": "192.0.2.10",
"ipv6": null
},
"domain": "example.com",
"homedir": "/home/exampleuser",
"owner": "root",
"package": "starter",
"reseller": {
"selfown": "off",
"status": "on"
},
"user": "exampleuser",
"is_reseller": true,
"suspended": false,
"disk_usage": null
}
]
},
"meta": {
"count": 1
},
"error": null
}data.accounts is an array of full account records; meta.count counts eligible user filenames. is_reseller and suspended are booleans; disk_usage is integer MB or null.
Errors
Exit 1 indicates command/data/serialization failure. Exit 2 indicates invalid CLI arguments or insufficient OS privileges. Inspect the failed envelope and error.code; these are process exit codes and symbolic errors, not HTTP status codes.
See output and error handling for all current error codes, format behavior and integration requirements. Unreadable required records are failures, not empty successful inventories. Account/package output can contain sensitive server configuration; keep it in the authorized integration context.