grav-plugin-api icon indicating copy to clipboard operation
grav-plugin-api copied to clipboard

feat: install new plugin

Open Regaez opened this issue 5 years ago • 0 comments

Expose an authenticated endpoint, POST /plugins which allows an admin to install a new plugin on the site.

Request Body:

Required fields:

  • id: the "plugin name" as per GPM

They also have the option of providing an attributes field which will be applied after the installation of the plugin. If not provided, then the plugin will use its default configuration.

{
  "id": "{{plugin_name}}",
  "attributes": { 
    // some initial configuration settings 
    "enabled": false
  }
}

Regaez avatar Aug 07 '19 07:08 Regaez