adding rest api