You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

module.create

Description

object module.create(object/array modules)

This method allows to install new frontend modules.

This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Module files must be unpacked manually in the correct subdirectories, matching the relative_path property of the modules.

Parameters

(object/array) Modules to create.

The method accepts modules with the standard module properties.

Return values

(object) Returns an object containing the IDs of the installed modules under the moduleids property. The order of the returned IDs matches the order of the passed modules.

Examples

Installing a module

Install a module with the status "Enabled".

Request:

{
           "jsonrpc": "2.0",
           "method": "module.create",
           "params": {
               "id": "example_module",
               "relative_path": "modules/example_module",
               "status": 1
           },
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "moduleids": [
                   "25"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

See also

Source

CModule::create() in ui/include/classes/api/services/CModule.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.