api.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # 监控应用类型名称(与文件名保持一致) eg: linux windows tomcat mysql aws...
  2. app: api
  3. # 强制固定必须参数 - host(ipv4,ipv6,域名)
  4. param:
  5. # field-字段名称标识符
  6. - field: host
  7. # name-参数字段显示名称
  8. name: 主机Host
  9. # type-字段类型,样式(大部分映射input标签type属性)
  10. type: host
  11. # 是否是必输项 true-必填 false-可选
  12. required: true
  13. - field: port
  14. name: 端口
  15. type: number
  16. # 当type为number时,用range表示范围
  17. range: '[0,65535]'
  18. required: true
  19. - field: uri
  20. name: 相对路径
  21. type: text
  22. # 当type为text时,用limit表示字符串限制大小
  23. limit: 200
  24. required: false
  25. placeholder: 'API地址除IP端口外的路径 例如:/v2/book/bar'
  26. - field: method
  27. name: 请求方式
  28. type: radio
  29. required: true
  30. # 当type为radio单选框,checkbox复选框时,option表示可选项值列表 {name1:value1,name2:value2}
  31. options:
  32. - label: GET请求
  33. value: GET
  34. - label: POST请求
  35. value: POST
  36. - label: PUT请求
  37. value: PUT
  38. - label: DELETE请求
  39. value: DELETE
  40. - field: username
  41. name: 用户名
  42. type: text
  43. # 当type为text时,用limit表示字符串限制大小
  44. limit: 20
  45. required: false
  46. - field: password
  47. name: 密码
  48. type: password
  49. required: false
  50. - field: ssl
  51. name: 启用HTTPS
  52. # 当type为boolean时,前端用switch展示开关
  53. type: boolean
  54. required: true