added api sanitization for preventing attack to api