Correcting the rest apis