Access environment variables from Optimize plugin


hi - when building a custom plugin for Optimize, e.g, is there a way to access the environment variables defined in the environment yaml ?

Any documentation or snippets of code appreciated.



Hey Eleco!

there is not yet an official way, however you could add the optimize-backend-2.x.x.jar as a local dependency to your project and would then be able to use and inject the internal ConfigurationService like this.

import org.camunda.optimize.service.util.configuration.ConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;

public class EngineRestFilterWithConfig implements EngineRestFilter {

private ConfigurationService configurationService;

public void filter(ClientRequestContext requestContext, String engineAlias, String engineName) throws IOException {


Assuming you only need access to already defined configuration entries you could do it like that, but you won’t be able to access any custom entries.

What is your use case if I may ask?



thanks @Sebastian_Bathke

our use case - we’d like to configure the way optimize authenticates against the bpmn engine, based on custom parameters stored in the environmnent.yaml. The alternative being to use system properties if custom entries are not accessible.