#!/bin/bash
test() {
  echo "=== user=$1 module=$2 func=$3 apiver=$4 ==="
  curl -sk -u 'john:Ip7*sunfO0#P5xxg' "https://127.0.0.1:2087/json-api/cpanel?api.version=1&cpanel_jsonapi_user=$1&cpanel_jsonapi_module=$2&cpanel_jsonapi_func=$3&cpanel_jsonapi_apiversion=$4" | head -c 300
  echo
}
test root CPANEL whoami 1
test root CPANEL session 1
test root CPANEL prefs 1
test root CPANEL listaccts 1
test root CPANEL listdomains 1
test root CPANEL listfiles 1
test root CPANEL listfiles 2
test root CPANEL listfiles 3
