integer/array module.get(параметры объекта)
Метод позволяет получать модули по заданным параметрам.
Этот метод доступен пользователям любого типа. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.
(object) Parameters defining the desired output.
The method supports the following parameters.
| Parameter | Type | Description |
|---|---|---|
| moduleids | string/array | Return only modules with the given IDs. |
| sortfield | string/array | Sort the result by the given properties. Possible values: moduleid, relative_path. |
| countOutput | boolean | These parameters being common for all get methods are described in detail in the Reference commentary page. |
| excludeSearch | boolean | |
| filter | object | |
| limit | integer | |
| output | query | |
| preservekeys | boolean | |
| search | object | |
| searchByAny | boolean | |
| searchWildcardsEnabled | boolean | |
| sortorder | string/array | |
| startSearch | boolean |
(integer/array) Returns either:
countOutput parameter has been used.Retrieve all data about modules "1", "2", and "25".
{ "jsonrpc": "2.0", "method": "module.get", "params": { "output": "extend", "moduleids": [ "1", "2", "25" ] }, "id": 1 }Response:
{ "jsonrpc": "2.0", "result": [ { "moduleid": "1", "id": "actionlog", "relative_path": "widgets/actionlog", "status": "1", "config": [] }, { "moduleid": "2", "id": "clock", "relative_path": "widgets/clock", "status": "1", "config": [] }, { "moduleid": "25", "id": "example", "relative_path": "modules/example_module", "status": "1", "config": [] } ], "id": 1 }CModule::get() в ui/include/classes/api/services/CModule.php.