Error
I'd love to be able to create custom API endpoints in a much more simple way than the current options. Right now, our choices are either to build a custom DLL or use the Lava webhooks feature to simulate an API endpoint.
The idea would be to make something that functions like the Dynamic Report block. When you add an API endpoint, you can select a Report to use as the source. The report would specify the data to be returned. The linked DataView would by extension specify what data to return. And like the Dynamic Report block, as an admin I would be able to specify which filters can be modified by query string to allow custom filtering of the data.
As an example, I could then easily create an API endpoint that lists all Pending people by targeting the Pending Person report. Using the default report this would return "Name" and "Created Date Time" for each matched person. I could also expose the "Record Type" filter on the Data View to allow a query string parameter to change the default filtering and instead filter for pending businesses. Results might look something like:
[ { "Id": 283, "Name": "Jack Harper", "CreatedDateTime": "8/24/2022 12:53 PM" }, { "Id": 2937, "Name": "Will Jones", "CreatedDateTime": "8/24/2022 12:53 PM" }]
Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.