插件(Plugins)

获取所有节点插件列表

API 定义:

  1. GET api/v3/plugins/

请求示例:

  1. GET api/v3/plugins/

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "node": "emqx@127.0.0.1",
  6. "plugins": [
  7. {
  8. "name": "emqx_auth_clientid",
  9. "version": "v3.1.0",
  10. "description": "EMQ X Authentication with ClientId/Password",
  11. "active": false
  12. },
  13. {
  14. "name": "emqx_auth_http",
  15. "version": "v3.1.0",
  16. "description": "EMQ X Authentication/ACL with HTTP API",
  17. "active": false
  18. },
  19. {
  20. "name": "emqx_auth_jwt",
  21. "version": "v3.1.0",
  22. "description": "EMQ X Authentication with JWT",
  23. "active": false
  24. },
  25. {
  26. "name": "emqx_auth_ldap",
  27. "version": "v3.1.0",
  28. "description": "EMQ X Authentication/ACL with LDAP",
  29. "active": false
  30. },
  31. {
  32. "name": "emqx_auth_mongo",
  33. "version": "v3.1.0",
  34. "description": "EMQ X Authentication/ACL with MongoDB",
  35. "active": false
  36. },
  37. {
  38. "name": "emqx_auth_mysql",
  39. "version": "v3.1.0",
  40. "description": "EMQ X Authentication/ACL with MySQL",
  41. "active": false
  42. },
  43. {
  44. "name": "emqx_auth_pgsql",
  45. "version": "v3.1.0",
  46. "description": "EMQ X Authentication/ACL with PostgreSQL",
  47. "active": false
  48. },
  49. {
  50. "name": "emqx_auth_redis",
  51. "version": "v3.1.0",
  52. "description": "EMQ X Authentication/ACL with Redis",
  53. "active": false
  54. },
  55. {
  56. "name": "emqx_auth_username",
  57. "version": "v3.1.0",
  58. "description": "EMQ X Authentication with Username and Password",
  59. "active": false
  60. },
  61. {
  62. "name": "emqx_coap",
  63. "version": "v3.1.0",
  64. "description": "EMQ X CoAP Gateway",
  65. "active": false
  66. },
  67. {
  68. "name": "emqx_dashboard",
  69. "version": "v3.1.0",
  70. "description": "EMQ X Web Dashboard",
  71. "active": true
  72. },
  73. {
  74. "name": "emqx_delayed_publish",
  75. "version": "v3.1.0",
  76. "description": "EMQ X Delayed Publish",
  77. "active": false
  78. },
  79. {
  80. "name": "emqx_lua_hook",
  81. "version": "v3.1.0",
  82. "description": "EMQ X Lua Hooks",
  83. "active": false
  84. },
  85. {
  86. "name": "emqx_lwm2m",
  87. "version": "v3.1.0",
  88. "description": "EMQ X LwM2M Gateway",
  89. "active": false
  90. },
  91. {
  92. "name": "emqx_management",
  93. "version": "v3.1.0",
  94. "description": "EMQ X Management API and CLI",
  95. "active": true
  96. },
  97. {
  98. "name": "emqx_plugin_template",
  99. "version": "v3.1.0",
  100. "description": "EMQ X Plugin Template",
  101. "active": false
  102. },
  103. {
  104. "name": "emqx_psk_file",
  105. "version": "v3.1.0",
  106. "description": "EMQX PSK Plugin from File",
  107. "active": false
  108. },
  109. {
  110. "name": "emqx_recon",
  111. "version": "v3.1.0",
  112. "description": "EMQ X Recon Plugin",
  113. "active": true
  114. },
  115. {
  116. "name": "emqx_reloader",
  117. "version": "v3.1.0",
  118. "description": "EMQ X Reloader Plugin",
  119. "active": false
  120. },
  121. {
  122. "name": "emqx_retainer",
  123. "version": "v3.1.0",
  124. "description": "EMQ X Retainer",
  125. "active": true
  126. },
  127. {
  128. "name": "emqx_rule_engine",
  129. "version": "v3.1.0",
  130. "description": "EMQ X Rule Engine",
  131. "active": true
  132. },
  133. {
  134. "name": "emqx_sn",
  135. "version": "v3.1.0",
  136. "description": "EMQ X MQTT SN Plugin",
  137. "active": false
  138. },
  139. {
  140. "name": "emqx_statsd",
  141. "version": "v3.1.0",
  142. "description": "Statsd for EMQ X",
  143. "active": false
  144. },
  145. {
  146. "name": "emqx_stomp",
  147. "version": "v3.1.0",
  148. "description": "EMQ X Stomp Protocol Plugin",
  149. "active": false
  150. },
  151. {
  152. "name": "emqx_web_hook",
  153. "version": "v3.1.0",
  154. "description": "EMQ X Webhook Plugin",
  155. "active": false
  156. }
  157. ]
  158. }
  159. ]
  160. }

获取节点插件列表

API 定义:

  1. GET api/v3/nodes/${node}/plugins/

请求示例:

  1. GET api/v3/nodes/emqx@127.0.0.1/plugins/

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "name": "emqx_auth_clientid",
  6. "version": "v3.1.0",
  7. "description": "EMQ X Authentication with ClientId/Password",
  8. "active": false
  9. },
  10. {
  11. "name": "emqx_auth_http",
  12. "version": "v3.1.0",
  13. "description": "EMQ X Authentication/ACL with HTTP API",
  14. "active": false
  15. },
  16. {
  17. "name": "emqx_auth_jwt",
  18. "version": "v3.1.0",
  19. "description": "EMQ X Authentication with JWT",
  20. "active": false
  21. },
  22. {
  23. "name": "emqx_auth_ldap",
  24. "version": "v3.1.0",
  25. "description": "EMQ X Authentication/ACL with LDAP",
  26. "active": false
  27. },
  28. {
  29. "name": "emqx_auth_mongo",
  30. "version": "v3.1.0",
  31. "description": "EMQ X Authentication/ACL with MongoDB",
  32. "active": false
  33. },
  34. {
  35. "name": "emqx_auth_mysql",
  36. "version": "v3.1.0",
  37. "description": "EMQ X Authentication/ACL with MySQL",
  38. "active": false
  39. },
  40. {
  41. "name": "emqx_auth_pgsql",
  42. "version": "v3.1.0",
  43. "description": "EMQ X Authentication/ACL with PostgreSQL",
  44. "active": false
  45. },
  46. {
  47. "name": "emqx_auth_redis",
  48. "version": "v3.1.0",
  49. "description": "EMQ X Authentication/ACL with Redis",
  50. "active": false
  51. },
  52. {
  53. "name": "emqx_auth_username",
  54. "version": "v3.1.0",
  55. "description": "EMQ X Authentication with Username and Password",
  56. "active": false
  57. },
  58. {
  59. "name": "emqx_coap",
  60. "version": "v3.1.0",
  61. "description": "EMQ X CoAP Gateway",
  62. "active": false
  63. },
  64. {
  65. "name": "emqx_dashboard",
  66. "version": "v3.1.0",
  67. "description": "EMQ X Web Dashboard",
  68. "active": true
  69. },
  70. {
  71. "name": "emqx_delayed_publish",
  72. "version": "v3.1.0",
  73. "description": "EMQ X Delayed Publish",
  74. "active": false
  75. },
  76. {
  77. "name": "emqx_lua_hook",
  78. "version": "v3.1.0",
  79. "description": "EMQ X Lua Hooks",
  80. "active": false
  81. },
  82. {
  83. "name": "emqx_lwm2m",
  84. "version": "v3.1.0",
  85. "description": "EMQ X LwM2M Gateway",
  86. "active": false
  87. },
  88. {
  89. "name": "emqx_management",
  90. "version": "v3.1.0",
  91. "description": "EMQ X Management API and CLI",
  92. "active": true
  93. },
  94. {
  95. "name": "emqx_plugin_template",
  96. "version": "v3.1.0",
  97. "description": "EMQ X Plugin Template",
  98. "active": false
  99. },
  100. {
  101. "name": "emqx_psk_file",
  102. "version": "v3.1.0",
  103. "description": "EMQX PSK Plugin from File",
  104. "active": false
  105. },
  106. {
  107. "name": "emqx_recon",
  108. "version": "v3.1.0",
  109. "description": "EMQ X Recon Plugin",
  110. "active": true
  111. },
  112. {
  113. "name": "emqx_reloader",
  114. "version": "v3.1.0",
  115. "description": "EMQ X Reloader Plugin",
  116. "active": false
  117. },
  118. {
  119. "name": "emqx_retainer",
  120. "version": "v3.1.0",
  121. "description": "EMQ X Retainer",
  122. "active": true
  123. },
  124. {
  125. "name": "emqx_rule_engine",
  126. "version": "v3.1.0",
  127. "description": "EMQ X Rule Engine",
  128. "active": true
  129. },
  130. {
  131. "name": "emqx_sn",
  132. "version": "v3.1.0",
  133. "description": "EMQ X MQTT SN Plugin",
  134. "active": false
  135. },
  136. {
  137. "name": "emqx_statsd",
  138. "version": "v3.1.0",
  139. "description": "Statsd for EMQ X",
  140. "active": false
  141. },
  142. {
  143. "name": "emqx_stomp",
  144. "version": "v3.1.0",
  145. "description": "EMQ X Stomp Protocol Plugin",
  146. "active": false
  147. },
  148. {
  149. "name": "emqx_web_hook",
  150. "version": "v3.1.0",
  151. "description": "EMQ X Webhook Plugin",
  152. "active": false
  153. }
  154. ]
  155. }

启用节点指定插件

API 定义:

  1. PUT api/v3/nodes/${node}/plugins/${plugin}/load

请求示例:

  1. PUT api/v3/nodes/emqx@127.0.0.1/plugins/emqx_auth_clientid/load

返回数据:

  1. {
  2. "code": 0
  3. }

关闭节点指定插件

API 定义:

  1. PUT api/v3/nodes/${node}/plugins/${plugin}/unload

请求示例:

  1. PUT api/v3/nodes/emqx@127.0.0.1/plugins/emqx_auth_clientid/unload

返回数据:

  1. {
  2. "code": 0
  3. }