# Return script hooks list This function lists the server's script hooks. Endpoint: GET /list_hooks Version: 11.134.0.5 Security: BasicAuth ## Response 200 fields (application/json): - `data` (object) - `data.categories` (array) An array of objects containing hook categories. - `data.categories.category` (string) The script hook's category. Example: "RPM::Versions" - `data.categories.events` (array) An array of objects containing events. - `data.categories.events.event` (string) The event that triggers the script hook. Example: "MariaDB-server" - `data.categories.events.stage_order` (array) When the hook script will execute. It is possible for a hook script to have both values. * — The script runs before the function. * — The script runs after the function. Example: ["pre","post"] - `data.categories.events.stages` (array) An array of objects containing stage information. - `data.categories.events.stages.actions` (array) An array of objects containing information about hook script actions. - `data.categories.events.stages.actions.blocking` (integer) Whether the script hook has a blocking contest. * — Blocking contest. * — No blocking contest. Enum: 1, 0 - `data.categories.events.stages.actions.check` (string,null) The absolute file path to the script that runs after the hook script to check the results. - `data.categories.events.stages.actions.description` (string,null) The hook script's description. Example: "A script description." - `data.categories.events.stages.actions.enabled` (integer) Whether the hook script is enabled. * — Enabled. * — Disabled. Enum: 0, 1 - `data.categories.events.stages.actions.escalateprivs` (integer) Whether the hook script will run with escalated root privileges. * — Runs with escalated privileges. * — Does not run with escalated privileges. Enum: 0, 1 - `data.categories.events.stages.actions.exectype` (string) The type of function that the script hook launches. * — A script function. * — A Perl module function. Enum: "script", "module" - `data.categories.events.stages.actions.hook` (string) The absolute file path to the hook script. Example: "/scripts/postcourier-authlibup" - `data.categories.events.stages.actions.id` (string) The script hook's ID. Example: "KQVO65K_8MWe__3JMPETn43S" - `data.categories.events.stages.actions.rollback` (string,null) The absolute file path to the script that can roll back the hook script. - `data.categories.events.stages.actions.stage` (string) When the hook script will execute. * — The script runs before the function. * — The script runs after the function. Example: "post" - `data.categories.events.stages.actions.weight` (integer) The priority of the script hook, where lower values run before higher values. Example: 100 - `data.categories.events.stages.attributes` (object) A list of hook script attributes. - `data.categories.events.stages.attributes.blocking` (integer) Whether the script hook contains a blocking context. * — Blocking context. * — No blocking context. Enum: 1, 0 - `data.categories.events.stages.attributes.escalateprivs` (integer) Whether the hook script will run with escalated root privileges. * — Runs with escalated privileges. * — Does not run with escalated privileges. Enum: 1, 0 - `metadata` (object) - `metadata.command` (string) The method name called. Example: "list_hooks" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * - Success. * - Failed. Check the field for more details. Enum: 1, 0 - `metadata.version` (integer) The version of the API function. Example: 1