Jira bulk data via API or export

I’m looking for a way to obtain a bulk dataset of Jira tickets (containing various pieces of information about each ticket) at the organization I’m a contractor for, either by pressing a button to export it all or by querying an API. What’s the best way to do this?

The motivation is that we want to do analytics related to how Jira is being used.

Thanks,
Zachary Goldstein
zachary.goldstein@bluelabs.com