Hi!
I'm developing an integration where an access to the Zabbix API must disable the client's media (in this case the email). All the authentication part is ready but I'm not able to use the user.update method. The idea is to find the 'sendto' with the desired email and change the 'active' to 1, which disables the media.
Exemple method user.get:
How can I use the user.update method to change the value of the field "active":"0" to "active":"1" in "sendto":["[email protected]"]?
---------------
Exemple - Renaming user:
I'm developing an integration where an access to the Zabbix API must disable the client's media (in this case the email). All the authentication part is ready but I'm not able to use the user.update method. The idea is to find the 'sendto' with the desired email and change the 'active' to 1, which disables the media.
Exemple method user.get:
Code:
{
"jsonrpc":"2.0",
"result":[
{
"userid":"143",
"alias":"john",
"name":"John",
"surname":"Doe",
"url":"",
"autologin":"0",
"autologout":"0",
"lang":"pt_BR",
"refresh":"30s",
"type":"1",
"theme":"default",
"attempt_failed":"0",
"attempt_ip":"xxxx:yyyy:x:yyyy::x",
"attempt_clock":"1640115857",
"rows_per_page":"50",
"medias":[
{
"sendto":[
"[email protected]"
],
"active":"0"
},
{
"sendto":[
"[email protected]"
"[email protected]"
],
"active":"1"
}
]
}
],
"id":1
}
---------------
Exemple - Renaming user:
Code:
{
"jsonrpc":"2.0",
"method":"user.update",
"params":{
"userid":"1",
"name":"John",
"surname":"Doe"
},
"auth":"038e1d7b1735c6a5436ee9eae095879e",
"id":1
}