listsuspended
List Suspended Accounts
To find suspended Eenos hosting accounts.
Required Headers
| Field | Description | Example |
Status Codes
| Code | Description |
| 200 | OK, Success |
| 500 | Server Error |
| 403 | Forbidden |
| 400 | Bad request |
Request URL
Post url = /listsuspended/
Default Full URL = https://your-host-name:5555/4444/api/listsuspended/
Version Full URL = https://your-host-name:5555/4444/api/v1/listsuspended/
Sample Curl Code
#!/bin/bash
REQUEST_URL="/listsuspended/"
BASE_URL="https://your-host-name:5555/4444/api/v1"
# Default base URL
# BASE_URL="https://your-host-name:5555/4444/api"
# Version specific base URL (recommended)
# BASE_URL="https://your-host-name:5555/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" : {
"dreamcatcher" : {
"reason" : "test",
"suspendtime" : "Sun, 07-Feb-2021 10:35:02, America/Los_Angeles",
"user" : "dreamcatcher"
},
"mysite" : {
"reason" : "not paid",
"suspendtime" : "Thu, 11-Nov-2021 11:45:19, America/Los_Angeles",
"user" : "mysite"
}
}
},
"info" : "Suspend 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:5555/4444/api/
#
# Versioned API (recommended for production / future compatibility):
# https://your-host-name:5555/4444/api/v1/
#
# Endpoint example:
# listsuspended/
# Full versioned URL:
# https://your-host-name:5555/4444/api/v1/listsuspended/
#
# This endpoint does NOT require a payload body.
# ---------------------------------------------------------------------
# API URL (versioned)
api_url = "https://your-host-name:5555/4444/api/v1/listsuspended/"
# If using default API, uncomment below:
# api_url = "https://your-host-name:5555/4444/api/listsuspended/"
# 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:5555/4444/api/
|
| Versioned API (recommended for production / future compatibility):
| https://your-host-name:5555/4444/api/v1/
|
| Endpoint example:
| listsuspended/
| Full versioned URL:
| https://your-host-name:5555/4444/api/v1/listsuspended/
|--------------------------------------------------------------------------
*/
// API request URL (versioned)
$request_url = '/listsuspended/';
/*
|--------------------------------------------------------------------------
| BASE URL SELECTION
|--------------------------------------------------------------------------
*/
// Versioned API base URL
$base_url = 'https://your-host-name:5555/4444/api/v1';
// Default API base URL (uncomment if needed)
// $base_url = 'https://your-host-name:5555/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);
?>