add rest api
test script