added example for rest API