B `-@sGdddeZdS)cs:eZdZfddZd edddZeddd ZZS) APIUsagecstt|||_dS)N)superr__init___session)selfsession) __class__r/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/api/api_usage.pyrszAPIUsage.__init__next)organizationIdc sh|tdgdd}d|d}dddd d d d d dddg fdd|D}|j|||||S)a **List the API requests made by an organization** https://developer.cisco.com/meraki/api/#!get-organization-api-requests - organizationId (string) - total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 31 days. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 50. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - adminId (string): Filter the results by the ID of the admin who made the API requests - path (string): Filter the results by the path of the API requests - method (string): Filter the results by the method of the API requests (must be 'GET', 'PUT', 'POST' or 'DELETE') - responseCode (integer): Filter the results by the response code of the API requests - sourceIp (string): Filter the results by the IP address of the originating API request z API usagegetOrganizationApiRequests)tags operationz/organizations/z /apiRequestst0t1timespanZperPageZ startingAfterZ endingBeforeZadminIdpathmethodZ responseCodeZsourceIpcs&i|]\}}|kr||qSr)strip).0kv) query_paramsrr $sz7APIUsage.getOrganizationApiRequests..)updatelocalsitemsrZ get_pages)rr Z total_pages directionkwargsmetadataresourceparamsr)rr r s  z#APIUsage.getOrganizationApiRequestsc sT|tdgdd}d|d}dddgfd d |D}|j|||S) a **Return an aggregated overview of API requests data** https://developer.cisco.com/meraki/api/#!get-organization-api-requests-overview - organizationId (string) - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 31 days. z API usage"getOrganizationApiRequestsOverview)rrz/organizations/z/apiRequests/overviewrrrcs&i|]\}}|kr||qSr)r)rrr)rrr r=sz?APIUsage.getOrganizationApiRequestsOverview..)rrrrget)rr rr r!r"r)rr r#)s   z+APIUsage.getOrganizationApiRequestsOverview)r r )__name__ __module__ __qualname__rstrr r# __classcell__rr)rr rs #rN)objectrrrrr