Closed ejegg closed 2 months ago
It's the wave of the future!
Couldn't agree more. Are you going to be working on this, or just putting it out there?
I hope to get it working! I'm just looking it over now. I see we will at least have to allow passing '4' as a value for 'version', and will have to pass through urls of the format civicrm/ajax/api4/entity/action. I was thinking of adding an .htacess file to help with the latter, mapping the /entity/action path segments to query string parameters and passing them to civiproxy's rest.php.
Do you have any further suggestions?
I was thinking of adding an .htacess file to help with the latter, mapping the /entity/action path segments to query string parameters and passing them to civiproxy's rest.php. Do you have any further suggestions?
Hm, I haven't spent much thought on it, but that sounds plausible.
However, another approach would be to add a separate rest4.php
endpoint. This has a couple of advantages:
Think about it.
OK @bjendres I have added a separate rest4.php endpoint in the linked pull request, along with a .htaccess file to rewrite API4 style requests coming in to civiproxy so rest4.php sees the entity and action on the querystring.
It's the wave of the future!