object regexp.create(object/array regularExpressions)
This method allows to create new global regular expressions.
This method is only available to Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object/array)
Regular expressions to create.
Additionally to the standard properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
expressions | array | Expressions options. |
(oggetto)
Restituisce un oggetto contenente gli ID delle espressioni regolari create sotto la proprietà regexpids
.
Request:
{
"jsonrpc": "2.0",
"method": "regexp.create",
"params": {
"name": "Storage devices for SNMP discovery",
"test_string": "/boot",
"expressions": [
{
"expression": "^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$",
"expression_type": "4",
"case_sensitive": "1"
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CRegexp::create() in ui/include/classes/api/services/CRegexp.php.