migrationinfo — EAPI
Read migration discovery information using the local Eenos command-line API, with syntax, output fields, errors and Shell/Python/PHP examples.
/usr/bin/eapi migrationinfoLocal read-only commandReturns schema_version 1, installed Eenos version, full packages, sorted account summaries, reseller names and full reseller_details. It collects discovery data only: it does not create backups, transfer files, restore accounts or change DNS. Account summaries contain name, domain, home, owner, package, contactemail, suspended, is_reseller, disk_usage, ipv4, ipv6 and domains. Home comes from homedir; address fields come from dedicatedip, including stored shared addresses. Missing optional scalar values remain null. Missing/invalid current-month usage remains null, distinct from a genuine zero. A missing/malformed required account/domain inventory fails the command; it must not be treated as an empty complete discovery.
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 migrationinfo --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": "migrationinfo",
"message": "Eenos migration information retrieved successfully",
"data": {
"schema_version": 1,
"eenos_version": "5.0.0",
"packages": [
{
"name": "starter",
"owner": "root",
"quota": "2048"
}
],
"accounts": [
{
"name": "exampleuser",
"domain": "example.com",
"home": "/home/exampleuser",
"owner": "root",
"package": "starter",
"contactemail": "owner@example.com",
"suspended": false,
"is_reseller": true,
"disk_usage": null,
"ipv4": "192.0.2.10",
"ipv6": null,
"domains": {
"main_domain": "example.com",
"addon_domains": [],
"alias_domains": [],
"subdomains": []
}
}
],
"resellers": [
"exampleuser"
],
"reseller_details": {
"exampleuser": {
"accounts": [],
"name": "exampleuser"
}
}
},
"meta": {
"accounts_count": 1,
"packages_count": 1,
"resellers_count": 1
},
"error": null
}data.schema_version is integer 1. data.eenos_version is the installed version. data.packages contains full package mappings; data.accounts contains account summaries; data.resellers contains reseller names; data.reseller_details maps each reseller name to its full stored record. meta contains accounts_count, packages_count and resellers_count.
Each account domains object contains main_domain, addon_domains, alias_domains and subdomains. Alias domains come from parked_domains and subdomains from the sub_domains mapping keys (or stored list). Lists are sorted and deduplicated; omitted optional categories become empty arrays. The main domain and correctly shaped inventories are required. This is the discovery schema consumed by Eenos migration.
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.