Improved api endpoint with field support.