Connector Plugins API

The Connector Plugins API allows you to identify the available connectors and plugins as well as listing the datasource configuration properties for a specific connector plugin type. See Connectors and Datasources for discussion of the relationship between the two.

List Connectors

A GET request lists all available connectors. The path for this request is one of:

/api/apollo/connectors

/api/apollo/connectors/plugins

Both endpoints have the same behavior, so either can be used.

Input

None.

Output

A JSON list of connector names.

Examples

Note
Use port 8765 in local development environments only. In production, use port 8764.

Get all available connectors:

REQUEST

curl -u user:pass http://localhost:8764/api/apollo/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" ]

List Connector Types

A GET request lists all supported plugin types for a specific connector. The path for this request is one of:

/api/apollo/connectors/plugins/<name>

/api/apollo/connectors/plugins/<name>/types

where <name> is a specific connector. These endpoints act the same, so either can be used.

To see the complete datasource specification for this connector plugin type, the GET request path is:

/api/apollo/connectors/plugins/<name>/types/<type>

where <name> is a specific connector and <type> is a supported plugin type for this connector.

Input

None.

Output

The output is a JSON schema that details each available property of each supported type for each connector requested.

The schema will include default values for any property, the data type for the property, if the property is editable, if it has a list of allowed values, and if it is required when creating a datasource for that type.

Examples

List the property specifications for the "file" type of the "lucid.fs" connector (the output has been truncated for space):

REQUEST

curl -u user:pass http://localhost:8764/api/apollo/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
  },
...
] }

Drop ConnectorDB State

A DELETE request will drop the tables in the connector database for the named plugin. The request path is:

DELETE /api/apollo/connectors/plugins/<name>/state?collection=<collectionId>

where <name> is the name of the connector plugin for which to drop the state and <collectionId> is the name of a collection associated with this plugin. The collection parameter is optional.

Input

None.

Output Content

None.

Examples

Delete the crawl database for the SolrXML plugin:

REQUEST

curl -u user:pass -X DELETE http://localhost:8764/api/apollo/plugins/lucid.solrxml/state

RESPONSE

None.