updated api to support 'get' endpoint