integer/array mfa.get(параметры объекта)
Метод позволяет получать методы MFA по заданным параметрам.
Этот метод доступен только пользователю с типом доступа Супер-администратор. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.
(object)
Parameters defining the desired output.
The method supports the following parameters.
Parameter | Type | Description |
---|---|---|
mfaids | ID/array | Return only MFA methods with the given IDs. |
selectUsrgrps | query | Return a usrgrps property with user groups associated with MFA methods.Supports count . |
filter | object | Return only those results that exactly match the given filter. Accepts an object, where the keys are property names, and the values are either a single value or an array of values to match against. Supports properties: mfaid - ID of the MFA method;type - Type of the MFA method. |
sortfield | string/array | Sort the result by the given properties. Possible values: name . |
search | object | Return results that match the given pattern (case-insensitive). Possible values: name . |
countOutput | boolean | These parameters being common for all get methods are described in detail in the reference commentary page. |
excludeSearch | boolean | |
limit | integer | |
output | query | |
preservekeys | boolean | |
searchByAny | boolean | |
searchWildcardsEnabled | boolean | |
sortorder | string/array | |
startSearch | boolean |
(integer/array)
Returns either:
countOutput
parameter has been used.Retrieve all MFA methods with "Zabbix" in their name.
{
"jsonrpc": "2.0",
"method": "mfa.get",
"params": {
"output": "extend",
"search": {
"name": "Zabbix"
}
},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"mfaid": "1",
"type": "1",
"name": "Zabbix TOTP 1",
"hash_function": "1",
"code_length": "6",
"api_hostname": "",
"clientid": ""
},
{
"mfaid": "2",
"type": "1",
"name": "Zabbix TOTP 2",
"hash_function": "3",
"code_length": "8",
"api_hostname": "",
"clientid": ""
}
],
"id": 1
}
CMfa::get() in ui/include/classes/api/services/CMfa.php.