Just a thought, not the exact answer to your question:
Do you know you can get detailed info on published rest services using the /rest-doc/ url?
https://docs.mendix.com/refguide/published-rest-service
It includes example response jsons.