Fusion

Version 5.1
How To
Documentation
    Learn More

      Connector Plugins Repository API Reference

      API Objective: List plugins from the built-in plugin repository.

      The Connector Plugins Repository API is used to install and update connector plugins from the built-in plugin repository.

      How does this differ from the Connector Plugins API?

      This API is used to install and update plugins.

      The Connector Plugins API allows you to identify the installed connectors and plugins as well as list the datasource configuration properties for a specific connector plugin type.

      Examples

      The examples below use the following parameter values:

      Change these values if you are using the example commands.

      Listing plugins

      A plugin’s version and sdkVersion value depends on the connector’s platform version and update history. You might encounter a plugins with very different version values, such as 2.1.0 and 5.2.0. The variance in versioning is expected.
      All plugins
      curl -u admin:Password123 http://fusion-cluster:6764/connectors/repository
      [ {
        "id" : "lucidworks.fs",
        "version" : "2.1.0",
        "sdkVersion" : "2.0.0",
        "location" : "com/lucidworks/connector/plugins/lucidworks.connector.fs/2.1.0/lucidworks.connector.fs-2.1.0.zip"
      },
      {
        "id" : "lucid.twitter-search",
        "version" : "5.2.0",
        "sdkVersion" : "5.2.0",
        "location" : "com/lucidworks/connector/plugins/lucid.twitter-search/5.2.0/lucid.twitter-search-5.2.0.zip"
      },
      {
        ...
      } ]
      Specific plugin
      curl -u admin:Password123 http://fusion-cluster:6764/connectors/repository?name=lucidworks.fs
      [ {
        "id" : "lucidworks.fs",
        "version" : "2.1.0",
        "sdkVersion" : "2.0.0",
        "location" : "com/lucidworks/connector/plugins/lucidworks.connector.fs/2.1.0/lucidworks.connector.fs-2.1.0.zip"
      } ]
      Invalid plugin

      If you attempt to list an invalid plugin name, the output will appear as follows:

      curl -u admin:Password123 http://fusion-cluster:6764/connectors/repository?name=lucidworks.asd
      [ ]

      Installing plugins

      Successful
      curl -u admin:Password123 -X POST "http://fusion-cluster:6764/connectors/plugins?id=lucidworks.fs"
      {
        "pluginId" : "lucidworks.fs",
        "status" : {
          "action" : "INSTALL",
          "status" : "SUCCESS",
          "message" : "Plugin lucidworks.fs was installed successfully."
        }
      }
      Update

      To update a connector, run the install curl command again. If the connector is already installed, the output will include "action" : "UPDATE".

      curl -u admin:Password123 -X POST "http://fusion-cluster:6764/connectors/plugins?id=lucidworks.fs"
      {
        "pluginId" : "lucidworks.fs",
        "status" : {
          "action" : "UPDATE",
          "status" : "SUCCESS",
          "message" : "Plugin lucidworks.fs was installed successfully."
        }
      }
      Unsuccessful

      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 admin:Password123 -X POST "http://fusion-cluster:6764/connectors/plugins?id=lucidworks.asd"
      {
        "pluginId" : "lucidworks.asd",
        "status" : {
          "action" : "INSTALL",
          "status" : "NOOP",
          "message" : "Plugin not found in repository: lucidworks.asd"
        }
      }
      Loading API specification...