An alternative to using a custom plugin would be to write a Data Explorer query that returns the information you’re looking for. You could then make API requests to run the query: Run Data Explorer queries with the Discourse API.
4 Likes