Adding rest API