I think it's possible, but Ashley will know better :D There's a plugin or two that allow you to execute JS code, but you can't access c2 api, or can't access it all. Never used those plugins. They would be really useful if you could access all the api.