Process a request and respond with a "dynamic" JSON

I wish to allow an external app for querying my module.
To simplify it a bit: the module contains data like customer ID, sold item, date. There are multiple rows per customer ID and I would like to be able to send a request with the Customer ID and in response get a JSON with matching rows.

I understand the idea of processing an HTTP request within a workflow, but I have no idea how to attach a dynamic JSON to the “Postfiltering” → “JSON Response”. To me, it looks like I can only pass there a static value.

To be honest I admire you all for working with such limited documentation :slight_smile: Is there any other hidden place where I can find any information on how to perform such tasks?

Can you use the built-in record search endpoint? The response is a JSON; you can use this cURL

curl "$BASE_URL/api/compose/namespace/$NAMESPACE_ID/module/$MODULE_ID/record/?query=0&limit=20" \
  -H 'Accept: application/json, text/plain, */*' \
  -H "Authorization: Bearer $JWT" \

The integration gateway doesn’t currently support much response manipulation – this will be improved (most likely) in the 2022.9 release.

The docs are here and the repo is here. Suggestions for improvements/contributions are always welcome


Thank you very much for your help. I have a few projects in my pipeline that I wish to build based on Corteza, so I hope that soon I will be able to help with docs :wink:

1 Like