Exporting data to csv with API?

Hi,
Today I came across that the data from data source in every chart of the dashboard can be exported to CSV. Just wondering is there an API call to take the data?