You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - installed_versions
Skip to end of metadata
Go to start of metadata

Description

This function lists the versions of third-party software that ship with cPanel & WHM.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/installed_versions?api.version=1&packages=1
 XML API

Important:

  • You cannot call this function via WHM API 1's XML API.
  • cPanel & WHM version 66 deprecated XML output.
 Command Line
whmapi1 installed_versions packages=1


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
	"metadata": {
		"version": 1,
		"result": 1,
		"reason": "OK",
		"command": "installed_versions"
	},
	"data": {
		"operating_system_version": "7.2",
		"bind": "9.9.4-29",
		"proftpd": 0,
		"apache_php_default_version": 0,
		"squirrelmail": "2012.12.09-4",
		"cpanel_packages": [
			"cpanel-ace-editor-1.2.6-1.cp1166.noarch",
			"cpanel-yui-2.9.0-5.cp1136.noarch"
		],
		"easyapache": 3,
		"horde": "5.2.10",
		"apache": "2.4.12",
		"mailman": "2.1.23-9",
		"linux_kernel": "3.10.0-327.18.2.el7.x86_64",
		"pureftpd": "1.0.45",
		"nsd": 0,
		"os_packages": [
			"ImageMagick-6.7.8.9-15.el7_2.x86_64",
			"zsh-5.0.2-14.el7.x86_64"
		],
		"exim": "4.89-2",
		"apache_php_versions": [
			0
		],
		"mydns": 0,
		"dovecot": "2.2.31 (65cde28)",
		"cpanel_and_whm": "11.64.0.9999",
		"postgresql": 0,
		"cpanel_php": "7.2.7-4",
		"roundcube": "1.2.4-1",
		"powerdns": 0,
		"openssh": "clients-6.6.1p1-25",
		"clamav": "0.99.2-1",
		"ea_4_packages": [

		],
		"munin": 0,
		"operating_system_name": "centos",
		"mysql": "5.7",
		"p0f": "3.09b-1",
		"rsyslog": "8.24.0-16",
		"spamd": "3.4.2",
		"postgresql_build": 0,
		"mysql_build": "5.7.61-1",
		"nscd": "2.17-222"
	}
}
 Output (XML)

Important:

You cannot call this function via WHM API 1's XML API. 


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
packagesBoolean

Whether to list the server's installed RPMs in the function's cpanel_packages, ea_4_packages, and os_packages arrays.

This parameter defaults to 0.

  • 1 — List.
  • 0 — Do not list.
1

Returns

ReturnTypeDescriptionPossible valuesExample
operating_system_versionstringThe version of the server's operating system (OS).A valid version number.7.2
bindstringThe BIND version.
  • A valid string.
  • 0 — The software does not exist on the server.
9.9.4-29
proftpdstringThe ProFTP version.
  • A valid string.
  • 0 — The software does not exist on the server.
0
apache_php_default_versionstringThe default PHP version for Apache®.
  • A valid string.
  • 0 — The software does not exist on the server.
0
squirrelmailstring

The Squirrelmail version.

Warning:

We deprecated SquirrelMail and its functionality in cPanel & WHM version 76 and removed it in cPanel & WHM version 78. The system will only return this value if SquirrelMail exists on the server.

  • A valid string.
  • 0 — The software does not exist on the server.
2012.12.09-4
cpanel_packagesarray of strings

An array of cPanel-provided RPMs.

Note:

The function only returns this array if you set the packages parameter to 1.

  • A comma-separated list of cPanel-managed RPMs.
  • 0No cPanel-managed RPMs exist on the server.
"cpanel-ace-editor-1.1.9-1.cp1152.noarch",
"cpanel-analog-6.0-2.cp1136.x86_64",
"cpanel-angular-chosen-1.4.0-1.cp1158.noarch"
easyapachestringThe EasyApache version.
  • A valid string.
  • 0 — The software does not exist on the server.
3
hordestringThe Horde version.
  • A valid string.
  • 0 — The software does not exist on the server.
5.2.10
apachestringThe Apache version.
  • A valid string.
  • 0 — The software does not exist on the server.
2.4.12
mailmanstringThe Mailman version.
  • A valid string.
  • 0 — The software does not exist on the server.
2.1.23-9
linux_kernelstringThe Linux® kernel version.
  • A valid string.
  • 0 — The software does not exist on the server.
3.10.0-327.18.2.e17.x86_64
pureftpdstringThe PureFTP version.
  • A valid string.
  • 0 — The software does not exist on the server.
1.0.45
nsdstring

The NSD version.


Warning:

We deprecated the MyDNS and NSD nameservers in cPanel & WHM version 78 and plan to remove them a future release. We strongly recommend that you migrate to PowerDNS. For more information, read our cPanel Deprecation Plan.

  • A valid string.
  • 0 — The software does not exist on the server.
0
os_packagesarray

An array of OS-provided RPMs.

Note:

The function only returns this array if you set the packages parameter to 1.

  • A comma-separated list of strings.
  • 0No OS-managed RPMs exist on the server.
"GeoIP-1.5.0-11.el7.x86_64",
"ImageMagick-6.7.8.9-15.el7_2.x86_64",
"ModemManager-glib-1.6.0-2.el7.x86_64"
eximstringThe Exim version.
  • A valid string.
  • 0 — The software does not exist on the server.
4.89-2
apache_php_versions


array of strings

An array of PHP versions that the system installs for Apache.

  • A comma-separated list of strings.
  • 0 — No installed PHP versions.
7.3
mydnsstring

The MyDNS version.


Warning:

We deprecated the MyDNS and NSD nameservers in cPanel & WHM version 78 and plan to remove them a future release. We strongly recommend that you migrate to PowerDNS. For more information, read our cPanel Deprecation Plan.

  • A valid string.
  • 0 — The software does not exist on the server.
0
dovecotstringThe Dovecot® version.
  • A valid string.
  • 0 — The software does not exist on the server.
2.2.31 (65cde28)
cpanel_and_whmstringThe cPanel & WHM version.
  • A valid string.
  • 0 — The software does not exist on the server.
11.64.0.9999
postgresqlstringThe PostgreSQL® version.
  • A valid string.
  • 0 — The software does not exist on the server.
0
cpanel_phpstringThe system PHP version.
  • A valid string.
  • 0 — The software does not exist on the server.
7.2.7-4
roundcubestringThe Roundcube version.
  • A valid string.
  • 0 — The software does not exist on the server.
1.2.4-1
powerdnsstringThe PowerDNS version.
  • A valid string.
  • 0 — The software does not exist on the server.
0
opensshstringThe OpenSSH version.
  • A valid string.
  • 0 — The software does not exist on the server.
clients-6.6.1p1-25
clamavstringThe ClamAV® version.
  • A valid string.
  • 0 — The software does not exist on the server.
0.99.2-1
ea_4_packages
array of strings

An array of EasyApache 4 (EA4)-provided RPMs.

Note:

The function only returns this array if you set the packages parameter to 1 .

  • A comma-separated list of strings.
  • 0No EA4-managed RPMs exist on the server.
0
muninstringThe Munin version.
  • A valid string.
  • 0 — The software does not exist on the server.
0
operating_system_namestringThe server's OS.
  • A valid string.
  • 0 — The software does not exist on the server.
centos
mysqlstringThe MySQL® or MariaDB® version number.
  • A valid string.
  • 0 — The software does not exist on the server.
5.7
p0fstringThe Passive OS Fingerprinting version number.
  • A valid string.
  • 0 — The software does not exist on the server.
3.09b-1
nscdstringThe Name Service Cache Daemon version number.
  • A valid string.
  • 0 — The software does not exist on the server.
2.17-222
rsyslogstringThe Rsyslog version number.
  • A valid string.
  • 0 — The software does not exist on the server.
8.24.0-16
spamdstringThe Apache SpamAssassin™ version number.
  • A valid string.
  • 0 — The software does not exist on the server.
3.4.2
mysql_buildstringThe MySQL RPM's version number.
  • A valid string.
  • 0 — The software does not exist on the server.
5.7.61-1
postgresql_buildstringThe PostgreSQL RPM's version number.
  • A valid string.
  • 0 — The software does not exist on the server.
0