Zabbix Documentation 1.8

Sidebar

Table of Contents

update()

Available since version: 1.8
The method is used to control all mediatype attributes including mediatype applications linkage.

Parameters

Parameter Type Optional Description Details
mediatypeid string Mediatype ID.
mediatype attribute any Yes New value for a mediatype attribute.

Returns

Parameter Description
result Operation successful. Result will contain array of updated Mediatype IDs.
error In case of any errors

Example

Change SMTP server for mediatype:

  {
          "jsonrpc": "2.0",
          "method": "mediatype.update",
          "params": [{
             "mediatypeid": "100100000010092",
             "smtp_server": "[email protected]"
          }],
          "auth": "700ca65537074ec963db7efabda78259",
          "id": 2
         }

Retrieved updated mediatype IDs:

  {
          "jsonrpc": "2.0",
          "result": {
              "mediatypeids": ["100100000010092"]
          },
          "id": 2
         }