add example for rest api