duo_client_python icon indicating copy to clipboard operation
duo_client_python copied to clipboard

add get auth summary endpoint to the admin object

Open ClovisIRex opened this issue 1 year ago • 1 comments
trafficstars

Detailed Description

there is an auth summary page in the app that provides general summary of all denied/granted requests across a time range. the API endpoint is /reports/auth-summary. it seems it does not exist in the client nor in the documentation.

Use Case

We need that data in order to produce automated reports with a in-house tool. instead of gathering 100's of thousands or even millions of data from other endpoints and summating it we would rather use that endpoint

Workarounds

Im trying to extend the Admin class with a method but getting 301 moved permanently error code:

from duo_client import Admin

class Extended_duo_client(Admin):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def get_auth_summary(self):
        params = {}
        response = self.json_api_call(
            'GET',
            '/reports/auth-summary',
            params
        ) 

        return response

ClovisIRex avatar Jun 13 '24 13:06 ClovisIRex

@ClovisIRex The /reports URL accessible via the Duo Admin Panel does not exist as an API endpoint. Making the /reports/auth-summary information available via the API would be new/expanded functionality.

MarkTripod-Duo avatar Aug 30 '24 14:08 MarkTripod-Duo