register rest api