This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

updateGlobal()

This method allows you to update a globalmacro as defined by the globalmacro data array.

Parameters

Parameter Type Optional Description Details
globalmacro data array or object No Array of Globalmacro objects or a single object macro name must be specified

Returns

Parameter Description
result Operation successful. Result will contain array of updated Globalmacro IDs. globalmacroid are assigned to each Globalmacro object
error In case of any errors

Example

{
       "jsonrpc":"2.0",
       "method":"usermacro.updateGlobal",
       "params":[
           {
               "macro":"{$MACRO1}",
               "value":"NEW VALUE"
           },
           {
               "macro":"{$MACRO2}",
               "value":"NEW VALUE"
           }
       ],
       "auth":"038e1d7b1735c6a5436ee9eae095879e",
       "id":3
       }

Globalmacro updated successfully:

{
       "jsonrpc":"2.0",
       "result":{
          "globalmacroids": ["107819", "107820"]
       },
       "id":3
       }

Globalmacro doesn't exist:

{
       "jsonrpc":"2.0",
       "error":{
             "code":-32602,
             "message":"Invalid params.",
             "data":"[ CGlobalmacro::update ] Macro [ {$MACRO1} ] does not exists"
       },
       "id":3
       }