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:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "actionid": "2",
    6. "name": "Auto discovery. Linux servers.",
    7. "eventsource": "1",
    8. "status": "1",
    9. "esc_period": "0s",
    10. "def_shortdata": "",
    11. "def_longdata": "",
    12. "recovery_msg": "0",
    13. "r_shortdata": "",
    14. "r_longdata": "",
    15. "filter": {
    16. "evaltype": "0",
    17. "formula": "",
    18. "conditions": [
    19. {
    20. "conditiontype": "10",
    21. "operator": "0",
    22. "value": "0",
    23. "value2": "",
    24. "formulaid": "B"
    25. },
    26. {
    27. "operator": "0",
    28. "value": "9",
    29. "value2": "",
    30. "formulaid": "C"
    31. },
    32. {
    33. "conditiontype": "12",
    34. "operator": "2",
    35. "value": "Linux",
    36. "value2": "",
    37. "formulaid": "A"
    38. }
    39. ],
    40. "eval_formula": "A and B and C"
    41. },
    42. "operations": [
    43. {
    44. "operationid": "1",
    45. "actionid": "2",
    46. "operationtype": "6",
    47. "esc_period": "0s",
    48. "esc_step_from": "1",
    49. "esc_step_to": "1",
    50. "evaltype": "0",
    51. "opconditions": [],
    52. "optemplate": [
    53. {
    54. "operationid": "1",
    55. "templateid": "10001"
    56. }
    57. ]
    58. },
    59. {
    60. "operationid": "2",
    61. "actionid": "2",
    62. "esc_period": "0s",
    63. "esc_step_from": "1",
    64. "esc_step_to": "1",
    65. "evaltype": "0",
    66. "opconditions": [],
    67. "opgroup": [
    68. {
    69. "operationid": "2",
    70. "groupid": "2"
    71. }
    72. ]
    73. }
    74. ],
    75. "recoveryOperations": [
    76. {
    77. "operationid": "585",
    78. "actionid": "2",
    79. "operationtype": "11",
    80. "evaltype": "0",
    81. "opconditions": [],
    82. "opmessage": {
    83. "operationid": "585",
    84. "default_msg": "1",
    85. "subject": "{TRIGGER.STATUS}: {TRIGGER.NAME}",
    86. "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}",
    87. "mediatypeid": "0"
    88. }
    89. }
    90. ]
    91. }
    92. ],
    93. "id": 1
    94. }

    Source