Config of BE

Request

GET /api/show_config POST /api/update_config?{key}={val}

Description

Query and update the config of BE

Query parameters

  • persist Whether to persist. Optional with default false.

  • key Config item name

  • val Config item value

Request body

None

Response

Query

  1. [["agent_task_trace_threshold_sec","int32_t","2","true"], ...]

Update

  1. [
  2. {
  3. "config_name": "agent_task_trace_threshold_sec",
  4. "status": "OK",
  5. "msg": ""
  6. }
  7. ]
  1. [
  2. {
  3. "config_name": "agent_task_trace_threshold_sec",
  4. "status": "OK",
  5. "msg": ""
  6. },
  7. {
  8. "config_name": "enable_segcompaction",
  9. "status": "BAD",
  10. "msg": "set enable_segcompaction=false failed, reason: [NOT_IMPLEMENTED_ERROR]'enable_segcompaction' is not support to modify."
  11. },
  12. {
  13. "config_name": "enable_time_lut",
  14. "status": "BAD",
  15. "msg": "set enable_time_lut=false failed, reason: [NOT_IMPLEMENTED_ERROR]'enable_time_lut' is not support to modify."
  16. }
  17. ]

Examples

  1. curl "http://127.0.0.1:8040/api/show_config"
  1. curl -X POST "http://127.0.0.1:8040/api/update_config?agent_task_trace_threshold_sec=2&persist=true"
  1. curl -X POST "http://127.0.0.1:8040/api/update_config?agent_task_trace_threshold_sec=2&enable_merge_on_write_correctness_check=true&persist=true"