Connector Plugins APIManaged Fusion Connectors APIs
Use the Connector Plugins API to install connectors and update configurations.
For more information, view the API specification.
When you install a connector or plug-in on Fusion 5.x.x, you do not need to supply the .zip file. The installation obtains the .zip file from the repository.
|
Each connector has one or more plugin types. After querying for the list of installed connectors, you can use the connector names to get the list of plugins for each one. Querying a specific plugin returns its configuration schema.
This API is used to list plugins that are already installed on your Managed Fusion cluster and list their configuration properties.
Examples
REQUEST
curl -u USERNAME:PASSWORD https://EXAMPLE_COMPANY.b.lucidworks.cloud/api/connectors/plugins
RESPONSE
[ "lucid.twitter.search", "lucid.push", "lucid.hadoop.mapr", "lucid.azure.table", "lucid.anda", "lucid.hadoop.cloudera", "lucid.azure.blob", "lucid.hortonworks", "lucid.mongodb", "lucid.hadoop", "lucid.hadoop.apache2", "lucid.fs", "lucid.hadoop.apache1", "lucid.jdbc", "lucid.hadoop.intel", "lucid.twitter.stream", "lucid.solrxml" ]
REQUEST
curl -u USERNAME:PASSWORD https://EXAMPLE_COMPANY.b.lucidworks.cloud/api/connectors/plugins/lucid.fs/types/file
RESPONSE
{
"props" : [ {
"description" : "general",
"name" : "---"
}, {
"read_only" : false,
"default_value" : null,
"description" : "datasource.collection",
"hints" : [ "summary" ],
"allowed_values" : null,
"name" : "collection",
"type" : "string",
"required" : false
}, {
"read_only" : false,
"default_value" : false,
"description" : "datasource.debug",
"hints" : [ "advanced" ],
"allowed_values" : null,
"name" : "debug",
"type" : "boolean",
"required" : false
}, {
"read_only" : false,
"default_value" : null,
"description" : "datasource.initial_mapping",
"hints" : [ "advanced" ],
"allowed_values" : null,
"name" : "initial_mapping",
"type" : "map",
"required" : false
}, {
"read_only" : false,
"default_value" : null,
"description" : "datasource.db",
"hints" : [ "advanced" ],
"allowed_values" : null,
"name" : "db",
"type" : "map",
"required" : false
}, {
"description" : "root path",
"name" : "---"
}, {
"read_only" : false,
"default_value" : null,
"description" : "datasource.path",
"hints" : [ "summary" ],
"allowed_values" : null,
"name" : "path",
"type" : "string",
"required" : true
}, {
"description" : "Filesystem URL",
"name" : "---"
}, {
"read_only" : true,
"default_value" : null,
"description" : "datasource.url",
"hints" : [ "summary" ],
"allowed_values" : null,
"name" : "url",
"type" : "string",
"required" : false
},
...
] }
Installing plugins
curl -u USERNAME:PASSWORD -X POST "{cluster}/connectors/plugins?id=lucidworks.fs"
{
"pluginId" : "lucidworks.fs",
"status" : {
"action" : "INSTALL",
"status" : "SUCCESS",
"message" : "Plugin lucidworks.fs was installed successfully."
}
}
To update a connector, run the install curl
command again. If the connector is already installed, the output will include "action" : "UPDATE"
.
curl -u USERNAME:PASSWORD -X POST "{cluster}/connectors/plugins?id=lucidworks.fs"
{
"pluginId" : "lucidworks.fs",
"status" : {
"action" : "UPDATE",
"status" : "SUCCESS",
"message" : "Plugin lucidworks.fs was installed successfully."
}
}
If an installation is unsuccessful, the output will include "status" : "NOOP"
and a reason for the failure. In the example below, an invalid connector id
was given.
curl -u USERNAME:PASSWORD -X POST "{cluster}/connectors/plugins?id=lucidworks.asd"
{
"pluginId" : "lucidworks.asd",
"status" : {
"action" : "INSTALL",
"status" : "NOOP",
"message" : "Plugin not found in repository: lucidworks.asd"
}
}