example how to use the API