Return available RPM packages

This function lists information about the system's available RPM packages.

SecurityBasicAuth
Request
query Parameters
state
string
Default: "any"

Return RPM packages that exist in a specified state.

  • any — All RPMs available on the system.
  • installed — The RPMs installed on the system.
  • not_installed — The available RPMs not yet installed on the system.
  • updatable — The RPMs with updates available.
Enum: "any" "installed" "not_installed" "updatable"
Example: state=installed
Responses
200

HTTP Request was successful.

Response Schema: application/json
object

A list of RPM objects that match the requested state.

object
get/package_manager_list_packages
Request samples
whmapi1 --output=jsonpretty \
  package_manager_list_packages
Response samples
application/json
{
  • "data": {
    • "packages": [
      • {
        • "package": "MariaDB-client"
        },
      • {
        • "package": "MariaDB-common"
        }
      ]
    },
  • "metadata": {
    • "command": "package_manager_list_packages",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}