Child pages
  • WHM API 1 Functions - delete_hook
Skip to end of metadata
Go to start of metadata

 

Description

This function removes a script hook.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/delete_hook?api.version=1&id=HzEpGvT6QGUYwxuX3hWB8AUq
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/delete_hook?api.version=1&id=HzEpGvT6QGUYwxuX3hWB8AUq
 Command Line
whmapi1 delete_hook id=HzEpGvT6QGUYwxuX3hWB8AUq


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
 "metadata": {
    "result": 1,
    "reason": "OK",
    "version": 1,
    "command": "delete_hook"
  }
}
 Output (XML)
    <metadata>
        <reason>OK</reason>
        <result>1</result>
        <version>1</version>
        <command>delete_hook</command>
    </metadata>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample

id

string

Required

The script hook's ID.

Note:

To retrieve a hook's ID, use the list_hooks function.

A valid string.

HzEpGvT6QGUYwxuX3hWB8AUq

Returns

This function only returns metadata.