integer/array mfa.get(object parameters)
De methode maakt het mogelijk om MFA-methoden op te halen volgens de opgegeven parameters.
Deze methode is alleen beschikbaar voor het gebruikerstype Super admin. Rechten om de methode aan te roepen, kunnen worden ingetrokken in de instellingen van de gebruikersrol. Zie Gebruikersrollen voor meer informatie.
(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)
Geeft ofwel:
countOutput
is gebruikt.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.