version
Eenos version
Get the version of the Eenos control panel from your server
Required Headers
| Field | Description | Example |
| X-API-USER | The API username | eenos_api |
| X-API-PASSWORD | The API user password | eenos123 |
Request URL
Post URL = /version/
Full URL = https://your-host-name:5555/api/version/
Example CURL Command
curl -X POST \
-H "X-API-USER: eenos_api" \
-H "X-API-PASSWORD: eenos123" \
https://your-host-name:5555/api/version/
Output
{
"data": {
"version": "2.0.1-RELEASE",
"version_code": "2.0.1"
},
"info": "Eenos Version",
"status": 200
}
Python Code
#!/usr/bin/python3
import requests
from pprint import pprint
# ---------------------------------------------------------------------
# API VERSION RULES
# ---------------------------------------------------------------------
# Default API (stable):
# https://your-host-name:5555/api/
#
# Versioned API (recommended for production / future compatibility):
# https://your-host-name:5555/api/v1/
#
# Version endpoint example:
# https://your-host-name:5555/api/version/
#
# Use versioned endpoints when API structure may change across releases.
# ---------------------------------------------------------------------
# API URL (current endpoint)
api_url = "https://your-host-name:5555/api/version/"
# If using versioned API, uncomment below:
# api_url = "https://your-host-name:5555/api/v1/version/"
# Authentication headers (new API format)
headers = {
"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/api/
|
| Versioned API (recommended for production / future compatibility):
| https://your-host-name:5555/api/v1/
|
| Version endpoint example:
| https://your-host-name:5555/api/version/
|
| Use versioned endpoints when API structure may change across releases.
|--------------------------------------------------------------------------
*/
// API request URL
$request_url = '/version/';
/*
|--------------------------------------------------------------------------
| BASE URL SELECTION
|--------------------------------------------------------------------------
*/
// Default API base URL
$base_url = 'https://your-host-name:5555/api';
// Versioned API base URL (uncomment if needed)
// $base_url = 'https://your-host-name:5555/api/v1';
// Full API URL
$api_url = $base_url . $request_url;
// Initialize cURL
$ch = curl_init($api_url);
// No POST payload required for version endpoint (auth via headers)
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Authentication headers (new API format)
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'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);
?>