The Kuiper REST api for plugins allows you to manage plugins, such as create, drop and list plugins. Notice that, drop a plugin will need to restart kuiper to take effect. To update a plugin, do the following:
The API accepts a JSON content to create a new plugin. Each plugin type has a standalone endpoint. The supported types are ["sources", "sinks", "functions"
. The plugin is identified by the name. The name must be unique.
POST http://localhost:9081/plugins/sources
POST http://localhost:9081/plugins/sinks
POST http://localhost:9081/plugins/functions
Request Sample
{
"name":"random",
"file":"http://127.0.0.1/plugins/sources/random.zip",
"callback":"http://mycallback.com"
}
Random
, then the name of this plugin is random
.The API is used for displaying all of plugins defined in the server for a plugin type.
GET http://localhost:9081/plugins/sources
GET http://localhost:9081/plugins/sinks
GET http://localhost:9081/plugins/functions
Response Sample:
["plugin1","plugin2"]
The API is used for drop the plugin. The kuiper server needs to be restarted to take effect.
DELETE http://localhost:8080/rules/sources/{name}
DELETE http://localhost:8080/rules/sinks/{name}
DELETE http://localhost:8080/rules/functions/{name}
The user can pass a query parameter for a callback url. Kuiper will issue a GET request to the callback url after deleting the plugin.
DELETE http://localhost:8080/rules/sources/{name}?callback=http%3A%2F%2Fwww.mycallback.com%2Fcallback