Changed json to request mapping.
Fixed totalPages value.