rest api usage