If by active, you mean having recent event activity. The simplest way is to open System Properties > Device Summary Reports > View Reports > Event Time. You need to be admin to access this report. It would be nice to have an email option, but it doesn't exist today. Recommend submitting an idea to be considered.
With the API, you should be able to list all of the data sources, but determining if they are active or not would be a little more challenging.