Hi All,
I’m trying to call a rest service via Postman. The service returns JSON object as response, the status code in postman is 200 but it returns empty JSON response. Could anyone help?
Hey @sameertawargeri,
Welcome to the SailPoint Developer Community & thank you for posting! In order to better help you, could you please tell us what you are trying to achieve and provide more details so we can better understand your situation, and the result you are looking for?
Hi @jordan.violet,
There is a Rest service which connects to a database and gets the user results from a table and preserves all data in a list of JSON object and returns the same JSON.
I’m trying to access that JSON object via Postman call and ultimately in IIQ as WebService connector. In this scenario, initially I’m trying to access the same data via Postman. In postman I get status code 200 but the response body prints empty JSON object.
If JSON response prints as needed in Postman, I can then configure IIQ connector.
Perhaps your JSON response is empty because there are no user results found in the database. You should work with the application administrators which own the database and the webservice to troubleshoot the reason for the empty response.
Database table contains the users. The logging statements from rest service shows that there is a JSON object created per user and all those JSON objects are added to the list during iteration, this list in then put in another JSON. The JSON is then returned from the service.
@sameertawargeri,
I hope all is well with you! I wanted to check in on your progress here. Were you able to reach out to the application owners and get some support/insight for the empty response you were receiving?
Thanks for checking back @jordan.violet.
I checked with them and they had all the details in the table but I was not able to access the data via Postman. So I took a step back and implemented a custom rest service to return a JSON object. I tried to access this via Postman, it returns empty JSON even though return code is 200. I realized there is something with the rest class returning empty JSON. I checked with List/String as return statements and they work fine.
I’m still trying to understand what I’m missing in the rest class.
Rest service class has a Path, method also has GET,Path,Produces annotation which returns JSON. What else is required? Any JSON jar that is to be placed in IIQ library?
@sameertawargeri, It looks like your issue may need a more in-depth resolution that includes diving into your code and taking a closer look at your unique environment. In terms of next steps, you may wish to reach out to the Profession Services Team Professional Services | SailPoint for next steps and further investigation.
I hope this helps and best of luck on resolving this issue!