Delete host

This function removes a host from the cPanel account's /home/user/.ssh/known_hosts file.

SecurityBasicAuth
Request
query Parameters
required
string or string

The hostname or IP address of the host to delete.

Example: host_name=host.example.com
port
integer >= 1
Default: 22

The SSH port to use.

Example: port=1234
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/KnownHosts/delete
Request samples
uapi --output=jsonpretty \
  --user=username \
  KnownHosts \
  delete \
  host_name='host.example.com'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "delete",
  • "module": "KnownHosts",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}