rest.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {
  2. "about": {
  3. "trial": false,
  4. "author": {
  5. "name": "EMQ",
  6. "email": "contact@emqx.io",
  7. "company": "EMQ Technologies Co., Ltd",
  8. "website": "https://www.emqx.io"
  9. },
  10. "helpUrl": {
  11. "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sinks/rest.md",
  12. "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/rest.md"
  13. },
  14. "description": {
  15. "en_US": "The action is used for publish output message into a RESTful API.",
  16. "zh_CN": "该动作用于将输出消息发布到 RESTful API 中。"
  17. }
  18. },
  19. "properties": [
  20. {
  21. "name": "url",
  22. "default": "",
  23. "optional": false,
  24. "control": "text",
  25. "type": "string",
  26. "hint": {
  27. "en_US": "The RESTful API endpoint, such as https://www.example.com/api/dummy",
  28. "zh_CN": "RESTful API 终端地址,例如 https://www.example.com/api/dummy"
  29. },
  30. "label": {
  31. "en_US": "URL",
  32. "zh_CN": "地址"
  33. }
  34. },
  35. {
  36. "name": "method",
  37. "optional": true,
  38. "control": "select",
  39. "default": "GET",
  40. "type": "list_string",
  41. "values": [
  42. "GET",
  43. "POST",
  44. "PUT",
  45. "DELETE",
  46. "HEAD"
  47. ],
  48. "hint": {
  49. "en_US": "The HTTP method for the RESTful API.",
  50. "zh_CN": "RESTful API 的 HTTP 方法。"
  51. },
  52. "label": {
  53. "en_US": "HTTP method",
  54. "zh_CN": "HTTP 方法"
  55. }
  56. },
  57. {
  58. "name": "bodyType",
  59. "optional": true,
  60. "control": "select",
  61. "default": "none",
  62. "type": "list_string",
  63. "values": [
  64. "none",
  65. "json",
  66. "text",
  67. "html",
  68. "xml",
  69. "javascript",
  70. "form"
  71. ],
  72. "hint": {
  73. "en_US": "The type of the body. For \"get\" and \"head\", no body is required so the default value is \"none\". For other http methods, the default value is \"json\" For \"html\", \"xml\" and \"javascript\", the dataTemplate must be carefully set up to make sure the format is correct.",
  74. "zh_CN": "消息体的类型。对于 \"get\" 和 \"head\",不需要正文,因此默认值为 \"none\"。 对于其他 http 方法,默认值为 \"json\"。对于 \"html\",\"xml\" 和 \"javascript\",必须仔细设置 dataTemplate 以确保格式正确。"
  75. },
  76. "label": {
  77. "en_US": "Body type",
  78. "zh_CN": "消息体类型"
  79. }
  80. },
  81. {
  82. "name": "timeout",
  83. "default": 5000,
  84. "optional": true,
  85. "control": "text",
  86. "type": "int",
  87. "hint": {
  88. "en_US": "The timeout (milliseconds) for a HTTP request, defaults to 5000 ms",
  89. "zh_CN": "HTTP 请求超时的时间(毫秒),默认为5000毫秒"
  90. },
  91. "label": {
  92. "en_US": "Timeout(ms)",
  93. "zh_CN": "超时(ms)"
  94. }
  95. },
  96. {
  97. "name": "headers",
  98. "default": {},
  99. "optional": true,
  100. "control": "list",
  101. "type": "object",
  102. "hint": {
  103. "en_US": "The additional headers to be set for the HTTP request.",
  104. "zh_CN": "要为 HTTP 请求设置的其他标头"
  105. },
  106. "label": {
  107. "en_US": "HTTP headers",
  108. "zh_CN": "HTTP 头"
  109. }
  110. },
  111. {
  112. "name": "insecureSkipVerify",
  113. "default": true,
  114. "optional": true,
  115. "control": "radio",
  116. "type": "bool",
  117. "hint": {
  118. "en_US": "Control if to skip the certification verification. If it is set to true, then skip certification verification; Otherwise, verify the certification.",
  119. "zh_CN": "控制是否跳过证书认证。如果被设置为 true,那么跳过证书认证;否则进行证书验证。"
  120. },
  121. "label": {
  122. "en_US": "Certification verification",
  123. "zh_CN": "证书验证"
  124. }
  125. },
  126. {
  127. "name": "debugResp",
  128. "default": true,
  129. "optional": true,
  130. "control": "radio",
  131. "type": "bool",
  132. "hint": {
  133. "en_US": "Control if print the response information into the console. If set it to true, then print response; If set to false, then skip print log.",
  134. "zh_CN": "控制是否将响应信息打印到控制台中。 如果将其设置为 true,则打印响应;如果设置为 false,则跳过打印日志。"
  135. },
  136. "label": {
  137. "en_US": "Print HTTP response",
  138. "zh_CN": "打印 HTTP 响应"
  139. }
  140. }
  141. ]
  142. }