Hi all,
I need to develop several APIs for our web application. Mostly, these are data synchronization tasks. These APIs will run out of a an API folder on root as such:
/apis/xyz_api/synchronize.php
Once I have the external data loaded into arrays, I would like to use EE2 to populate/update the channels. It will be much more concise if I can use the EE models for this, rather than MySQL queries.
So, how do I instantiate EE in this case?
Than you for your help.
ExpressionEngine isn’t meant to be executed externally apart from its own controllers and views. So the best way to handle data coming from an external source is probably to make your own endpoint in a module using an action request. https://docs.expressionengine.com/latest/development/modules.html#install
Your module would validate and sanitize the input, and then have the entire app at its disposal to do whatever you need to do with this external data.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.