Update script hooks order

This function changes the order of script hooks.

SecurityBasicAuth
Request
query Parameters
ids
required
string

A comma-seprated list of script hook IDs, in order of priority.

Note:

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

Example: ids=HzEpGvT6QGUYwxuX3hWB8AUq,UNs8a8IbbAVf5oi_hXbcEw5a
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/reorder_hooks
Request samples
whmapi1 --output=jsonpretty \
  reorder_hooks \
  ids='HzEpGvT6QGUYwxuX3hWB8AUq,UNs8a8IbbAVf5oi_hXbcEw5a'
Response samples
application/json
{
  • "data": {
    • "hook_order": [
      • {
        • "id": "HzEpGvT6QGUYwxuX3hWB8AUq",
        • "weight": 100
        },
      • {
        • "id": "UNs8a8IbbAVf5oi_hXbcEw5a",
        • "weight": 200
        }
      ]
    },
  • "metadata": {
    • "command": "reorder_hooks",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}