connect to restAPI, insert data