examples of using the rest api