API Plugins - maxgrafik/violetCMS GitHub Wiki

Data structures

Plugin list

[
    {
        name: <string>,
        enabled: <boolean>,
        hidden: <boolean>,
        version: <string>,
        description: <string>
    },
    ...
]

Plugin config.json

{
    name: <string>,
    enabled: <boolean>,
    hidden: <boolean>,
    info: {
        version: <string>,
        description: <string>,
        author: <string>,
        email: <email>,
        homepage: <url>,
        license: <string>
    },
    config: [
        {
            label: <string>,
            type: 'boolean' | 'string' | 'page',
            value: <boolean> | <string> | <url>
        },
        ...
    ]
}

The hidden field specifies, whether the plugin should be hidden in the page editor’s plugin menu. The config array is optional, but provides a way to define additional plugin settings.

GET

q=plugins Gets a list of all installed plugins.

q=plugins&name=<pluginname> Gets the config.json for the given plugin.

POST

q=plugins&name=<pluginname>&action=<action>

Actions

update

{
    enabled: <boolean>,
    config: [...]
}

Updates the plugin’s enabled status and config values.

delete

Deletes the given plugin. No message body here.

⚠️ **GitHub.com Fallback** ⚠️