adding rest API