added json dtos and refined functionality for rest requests