micro-lc provides an API that can be used by your plugins to retrieve its dynamic configuration expressed in
All these configurations must be stored in the same path, defined by the
PLUGINS_CONFIGURATIONS_PATH environment variable.
To retrieve them, you can perform a GET request to
is the name of the
JSON file that is stored in the path
For example, if you:
- create a file in
You can then retrieve its content with the GET request
The general configuration endpoint supports two kinds of configuration structure:
- referenced: the configuration is a referenced template that is populated by the API at runtime;
- plain: the configuration is returned as-is. It can have any structure.
A referenced configuration has two root properties:
$ref: contains the object with the references to replace.
Its structure is:
<key referenced in the content>:<object to place in the content>;
content: the configuration content that must be replaced and returned.
An example of referenced configuration can be the following:
After processing, the resulting configuration will be:
Both configuration structures support ACL using the
aclExpression property previously discussed.
For example, given this plain configuration:
aclExpression doesn't evaluate
true, the result will be: