Matomo rescue and re-build

Hi All!

I am trying to take a 3.14 Matomo database and extract all visits per URL.

We have thousands of URLs (identified with a UUID) and an earlier development project left the database in a questionable state.

We have cleanly updated it, however: PHP versions, codebase and database schema. On the surface everything looks good.

I’m wondering how I might programmatically retrieve all stats for all unique IDs. I’ve been thinking via SQL queries direct to the database, as we have a list of all our unique IDs.

Originally we were doing this via API calls. However, typically, once we got around to attempting this those API calls stopped returning results!

I’m investigating further but I’m wondering if there’s a more direct way of getting these results? We want to create a BASELINE_VISIT and BASELINE_DOWNLOAD stats within our application, and then re-install a clean Matomo v4.0 to start afresh.

All the best, glad to be here and happy new year!