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.

Examples

Disabling a module

Disable module “25”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "module.update",
  4. "params": {
  5. "moduleid": "25",
  6. "status": 0
  7. },
  8. "id": 1
  9. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "moduleids": [
  5. "25"
  6. ]
  7. },
  8. "id": 1
  9. }

See also

Source

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