Oh yeah, I should've clarified, I mean via a REST API. I thought about building an app for myself to do what I wanted to do, but it's frustrating that I can't just set up a Cron on my homelab to pull my data.
Unless I'm missing something and HealthKit does provide this.