settings.get

描述

object settings.get(object parameters)

此方法允许根据给定参数检索设置对象。

此方法允许任何用户使用。可以在用户角色设置中撤销调用此方法的权限。更多信息请查看 用户角色

参数

(对象) 定义期望输出的参数。

此方法只支持一个参数。

参数类型描述
outputquery此参数与所有 get方法相同,描述见reference commentary

返回值

(对象)返回设置对象。

示例

请求:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "settings.get",
  4. "params": {
  5. "output": "extend"
  6. },
  7. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  8. "id": 1
  9. }

响应:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "default_theme": "blue-theme",
  5. "search_limit": "1000",
  6. "max_in_table": "50",
  7. "server_check_interval": "10",
  8. "work_period": "1-5,09:00-18:00",
  9. "show_technical_errors": "0",
  10. "history_period": "24h",
  11. "period_default": "1h",
  12. "max_period": "2y",
  13. "severity_color_0": "97AAB3",
  14. "severity_color_1": "7499FF",
  15. "severity_color_2": "FFC859",
  16. "severity_color_3": "FFA059",
  17. "severity_color_4": "E97659",
  18. "severity_color_5": "E45959",
  19. "severity_name_0": "Not classified",
  20. "severity_name_1": "Information",
  21. "severity_name_2": "Warning",
  22. "severity_name_3": "Average",
  23. "severity_name_4": "High",
  24. "severity_name_5": "Disaster",
  25. "custom_color": "0",
  26. "ok_period": "5m",
  27. "blink_period": "2m",
  28. "problem_unack_color": "CC0000",
  29. "problem_ack_color": "CC0000",
  30. "ok_unack_color": "009900",
  31. "ok_ack_color": "009900",
  32. "problem_unack_style": "1",
  33. "problem_ack_style": "1",
  34. "ok_unack_style": "1",
  35. "ok_ack_style": "1",
  36. "discovery_groupid": "5",
  37. "default_inventory_mode": "-1",
  38. "alert_usrgrpid": "7",
  39. "snmptrap_logging": "1",
  40. "default_lang": "en_GB",
  41. "default_timezone": "system",
  42. "login_attempts": "5",
  43. "login_block": "30s",
  44. "validate_uri_schemes": "1",
  45. "uri_valid_schemes": "http,https,ftp,file,mailto,tel,ssh",
  46. "x_frame_options": "SAMEORIGIN",
  47. "iframe_sandboxing_enabled": "1",
  48. "iframe_sandboxing_exceptions": "",
  49. "max_overview_table_size": "50",
  50. "connect_timeout": "3s",
  51. "socket_timeout": "3s",
  52. "media_type_test_timeout": "65s",
  53. "script_timeout": "60s",
  54. "item_test_timeout": "60s",
  55. "url": "",
  56. "report_test_timeout": "60s",
  57. "auditlog_enabled": "1",
  58. "ha_failover_delay": "1m",
  59. "geomaps_tile_provider": "OpenStreetMap.Mapnik",
  60. "geomaps_tile_url": "",
  61. "geomaps_max_zoom": "0",
  62. "geomaps_attribution": ""
  63. },
  64. "id": 1
  65. }

来源

CSettings::get()见ui/include/classes/api/services/CSettings.php