Return server's hostname

This function retrieves the server's hostname.

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  gethostname

Response samples

Content type
application/json
{
  • "data": {
    • "hostname": "hostname.example.com"
    },
  • "metadata": {
    • "command": "gethostname",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}