- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function edits a script hook.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/edit_hook?api.version=1&id=HzEpGvT6QGUYwxuX3hWB8AUq&enabled=1&description=TestHook¬es=Note
https://hostname.example.com:2087/cpsess##########/xml-api/edit_hook?api.version=1&id=HzEpGvT6QGUYwxuX3hWB8AUq&enabled=1&description=TestHook¬es=Note
whmapi1 edit_hook id=HzEpGvT6QGUYwxuX3hWB8AUq enabled=1 description=TestHook notes=Note
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
{ "metadata": { "result": 1, "reason": "OK", "version": 1, "command": "edit_hook" } }
<metadata> <reason>OK</reason> <result>1</result> <version>1</version> <command>edit_hook</command> </metadata>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
| string | A valid string. | HzEpGvT6QGUYwxuX3hWB8AUq | |
enabled | Boolean | Required Whether the hook is enabled. |
| 1 |
description | string | Required The script hook's description. | A valid string. | TestHook |
notes | string | The script hook's notes. | A valid string. | Note |
Returns
This function only returns metadata.
Function information
API Version:
Available in:
WHM 11.32+
Methods:
GET, POST
Required Parameters:
id
, enabled
, description
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - reorder_hooks — This function changes the order of script hooks.
-
Page:WHM API 1 Functions - delete_hook — This function removes a script hook.
-
Page:WHM API 1 Functions - edit_hook — This function edits a script hook.
-
Page:WHM API 1 Functions - list_hooks — This function lists the server's script hooks.
-
Page:WHM API 1 Sections - Script Hooks — Script Hook functions allow you to manage a server's script hooks.