Plugins
Administrative endpoints for plugins — the configurable extension points registered by the project. Each plugin is defined in code (a key, a name, a description, a default configuration, and a default active state) and can be given a stored override through a plugin setting that carries its own configuration and active flag.
Availability: These endpoints exist only when the plugin module is enabled for the installation (the
omnishop.pluginsapplication is installed). On installations without the plugin module the/plugins/path is not registered and returns404.
Core Capabilities
1. Discovering Plugins
List every registered plugin together with its default configuration and default active state (
GET /plugins/all/).
2. Plugin Setting Lifecycle Management
Retrieve the stored settings, create a setting for a plugin, and update a setting's configuration and active flag.
Deletion is not supported; there is no
DELETEon these endpoints.
Plugins vs. Plugin Settings
A plugin is defined in code and is immutable through the API.
GET /plugins/all/returns the registered plugins with the defaults declared in code.A plugin setting is a stored override for a plugin, addressed by its own
pk. Creating a setting binds it to a plugin bykey; the resolvednameanddescriptionare always read back from the plugin definition, anddefault_configreports the plugin's default configuration alongside the setting's ownconfig.A plugin's
keyis unique across settings — a plugin can have at most one stored setting — and the key of an existing setting cannot be changed.
Configuration Validation
The config object of a setting is validated against the configuration serializer declared by the target plugin, so the accepted shape of config depends on the plugin identified by key. A plugin that declares no configuration accepts an empty object.
Error Codes
Requests that are well-formed but conflict with a business rule are answered with 406 Not Acceptable and carry one of the following codes.
plugin_setting_100_1
The plugin definition for the setting's key is no longer registered. Surfaces on update; on create an unknown key is reported as a 400 validation error on the key field instead.
plugin_setting_100_2
A plugin setting already exists for the given key (raised on create).
Dynamic Settings & Environment Variables
No dynamic settings (dj_dynamic_settings) are read by these endpoints; the plugin module does not register any.
Environment variables: The endpoints are gated by whether the plugin module is installed (omnishop.plugins in INSTALLED_APPS); no other environment variable is read by them.
Last updated
Was this helpful?

