Is there any way to mock API calls when testing Logic Blocks? So that we can test data without needing to set up a test API. For example: Hitting the table or logic block from postman, the logic having an endpoint request, mocking different responses of that request?
AFAIK this is not currently possible.
If you are a Nextworld customer or partner, work with your system administrator to submit an official enhancement request with customer support. Include a link to this post in the support ticket. If you’re not a Nextworld customer, keep an eye on release notes. We’re always making improvements.
Agreed with @ian.p that this is not currently supported via endpoints, but this is exactly what the Logic Block Test Harness application is meant to provide, albeit via logic block call instead of endpoint. You can navigate to the Logic Block Builder application and create a logic block of type Test, then create an associated Test Harness definition.
By using the Call Target Logic Block, Validate Message, and Validate Record actions within a test logic block, you can create a payload, call the API in question, and validate that the call had the desired results.