Skip to main content

listaccts

List All Eenos Accounts

To list all Eenos hosting accounts via API.

Required Headers

Field Description Example
X-RESELLER The reseller account user name alphareseller
X-API-USER API user  name eenos_api
X-API-PASSWORD API  user password eenos123

Status  Codes

Code Description
200 OK, Success
500 Server Error
403 Forbidden 
400 Bad request

Request URL

Post url  = /listaccts/

Default Full URL =  https://your-host-name:4444/api/listaccts/

Version Full URL =  https://your-host-name:4444/api/v1/listaccts/

Sample Curl Code

#!/bin/bash

REQUEST_URL="/listaccts/"
BASE_URL="https://your-host-name:4444/api/v1"

# Default base URL
# BASE_URL="https://your-host-name:4444/api"

# Version specific base URL (recommended)
# BASE_URL="https://your-host-name:4444/api/v1"

API_URL="$BASE_URL$REQUEST_URL"

/usr/bin/curl -X POST "$API_URL" \
    -H "X-RESELLER: alphareseller" \
    -H "X-API-USER: eenos_api" \
    -H "X-API-PASSWORD: eenos123"

Sample Output

{
   "data" : {
      "accounts" : {
         "a111user" : {
            "addondomains" : "unlimited",
            "bandwidth" : "1048576",
            "contactemail" : "sdsd@sdsds.com",
            "dedicatedip" : {
               "ipv4" : "x.x.x.x",
               "ipv6" : "x:x:x:x:bbbb:0000:0000:x",
               "status" : "off",
               "status6" : "on"
            },
            "dkim" : "off",
            "domain" : "0000testongfor.com",
            "email" : "unlimited",
            "feature" : "Xls",
            "ftp" : "unlimited",
            "homedir" : "/home/a111user",
            "is_reseller" : "yes",
            "is_suspended" : "no",
            "language" : "en",
            "maillist" : "unlimited",
            "mailquota" : "unlimited",
            "mailserver" : "remote",
            "nameservers" : [
               "dns.a.com",
               "ns2.b.com",
               "ns3.c.com"
            ],
            "owner" : "root",
            "package" : "AoneHost",
            "parkeddomains" : "unlimited",
            "quota" : "unlimited",
            "reseller" : {
               "selfown" : "on",
               "status" : "on"
            },
            "setuptime" : "2021-01-24 00:44",
            "shell" : {
               "shell" : "/bin/bash",
               "status" : "on"
            },
            "spf" : "on",
            "sql" : "unlimited",
            "subdomains" : "unlimited",
            "theme" : "default",
            "user" : "a111user"
         },
        "sysvm" : {
            "addondomains" : "0",
            "bandwidth" : "1048576",
            "contactemail" : "asa@sysvm.com",
            "dedicatedip" : {
               "ipv4" : "x.x.x.204",
               "ipv6" : "x:x:x:2093:bbbb:0000:0000:002a",
               "status" : "off",
               "status6" : "on"
            },
            "dkim" : "on",
            "domain" : "sysvm.net",
            "email" : "0",
            "feature" : "Default",
            "ftp" : "0",
            "homedir" : "/home/sysvm",
            "is_reseller" : "yes",
            "is_suspended" : "no",
            "language" : "en",
            "maillist" : "0",
            "mailquota" : "0",
            "mailserver" : "local",
            "nameservers" : [
               "ns1.as.com",
               "ns2.as.com"
            ],
            "owner" : "sysvm",
            "package" : "100Gb",
            "parkeddomains" : "0",
            "quota" : "102404",
            "reseller" : {
               "selfown" : "on",
               "status" : "on"
            },
            "setuptime" : "2021-06-27 01:12",
            "shell" : {
               "shell" : "/bin/bash",
               "status" : "on"
            },
            "spf" : "on",
            "sql" : "0",
            "subdomains" : "0",
            "theme" : "default",
            "user" : "sysvm"
         }
      }
   },
   "info" : "Return eenos hosting accounts",
   "status" : 200
}

Python Code
#!/usr/bin/python3
import requests
from pprint import pprint

# ---------------------------------------------------------------------
# API VERSION RULES
# ---------------------------------------------------------------------
# Default API (stable):
#   https://your-host-name:4444/api/
#
# Versioned API (recommended for production / future compatibility):
#   https://your-host-name:4444/api/v1/
#
# Endpoint example:
#   listaccts/
#   Full versioned URL:
#   https://your-host-name:4444/api/v1/listaccts/
#
# This endpoint does NOT require a payload body.
# ---------------------------------------------------------------------

# API URL (versioned)
api_url = "https://your-host-name:4444/api/v1/listaccts/"

# If using default API, uncomment below:
# api_url = "https://your-host-name:4444/api/listaccts/"

# Authentication headers (new API format)
headers = {
    "X-RESELLER": "alphareseller",
    "X-API-USER": "eenos_api",
    "X-API-PASSWORD": "eenos123",
}

try:
    response = requests.post(api_url, headers=headers)
    response.raise_for_status()
    pprint(response.json())
except Exception as e:
    pprint(str(e))
PHP Code
<?php

/*
|--------------------------------------------------------------------------
| API VERSION RULES
|--------------------------------------------------------------------------
| Default API (stable):
|   https://your-host-name:4444/api/
|
| Versioned API (recommended for production / future compatibility):
|   https://your-host-name:4444/api/v1/
|
| Endpoint example:
|   listaccts/
|   Full versioned URL:
|   https://your-host-name:4444/api/v1/listaccts/
|--------------------------------------------------------------------------
*/

// API request URL (versioned)
$request_url = '/listaccts/';

/*
|--------------------------------------------------------------------------
| BASE URL SELECTION
|--------------------------------------------------------------------------
*/

// Versioned API base URL
$base_url = 'https://your-host-name:4444/api/v1';

// Default API base URL (uncomment if needed)
// $base_url = 'https://your-host-name:4444/api';

// Full API URL
$api_url = $base_url . $request_url;

// Initialize cURL
$ch = curl_init($api_url);

// No payload required
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Authentication headers (new API format)
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-RESELLER: alphareseller',
    'X-API-USER: eenos_api',
    'X-API-PASSWORD: eenos123'
]);

// Execute request
$result = curl_exec($ch);

// Error handling
if (curl_errno($ch)) {
    echo 'cURL Error: ' . curl_error($ch);
} else {
    echo json_encode(json_decode($result), JSON_PRETTY_PRINT);
}

// Close connection
curl_close($ch);

?>