graph.get

    The method allows to retrieve graphs according to the given parameters.

    This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See for more information.

    Parameters

    The method supports the following parameters.

    (integer/array) Returns either:

    • an array of objects;
    • the count of retrieved objects, if the countOutput parameter has been used.

    Examples

    Retrieving graphs from hosts

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "graphid": "612",
    6. "name": "CPU jumps",
    7. "width": "900",
    8. "height": "200",
    9. "yaxismin": "0",
    10. "yaxismax": "100",
    11. "templateid": "439",
    12. "show_work_period": "1",
    13. "show_triggers": "1",
    14. "graphtype": "0",
    15. "show_legend": "1",
    16. "show_3d": "0",
    17. "percent_right": "0",
    18. "ymin_type": "0",
    19. "ymax_type": "0",
    20. "ymin_itemid": "0",
    21. "ymax_itemid": "0",
    22. "flags": "0"
    23. },
    24. {
    25. "name": "CPU load",
    26. "width": "900",
    27. "height": "200",
    28. "yaxismin": "0",
    29. "yaxismax": "100",
    30. "templateid": "433",
    31. "show_work_period": "1",
    32. "show_triggers": "1",
    33. "graphtype": "0",
    34. "show_legend": "1",
    35. "show_3d": "0",
    36. "percent_left": "0",
    37. "percent_right": "0",
    38. "ymin_type": "1",
    39. "ymax_type": "0",
    40. "ymin_itemid": "0",
    41. "ymax_itemid": "0",
    42. "flags": "0"
    43. },
    44. {
    45. "graphid": "614",
    46. "name": "CPU utilization",
    47. "width": "900",
    48. "height": "200",
    49. "yaxismin": "0",
    50. "yaxismax": "100",
    51. "show_work_period": "1",
    52. "show_triggers": "0",
    53. "graphtype": "1",
    54. "show_legend": "1",
    55. "show_3d": "0",
    56. "percent_left": "0",
    57. "percent_right": "0",
    58. "ymax_type": "1",
    59. "ymin_itemid": "0",
    60. "ymax_itemid": "0",
    61. "flags": "0"
    62. },
    63. {
    64. "graphid": "645",
    65. "name": "Disk space usage /",
    66. "width": "600",
    67. "height": "340",
    68. "yaxismin": "0",
    69. "yaxismax": "0",
    70. "templateid": "0",
    71. "show_work_period": "0",
    72. "show_triggers": "0",
    73. "graphtype": "2",
    74. "show_legend": "1",
    75. "show_3d": "1",
    76. "percent_left": "0",
    77. "percent_right": "0",
    78. "ymin_type": "0",
    79. "ymax_type": "0",
    80. "ymin_itemid": "0",
    81. "ymax_itemid": "0",
    82. "flags": "4"
    83. }
    84. ],
    85. }

    Source