API (v2) Classes/Names
Command | Supported | Notes |
---|---|---|
CLASSES | ✅ | Returns all class names |
NAMES | ✅ | Class or OID supported |
The BlueOnyx CODB database of the GUI is an Object storage. It contains Objects of certain Classes. Like "System", "Vsite", "User", "DnsRecord" and many others. Each Object can have NameSpaces. Which contain configuration settings in key/value pairs for certain sub-functions. Like Vsite and User Objects can have "Email", "Disk" and other NameSpaces, where configuration data or status information is stored.
As it is not always transparent what Classes exist and what NameSpaces a certain Class might or might not have: The CLASSES command lists all Classes. And the NAMES command (if given an OID) will check that Object and return the names of all NameSpaces it has encountered.
CLASSES:
This returns the names of all known Classes.
Local request:
curl -k -s -X POST https://127.0.0.1:9092/v2/cce -d '{
"cmd": "CLASSES",
"user": "admin",
"sessionid": "SESSION-ID"
}' | jq
Remote request:
curl -k -s -X POST https://API-IP:9092/v2/cce -H "Content-Type: application/json"
-H "X-Client-Secret: CLIENT-SECRET"
-d '{ "cmd": "CLASSES", "token": "TOKEN" }' | jq
Response:
{
"status": 201,
"message": "GOODBYE",
"data": {
"DATA": {},
"classes": [
"pam_abl_settings",
"FtpSite",
"Vsite",
"VsiteServices",
"WebApplications",
"EmailAlias",
"CapabilityGroup",
"VirtualHost",
"SOL_Console",
"SWUpdateServer",
"ProtectedEmailAlias",
"DnsSOA",
"Network",
"PHP",
"Package",
"UserServices",
"MySQL",
"Capabilities",
"User",
"Disk",
"dnsbl",
"DnsSlaveZone",
"Schedule",
"Subdomains",
"ServiceQuota",
"IPPoolingRange",
"ActiveMonitor",
"Shop",
"WebApplicationsList",
"DnsRecord",
"Workgroup",
"UserExtraServices",
"System",
"mx2",
"Route"
]
}
}
NAMES:
The NAMES command requires as parameter the Object ID (OID) of an existing Object. It will then examine said Object and will return the names of all NameSpaces of said Object.
Local request:
curl -k -s -X POST https://127.0.0.1:9092/v2/cce -d '{
"cmd": "NAMES 1",
"user": "admin",
"sessionid": "SESSION-ID"
}' | jq
Remote request:
curl -k -s -X POST https://API-IP:9092/v2/cce -H "Content-Type: application/json"
-H "X-Client-Secret: CLIENT-SECRET"
-d '{ "cmd": "NAMES 1", "token": "TOKEN" }' |jq
Response:
{
"status": 201,
"message": "GOODBYE",
"data": {
"DATA": {},
"namespaces": [
"Jailkit",
"Remote",
"mysql",
"Vsite",
"DesktopControl",
"API",
"SSH",
"Compass_webapps",
"PHP_mgmt",
"Sitestats",
"MYSQLUSERS_DEFAULTS",
"Network",
"Ftp",
"TempTime",
"SSL",
"Nginx",
"Telnet",
"Support",
"VsiteDefaults",
"REDIRECT_DEFAULTS",
"RAID",
"Power",
"Radicale",
"yum",
"Memory",
"DNS",
"UserDefaults",
"DDNS",
"SWUpdate",
"Email",
"Time",
"Snmp",
"Web",
"subdomains"
]
}
}