I try to implement a custom API for a REP Software.
This software sends simple Get- and Post-requests to a (Magento-API-) URL.
The Software starts a session through a GET-Request:
$_GET[’action’] = version <-- Problem
$_GET[’user’] = Username
and needs a return of a xml-file.
My problem is that Magento already uses the $_GET[’action’] - parameter and I can’t change it in REP-software.
When I try to load .../api/myApi?action=version I get a 404. (I always get a 404 when i try to load any Magento-URL with ?action=somedata.)
After the session is started all data is posted through a $_POST-Request.
The identifier then is the $_POST[’action’] - parameter (e.g. $_POST[’action’] = ‘update_product’) an should be passed (didn’t test it).
Where is the handling of the $_GET[’action’] - parameter defined in Magento and what is it for? Is it possible to deactivate/overwrite/cancel it for custom APIs? I searched a lot but can’t find any help or class for that.
I could pass the request through an outside-Magento-file and send a modificated request to Magento-API. In this case I don’t even need a custom API but it is very slow to pass a request to a server, then send it to Magento-API and do it the same way back. I also tried url-rewrite but without success. (Could both be quick and dirty solutions.)
Any ideas or help would be great. Thanks!