rest api returns proper object