Currently, no matter what you do, during the login process you always get an HTML response. That's nice if you have a browser, or render the pages directly, but if you are working from an app, this is not exactly the best way to handle things, especially of you do a two factor authentication.
Development team from a customer ask if it would be possible to get a JSON response instead of HTML. They do 2FA, and have implemented it by parsing the HTML responses. Any change in the pages may break their app.
Since NAM should be able tu support mobile apps, an option to return JSON instead of the standard html pages would help a lot.
I think it might be possible to do it now also. Have you considered creating custom JSP login page, that would return JSON instead of HTML?
So build custom login page as described here https://www.netiq.com/documentation/access-manager-45/admin/data/b1caoduo.html#bmqx7ht and set MainJSP to true?