an bash example of calling an API and store result in CSV