Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6210

API: user.create: DBerror, Invalid params.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 2.0.4
    • API (A)
    • None

      I am creating user via API. Example is taken from https://www.zabbix.com/documentation/2.0/manual/appendix/api/user/create

      User used to comminicating with Zabbix API is a "Zabbix Super Admin".
      usrgrpid = 18 and mediatypeid = 1 both exists.

      I am sending example json:

      {
      "jsonrpc":"2.0",
      "method":"user.create",
      "params":{
      "alias":"John13",
      "name":"john",
      "surname":"doe",
      "passwd":"Doe123",
      "autologout":"300",
      "type":"1",
      "usrgrps":

      { "usrgrpid":"18" }

      ,
      "user_medias":

      { "mediatypeid":"1", "sendto":"[email protected]", "active":"0", "severity":"15", "period":"1-7,00:00-24:00" }

      },
      "auth":"7ba6d6f241cf01ce0446febb85c88386",
      "id":2
      }

      Response is:

      {
      "jsonrpc":"2.0",
      "error":

      { "code":-32602, "message":"Invalid params.", "data":"DBerror" }

      ,
      "id":2
      }

      The problem seems to be section "user_medias" - without it user is created without error.

            Unassigned Unassigned
            rob Robert Jerzak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: