插件

GET /api/v4/plugins

返回集群下的所有插件信息。

Path Parameters:

Success Response Body (JSON):

NameTypeDescription
codeInteger0
dataArray of Objects所有路由信息
data[0].nodeString节点名称
data[0].pluginsArray插件信息,由对象组成的数组,见下文
data[0].plugins.nameString插件名称
data[0].plugins.versionString插件版本
data[0].plugins.descriptionString插件描述
data[0].plugins.activeBoolean插件是否启动
data[0].plugins.typeString插件类型,目前有
authbridgefeatureprotocol 四种类型

Examples:

  1. $ curl -i --basic -u admin:public -X GET "http://localhost:8081/api/v4/plugins"
  2. {"data":[{"plugins":[{"version":"develop","type":"auth","name":"emqx_auth_clientid","description":"EMQ X Authentication with ClientId/Password","active":false}, ...],"node":"emqx@127.0.0.1"}],"code":0}

GET /api/v4/nodes/{node}/plugins

类似 GET /api/v4/plugins,返回指定节点下的插件信息。

Path Parameters:

Success Response Body (JSON):

NameTypeDescription
codeInteger0
dataArray of Objects所有路由信息
data[0].nameString插件名称
data[0].versionString插件版本
data[0].descriptionString插件描述
data[0].activeBoolean插件是否启动
data[0].typeString插件类型,目前有
authbridgefeatureprotocol 四种类型

Examples:

  1. $ curl -i --basic -u admin:public -X GET "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins"
  2. {"data":[{"version":"develop","type":"auth","name":"emqx_auth_clientid","description":"EMQ X Authentication with ClientId/Password","active":false}, ...],"code":0}

PUT /api/v4/nodes/{node}/plugins/{plugin}/load

加载指定节点下的指定插件。

Parameters:

Success Response Body (JSON):

NameTypeDescription
codeInteger0

Examples:

  1. $ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/load"
  2. {"code":0}

PUT /api/v4/nodes/{node}/plugins/{plugin}/unload

卸载指定节点下的指定插件。

Parameters:

Success Response Body (JSON):

NameTypeDescription
codeInteger0

Examples:

  1. $ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/unload"
  2. {"code":0}

PUT /api/v4/nodes/{node}/plugins/{plugin}/reload

重新加载指定节点下的指定插件。

Parameters:

Success Response Body (JSON):

NameTypeDescription
codeInteger0

Examples:

  1. $ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/reload"
  2. {"code":0}