Zabbix Documentation 5.0

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:api:reference:user:create

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:api:reference:user:create [2017/10/06 14:12]
127.0.0.1 external edit
manual:api:reference:user:create [2020/05/05 11:31] (current)
martins-v frontends/php -> ui (ZBX-17667)
Line 14: Line 14:
  
 ^ Parameter ^ Type ^ Description ^ ^ Parameter ^ Type ^ Description ^
-| **passwd** \\ //​(required)//​ | string | User's password. | +| **passwd** \\ //​(required)//​ | string | User's password. \\ \\ Can be omitted if user is added only to groups that have LDAP access. | 
-| **usrgrps** \\ (required) | array | User groups to add the user to.\\ \\ The user groups must have the ''​usrgrpid''​ property defined. | +| **usrgrps** \\ (required) | array | User [[:​manual/​api/​reference/​user/​create|groups]] to add the user to.\\ \\ The user groups must have the ''​usrgrpid''​ property defined. | 
-| user_medias | array | Medias to create for the user. |+| user_medias | array | User [[:​manual/​api/​reference/​user/​object#​media|media]] to be created. |
 ==== Return values ==== ==== Return values ====
  
Line 28: Line 28:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 43: Line 43:
             {             {
                 "​mediatypeid":​ "​1",​                 "​mediatypeid":​ "​1",​
-                "​sendto":​ "​[email protected]",​+                "​sendto": ​
 +                    ​"​[email protected]"​ 
 +                ],
                 "​active":​ 0,                 "​active":​ 0,
                 "​severity":​ 63,                 "​severity":​ 63,
Line 56: Line 58:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 70: Line 72:
 ==== See also ==== ==== See also ====
  
-  * [[manual:​api:​reference:​usermedia:​object#​media|Media]]+  * [[manual:​api:​reference:​user:​object#​media|Media]]
   * [[manual:​api:​reference:​usergroup:​object#​user_group|User group]]   * [[manual:​api:​reference:​usergroup:​object#​user_group|User group]]
  
Line 76: Line 78:
 ==== Source ==== ==== Source ====
  
-CUser::​create() in //frontends/​php/​include/​classes/​api/​services/​CUser.php//​.+CUser::​create() in //ui/​include/​classes/​api/​services/​CUser.php//​.