setup rest API