CC-5733: RESTful API data sanitization and validation

Renamed sanitize function to sanitizeResponse