Ad Widget

Collapse

Problem with API usergroup.update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fancescooriglia
    Junior Member
    • Nov 2018
    • 3

    #1

    Problem with API usergroup.update

    Hello,

    I did a bash script to create a user/ usergroup / hostgroup.
    But I don't know how to add a hostgroup permission to a usergroup.

    I tried : https://www.zabbix.com/documentation...ergroup/update

    It works, but that erase my old permissions on this usergroup. I only want to add more ...

    This is how I use it :

    curl -i -X POST -H 'Content-type:application/json' -d '{
    "jsonrpc": "2.0",
    "method": "usergroup.update",
    "params": {
    "usrgrpid": "254",
    "rights": {
    "permission": 3,
    "id": "718"
    }
    },
    "auth": "f118d0abbf0146ac977XXXXXXXXXX",
    "id": 1
    }'


    I hope you have an idea to add new permissions without erasing the old ones ...


    I'm using Zabbix version : 4.0

    Sincerely,
    Francesco Origlia
    Last edited by fancescooriglia; 19-01-2019, 22:17.
  • LarryD
    Junior Member
    • Mar 2014
    • 5

    #2
    Pass it an array of rights properties like so: [{:id=>"4", ermission=>3}, {:id=>"5", ermission=>3}, {:id=>"15", ermission=>3}]

    Comment

    Working...