# Plugin Configuration

A plugin configuration object is used to create or load a plugin.

It is a JSON object that looks like this:

{
"id": <id>,
"type": <type>,
"params": {
<params>
}
}

• id is a string that defines the URL at which the plugin will be available via the REST API
• type is a string that specified the plugin's type (see below)
• params is an object that configures the plugin, and whose contents will vary according to the type

Not all three of these fields are required in all contexts:

• one or both of id and type must be specified
• if only id is specified, MLDB will assume this is a pre-existing plugin and will try to load it (an error will ensue if it doesn't already exist)
• if type is specified, MLDB will assume that the plugin doesn't exist yet and will try to create it (an error will ensue if it already exists)
• if type is specified without id, an id will be auto-generated
• if type is specified with id, the plugin will be created with the specified id unless a plugin already exists with that id
• if type is specified, then a corresponding params function must be specified if the type requires it

The following types of plugins are available:

TypeDescriptionDoc
javascriptJavascript plugin loader[doc]
pythonLoad plugins or run scripts written in the Python language[doc]
sharedLibraryPlugin loader for compiled shared libraries[doc]