REst api fixed