Show examples in:
JavascriptHTTP
Content Management API > Plugin

Plugin

Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.

Object payload

idstring

RFC 4122 UUID of plugin expressed in URL-safe base64 format

Example:"RMAMRffBRlmBuDlQsIWZ0g"
typestring

Must be exactly "plugin".

namestring

The name of the plugin

Example:"5 stars"
descriptionnull, string

A description of the plugin

Example:"A better rating experience!"
urlstring

The entry point URL of the plugin

Example:"https://cdn.rawgit.com/datocms/extensions/master/samples/five-stars/extension.ts"
parametersnull, object

Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. Collaborators always receive it. API tokens and OAuth applications receive it only if they can edit the schema of the project, otherwise it returns null.

Example:{ devMode: true }
package_namenull, string

NPM package name of the plugin (or null if it's a private plugin)

Example:"datocms-plugin-star-rating-editor"
package_versionnull, string

The installed version of the plugin (or null if it's a private plugin)

Example:"0.0.4"
permissions

Permissions granted to this plugin

Type:Array<string>
enabledboolean

Whether the plugin is enabled or not. When disabled, the plugin behaves as if it didn't exist: fields using it as editor/addon fall back to the default editor, and any sidebar panel/page/config screen/asset source it registers does not render.

meta.versionstring

Version of the plugin. Legacy plugins are v1, new plugins are v2

Example:"2"
plugin_typenull, enumDeprecated

The type of field extension a legacy plugin implements

This field makes sense for legacy plugins only. Modern plugins declare their capabilities at run-time.

field_editor

Field editor plugin

sidebar

Sidebar plugin

field_addon

Field addon plugin

field_typesDeprecated

On which types of field in which a legacy plugin can be used

This field makes sense for legacy plugins only. Modern plugins declare their capabilities at run-time.

Type:null, Array<string>
parameter_definitionsnull, objectDeprecated

The schema for the parameters a legacy plugin can persist

This field makes sense for legacy plugins only. Modern plugins declare can store anything they want in the parameters attribute.

globalArray
instanceArray

Available endpoints