Usage
The Usage portion of the MGP_SDK provides an interface for usage methods.
Getting Started:
from MGP_SDK.interface import Interface
interface = Interface()
Package methods
Get Account Usage
get_account_usage()
Retrieves the usage on an account
Returns: Dictionary of usage on an account
Kwargs:
- page (int): Starting page. First page is page 0
- pageSize (int): Number of items returned per page
- sortBy (string): Sorting arrangement. Available options are:
idaccountNumbersapLicenseIdlicenseesoldTototalCreditsUsednumberOfActivationsnumberOfUsers
Get Activation Usage
get_activation_usage()
Retrieves the usage on an activation
Returns: Dictionary of usage on an activation
Kwargs:
- page (int): Starting page. First page is page 0
- pageSize (int): Number of items returned per page
- sortBy (string): Sorting arrangement. Available options are:
idactivationNumbersapContractIdentifiersapLineItemstartDateendDatecreditLimittotalCreditsUsedcreditsUsedPercentagenumberOfUserstotalUsersaccountTotalUsersaccountNameaccountNumberaccountSapLicenseIdaccountLicenseeaccountSoldTouserLimitdailyCreditLimitTotaldailyCreditLimitUsed
Get User Usage
get_user_usage()
Retrieves the usage for a user
Returns:
Kwargs:
- page (int): Starting page. First page is page 0
- pageSize (int): Number of items returned per page
- sortBy (string): Sorting arrangement. Available options are:
idusernameaccountIdactivationNumberaccountNumberaccountSapLicenseIdaccountLicenseeaccountSoldTototalCreditsUseddailyCreditLimitTotaldailyCreditLimitUseduserType