Return server's hostname

This function retrieves the server's hostname.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/gethostname
Request samples
whmapi1 --output=jsonpretty \
  gethostname
Response samples
application/json
{
  • "data": {
    • "hostname": "hostname.example.com"
    },
  • "metadata": {
    • "command": "gethostname",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}