AppMonetization / Client / get_app_usage_summary

get_app_usage_summary

AppMonetization.Client.get_app_usage_summary(**kwargs)

Returns usage for an app, grouped by metric (the default), user, or time.

See also: AWS API Documentation

Request Syntax

response = client.get_app_usage_summary(
    appId='string',
    startedAt=datetime(2015, 1, 1),
    endedAt=datetime(2015, 1, 1),
    groupBy='METRIC'|'USER'|'TIME',
    filterBy={
        'string': [
            'string',
        ]
    },
    scope='sandbox'|'live'
)
Parameters:
  • appId (string) –

    [REQUIRED]

    The ID of the app.

  • startedAt (datetime) –

    [REQUIRED]

    Start of the reporting window.

  • endedAt (datetime) –

    [REQUIRED]

    End of the reporting window. Must be after startedAt, at most 720 hours after it, and not in the future.

  • groupBy (string) – The breakdown dimension. Defaults to METRIC when omitted.

  • filterBy (dict) –

    Filter constraints keyed by dimension. A filter dimension may differ from groupBy.

    • (string) –

      Dimensions GetAppUsageSummary can group and filter by. TIME groups by UTC day.

      • (list) –

        A list of filter values for a single dimension.

        • (string) –

          Literal filter value, 1-256 characters.

  • scope (string) –

    [REQUIRED]

    Required. The environment: live or sandbox.

Return type:

dict

Returns:

Response Syntax

{
    'appId': 'string',
    'groupBy': 'METRIC'|'USER'|'TIME',
    'totalEvents': 123,
    'groups': [
        {
            'key': 'string',
            'metricName': 'string',
            'usage': 123
        },
    ],
    'startedAt': datetime(2015, 1, 1),
    'endedAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Output for GetAppUsageSummary.

    • appId (string) –

      The ID of the app.

    • groupBy (string) –

      The dimension that the summary is grouped by.

    • totalEvents (integer) –

      The total number of usage events counted across the window.

    • groups (list) –

      One row per value of the groupBy dimension (usage per metric, user, or UTC day).

      • (dict) –

        A usage total for a single value of the groupBy dimension.

        • key (string) –

          The value of the groupBy dimension for this row.

        • metricName (string) –

          The name of the metric, when the summary is grouped by metric.

        • usage (integer) –

          The number of usage events in this group.

    • startedAt (datetime) –

      Start of the reporting window the summary covers.

    • endedAt (datetime) –

      End of the reporting window the summary covers.

    • updatedAt (datetime) –

      The time the summary was last updated.

Exceptions