Possible reasons and solutions for this issue:
1. Response Mapping Issue:
• Ensure that the response JSON structure is correctly mapped to the domain model in the “Send REST Request” activity.
• Check if the import mapping is correctly set up to handle the incoming response.
2. Incorrect Handling of Response Object:
• If the response is coming in as an empty object, verify that the response body is being captured properly.
• Log the raw response before processing to see if the API is indeed returning an empty response or if the issue lies in the mapping.
3. Content-Type and Headers:•
Ensure the correct Content-Type and Accept headers are being used when sending the request.
• Some APIs require specific headers to return the correct response format.
4. Debugging Steps:
• Use logging in your microflow to print the raw request and response data.
• Try using an API client like Postman to check the actual API response.
• If the API response is correct in Postman but not in Mendix, the issue is likely in the import mapping.
I got the solution, after the Send REST Request activity need to call Import with Mapping
any how the response is giving in Json, the lattestHttpResponse need send as input the output variable which will return an object with data.
Consumed Rest Service is working fine it will save the time to check the API.