Zabbix Documentation 1.8

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:action:update

update()

Available since version: 1.8
The method is used to control all action attributes including action conditions and operations.

Parameters

Parameter Type OptionalDescriptionDetails
actionid string Action ID.
action attribute any Yes New value for an action attribute.
action conditions dataarray or object array of action conditions objects
action operations dataarray or object array of action operations objects

Returns

Parameter Description
resultOperation successful. Result will contain array of updated action IDs.
error In case of any errors

Example

Set action name to “New Name”:

  {
   "jsonrpc": "2.0",
   "method": "action.update",
   "params": {
      "actionid": "100100000010092",
      "name": "New Name"
   },
   "auth": "700ca65537074ec963db7efabda78259",
   "id": 2
  }

Retrieved updated action IDs:

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

Example #2

Disable action:

{
 "actionid": "1",
 "status": "0",
} 

Parameter “status” serves for setting status of your action.