插件(Plugins)
获取所有节点插件列表
API 定义:
GET api/v3/plugins/
请求示例:
GET api/v3/plugins/
返回数据:
{
"code": 0,
"data": [
{
"node": "emqx@127.0.0.1",
"plugins": [
{
"name": "emqx_auth_clientid",
"version": "v3.1.0",
"description": "EMQ X Authentication with ClientId/Password",
"active": false
},
{
"name": "emqx_auth_http",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with HTTP API",
"active": false
},
{
"name": "emqx_auth_jwt",
"version": "v3.1.0",
"description": "EMQ X Authentication with JWT",
"active": false
},
{
"name": "emqx_auth_ldap",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with LDAP",
"active": false
},
{
"name": "emqx_auth_mongo",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with MongoDB",
"active": false
},
{
"name": "emqx_auth_mysql",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with MySQL",
"active": false
},
{
"name": "emqx_auth_pgsql",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with PostgreSQL",
"active": false
},
{
"name": "emqx_auth_redis",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with Redis",
"active": false
},
{
"name": "emqx_auth_username",
"version": "v3.1.0",
"description": "EMQ X Authentication with Username and Password",
"active": false
},
{
"name": "emqx_coap",
"version": "v3.1.0",
"description": "EMQ X CoAP Gateway",
"active": false
},
{
"name": "emqx_dashboard",
"version": "v3.1.0",
"description": "EMQ X Web Dashboard",
"active": true
},
{
"name": "emqx_delayed_publish",
"version": "v3.1.0",
"description": "EMQ X Delayed Publish",
"active": false
},
{
"name": "emqx_lua_hook",
"version": "v3.1.0",
"description": "EMQ X Lua Hooks",
"active": false
},
{
"name": "emqx_lwm2m",
"version": "v3.1.0",
"description": "EMQ X LwM2M Gateway",
"active": false
},
{
"name": "emqx_management",
"version": "v3.1.0",
"description": "EMQ X Management API and CLI",
"active": true
},
{
"name": "emqx_plugin_template",
"version": "v3.1.0",
"description": "EMQ X Plugin Template",
"active": false
},
{
"name": "emqx_psk_file",
"version": "v3.1.0",
"description": "EMQX PSK Plugin from File",
"active": false
},
{
"name": "emqx_recon",
"version": "v3.1.0",
"description": "EMQ X Recon Plugin",
"active": true
},
{
"name": "emqx_reloader",
"version": "v3.1.0",
"description": "EMQ X Reloader Plugin",
"active": false
},
{
"name": "emqx_retainer",
"version": "v3.1.0",
"description": "EMQ X Retainer",
"active": true
},
{
"name": "emqx_rule_engine",
"version": "v3.1.0",
"description": "EMQ X Rule Engine",
"active": true
},
{
"name": "emqx_sn",
"version": "v3.1.0",
"description": "EMQ X MQTT SN Plugin",
"active": false
},
{
"name": "emqx_statsd",
"version": "v3.1.0",
"description": "Statsd for EMQ X",
"active": false
},
{
"name": "emqx_stomp",
"version": "v3.1.0",
"description": "EMQ X Stomp Protocol Plugin",
"active": false
},
{
"name": "emqx_web_hook",
"version": "v3.1.0",
"description": "EMQ X Webhook Plugin",
"active": false
}
]
}
]
}
获取节点插件列表
API 定义:
GET api/v3/nodes/${node}/plugins/
请求示例:
GET api/v3/nodes/emqx@127.0.0.1/plugins/
返回数据:
{
"code": 0,
"data": [
{
"name": "emqx_auth_clientid",
"version": "v3.1.0",
"description": "EMQ X Authentication with ClientId/Password",
"active": false
},
{
"name": "emqx_auth_http",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with HTTP API",
"active": false
},
{
"name": "emqx_auth_jwt",
"version": "v3.1.0",
"description": "EMQ X Authentication with JWT",
"active": false
},
{
"name": "emqx_auth_ldap",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with LDAP",
"active": false
},
{
"name": "emqx_auth_mongo",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with MongoDB",
"active": false
},
{
"name": "emqx_auth_mysql",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with MySQL",
"active": false
},
{
"name": "emqx_auth_pgsql",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with PostgreSQL",
"active": false
},
{
"name": "emqx_auth_redis",
"version": "v3.1.0",
"description": "EMQ X Authentication/ACL with Redis",
"active": false
},
{
"name": "emqx_auth_username",
"version": "v3.1.0",
"description": "EMQ X Authentication with Username and Password",
"active": false
},
{
"name": "emqx_coap",
"version": "v3.1.0",
"description": "EMQ X CoAP Gateway",
"active": false
},
{
"name": "emqx_dashboard",
"version": "v3.1.0",
"description": "EMQ X Web Dashboard",
"active": true
},
{
"name": "emqx_delayed_publish",
"version": "v3.1.0",
"description": "EMQ X Delayed Publish",
"active": false
},
{
"name": "emqx_lua_hook",
"version": "v3.1.0",
"description": "EMQ X Lua Hooks",
"active": false
},
{
"name": "emqx_lwm2m",
"version": "v3.1.0",
"description": "EMQ X LwM2M Gateway",
"active": false
},
{
"name": "emqx_management",
"version": "v3.1.0",
"description": "EMQ X Management API and CLI",
"active": true
},
{
"name": "emqx_plugin_template",
"version": "v3.1.0",
"description": "EMQ X Plugin Template",
"active": false
},
{
"name": "emqx_psk_file",
"version": "v3.1.0",
"description": "EMQX PSK Plugin from File",
"active": false
},
{
"name": "emqx_recon",
"version": "v3.1.0",
"description": "EMQ X Recon Plugin",
"active": true
},
{
"name": "emqx_reloader",
"version": "v3.1.0",
"description": "EMQ X Reloader Plugin",
"active": false
},
{
"name": "emqx_retainer",
"version": "v3.1.0",
"description": "EMQ X Retainer",
"active": true
},
{
"name": "emqx_rule_engine",
"version": "v3.1.0",
"description": "EMQ X Rule Engine",
"active": true
},
{
"name": "emqx_sn",
"version": "v3.1.0",
"description": "EMQ X MQTT SN Plugin",
"active": false
},
{
"name": "emqx_statsd",
"version": "v3.1.0",
"description": "Statsd for EMQ X",
"active": false
},
{
"name": "emqx_stomp",
"version": "v3.1.0",
"description": "EMQ X Stomp Protocol Plugin",
"active": false
},
{
"name": "emqx_web_hook",
"version": "v3.1.0",
"description": "EMQ X Webhook Plugin",
"active": false
}
]
}
启用节点指定插件
API 定义:
PUT api/v3/nodes/${node}/plugins/${plugin}/load
请求示例:
PUT api/v3/nodes/emqx@127.0.0.1/plugins/emqx_auth_clientid/load
返回数据:
{
"code": 0
}
关闭节点指定插件
API 定义:
PUT api/v3/nodes/${node}/plugins/${plugin}/unload
请求示例:
PUT api/v3/nodes/emqx@127.0.0.1/plugins/emqx_auth_clientid/unload
返回数据:
{
"code": 0
}