You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

mfa.create

Description

object mfa.create(object/array MFA methods)

This method allows to create new MFA methods.

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) MFA methods to create.

The method accepts MFA methods with the standard MFA method properties.

Return values

(object) Returns an object containing the IDs of the created MFA methods under the mfaids property. The order of the returned IDs matches the order of the passed items.

Examples

Creating MFA methods

Create a "Zabbix TOTP" MFA method utilizing time-based one-time passwords (TOTP), with the hash function for generating TOTP codes set to SHA-1 and the verification code length set to 6 digits.

Request:

{
           "jsonrpc": "2.0",
           "method": "mfa.create",
           "params": {
               "type": 1,
               "name": "Zabbix TOTP",
               "hash_function": 1,
               "code_length": 6
           },
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "mfaids": [
                   "1"
               ]
           },
           "id": 1
       }

Source

CMfa::create() in ui/include/classes/api/services/CMfa.php.