This is a translation of the original English documentation page. Help us make it better.

module.update

Description

object module.update(object/array modules)

This method allows to update existing 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.

Parameters

(object/array) Module properties to be updated.

The moduleid property must be defined for each module, all other properties are optional. Only the specified properties will be updated.

The method accepts modules with the standard module properties.

Return values

(object) Returns an object containing the IDs of the updated modules under the moduleids property.

Приклади

Disabling a module

Disable module "25".

Request:

{
           "jsonrpc": "2.0",
           "method": "module.update",
           "params": {
               "moduleid": "25",
               "status": 0
           },
           "id": 1
       }

Response:

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

See also

Source

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