Welcome to the Community!
Unfortunately, the Management API’s GET/api/v2/stats/active-users endpoint does not allow you to query by connection. However, you can use the GET/api/v2/users endpoint with the
connection query parameter to find this data:
You can then filter the returned list of users to see how many of the users have logged in during the last 30 days.
To make Management API requests, you’ll need to retrieve an Access Token, which you can read about here: Management API Access Tokens