插件
GET /api/v4/plugins
返回集群下的所有插件信息。
Path Parameters: 无
Success Response Body (JSON):
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | 所有路由信息 |
data[0].node | String | 节点名称 |
data[0].plugins | Array | 插件信息,由对象组成的数组,见下文 |
data[0].plugins.name | String | 插件名称 |
data[0].plugins.version | String | 插件版本 |
data[0].plugins.description | String | 插件描述 |
data[0].plugins.active | Boolean | 插件是否启动 |
data[0].plugins.type | String | 插件类型,目前有auth 、bridge 、feature 、protocol 四种类型 |
Examples:
$ curl -i --basic -u admin:public -X GET "http://localhost:8081/api/v4/plugins"
{"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):
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | 所有路由信息 |
data[0].name | String | 插件名称 |
data[0].version | String | 插件版本 |
data[0].description | String | 插件描述 |
data[0].active | Boolean | 插件是否启动 |
data[0].type | String | 插件类型,目前有auth 、bridge 、feature 、protocol 四种类型 |
Examples:
$ curl -i --basic -u admin:public -X GET "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins"
{"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):
Name | Type | Description |
---|---|---|
code | Integer | 0 |
Examples:
$ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/load"
{"code":0}
PUT /api/v4/nodes/{node}/plugins/{plugin}/unload
卸载指定节点下的指定插件。
Parameters: 无
Success Response Body (JSON):
Name | Type | Description |
---|---|---|
code | Integer | 0 |
Examples:
$ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/unload"
{"code":0}
PUT /api/v4/nodes/{node}/plugins/{plugin}/reload
重新加载指定节点下的指定插件。
Parameters: 无
Success Response Body (JSON):
Name | Type | Description |
---|---|---|
code | Integer | 0 |
Examples:
$ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/plugins/emqx_delayed_publish/reload"
{"code":0}