It already is in the API, there’s a dedicated endpoint for that:
https://api.twitch.tv/v5/channels/[CHANNEL_ID]/analytics/sessions_summary?[PARAMETERS]
But if you try to call it, it says something like “this endpoint is not open for third party applications”.
So basically, for them, making that available is probably just removing one line of code…