How to create a custom wrapper logic on remote web service API


I am a Dreamfactory newbie and I apologize if this question has been posted earlier (I could see one thread Modifying the REST APIs but that is possibly not a duplicate).

I want to create a wrapper service API where I’d check few parameters and compute a hash a initiate a call to remote file service. For example, I want to check if the client request has certain header parameters, extract and validate the client id from the parameter and call a S3 service endpoint to fetch additional metadata. So, I created a custom remote web service and I could create a new API signature from the admin UI but I couldn’t find a way to implement the logic in the API implementation. Therefore, my question is can I not create a wrapper/custom web service API implementation (in any Dreamfactory supported language) and host the API implementation on Dreamfactory (or anywhere else) as a service API?

Currently, I have to implement such logic in the application layer and that will require individual implementation for each client platform and I want to keep all these logic behind a simple REST API.

Please feel free to suggest/refer to any pointers.

Thanks a lot,

Any thoughts/suggestions?

Hey @nemo, you can write a custom JS script in DreamFactory and call it as a REST API.

This blog post explains how it works

A custom script may meet your requirements, give it a look.