The method allows to retrieve actions according to the given parameters.
Parameters
(object)
Parameters defining the desired output.
The method supports the following parameters.
an array of objects;
the count of retrieved objects, if the
countOutput
parameter has been used.
Examples
Retrieve discovery actions
Retrieve all configured discovery actions together with action conditions and operations. The filter uses the “and” evaluation type, so the formula
property is empty and is generated automatically.
Response:
- {
- "jsonrpc": "2.0",
- "result": [
- {
- "actionid": "2",
- "name": "Auto discovery. Linux servers.",
- "eventsource": "1",
- "status": "1",
- "esc_period": "0s",
- "def_shortdata": "",
- "def_longdata": "",
- "recovery_msg": "0",
- "r_shortdata": "",
- "r_longdata": "",
- "filter": {
- "evaltype": "0",
- "formula": "",
- "conditions": [
- {
- "conditiontype": "10",
- "operator": "0",
- "value": "0",
- "value2": "",
- "formulaid": "B"
- },
- {
- "operator": "0",
- "value": "9",
- "value2": "",
- "formulaid": "C"
- },
- {
- "conditiontype": "12",
- "operator": "2",
- "value": "Linux",
- "value2": "",
- "formulaid": "A"
- }
- ],
- "eval_formula": "A and B and C"
- },
- "operations": [
- {
- "operationid": "1",
- "actionid": "2",
- "operationtype": "6",
- "esc_period": "0s",
- "esc_step_from": "1",
- "esc_step_to": "1",
- "evaltype": "0",
- "opconditions": [],
- "optemplate": [
- {
- "operationid": "1",
- "templateid": "10001"
- }
- ]
- },
- {
- "operationid": "2",
- "actionid": "2",
- "esc_period": "0s",
- "esc_step_from": "1",
- "esc_step_to": "1",
- "evaltype": "0",
- "opconditions": [],
- "opgroup": [
- {
- "operationid": "2",
- "groupid": "2"
- }
- ]
- }
- ],
- "recoveryOperations": [
- {
- "operationid": "585",
- "actionid": "2",
- "operationtype": "11",
- "evaltype": "0",
- "opconditions": [],
- "opmessage": {
- "operationid": "585",
- "default_msg": "1",
- "subject": "{TRIGGER.STATUS}: {TRIGGER.NAME}",
- "message": "Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}\r\n\r\nOriginal event ID: {EVENT.ID}",
- "mediatypeid": "0"
- }
- }
- ]
- }
- ],
- "id": 1
- }