Close httplib2 connections.
query(parent, body=None, x__xgafv=None)
Retrieves a list of domain statistics for a given domain and time period. Returns statistics only for dates where data is available. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for the domain.
Retrieves the next page of results.
close()
Close httplib2 connections.
query(parent, body=None, x__xgafv=None)
Retrieves a list of domain statistics for a given domain and time period. Returns statistics only for dates where data is available. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for the domain.
Args:
parent: string, Required. The parent resource name where the stats are queried. Format: domains/{domain} (required)
body: object, The request body.
The object takes the form of:
{ # Request message for QueryDomainStats.
"aggregationGranularity": "A String", # Optional. The granularity at which to aggregate the statistics. If unspecified, defaults to DAILY.
"metricDefinitions": [ # Required. The specific metrics to query. You can define a custom name for each metric, which will be used in the response.
{ # Defines a specific metric to query, including a user-defined name, the base metric type, and optional filters.
"baseMetric": { # Specifies the base metric to query, which can be a predefined standard metric or a user-defined custom metric (if supported in the future). # Required. The underlying metric to query.
"standardMetric": "A String", # A predefined standard metric.
},
"filter": "A String", # Optional. Optional filters to apply to the metric.
"name": "A String", # Required. The user-defined name for this metric. This name will be used as the key for this metric's value in the response.
},
],
"pageSize": 42, # Optional. The maximum number of DomainStats resources to return in the response. The server may return fewer than this value. If unspecified, a default value of 10 will be used. The maximum value is 200.
"pageToken": "A String", # Optional. The next_page_token value returned from a previous List request, if any. If the aggregation granularity is DAILY, the page token will be the encoded date + "/" + metric name. If the aggregation granularity is OVERALL, the page token will be the encoded metric name.
"parent": "A String", # Required. The parent resource name where the stats are queried. Format: domains/{domain}
"timeQuery": { # The date ranges or specific dates for which you want to retrieve data. # Required. The time range or specific dates for which to retrieve the metrics.
"dateList": { # A set of specific dates. # A list of specific dates.
"dates": [ # Required. The list of specific dates for which to retrieve data.
{ # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
],
},
"dateRanges": { # A set of date ranges. # A list of date ranges.
"dateRanges": [ # Required. The list of date ranges for which to retrieve data.
{ # A single date range defined by a start and end date.
"end": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The inclusive end date of the date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"start": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The inclusive start date of the date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
],
},
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for QueryDomainStats.
"domainStats": [ # The list of domain statistics. Each DomainStat object contains the value for a metric requested in the QueryDomainStatsRequest.
{ # Email statistics for a domain for a specified time period or date.
"date": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Optional. The specific date for these stats, if granularity is DAILY. This field is populated if the QueryDomainStatsRequest specified a DAILY aggregation granularity.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"metric": "A String", # The user-defined name from MetricDefinition.name in the request, used to correlate this result with the requested metric.
"name": "A String", # Output only. The resource name of the DomainStat resource. Format: domains/{domain}/domainStats/{domain_stat} The `{domain_stat}` segment is an opaque, server-generated ID. We recommend using the `metric` field to identify queried metrics instead of parsing the name.
"value": { # The actual value of a statistic. # The value of the corresponding metric.
"doubleValue": 3.14, # Double value.
"floatValue": 3.14, # Float value.
"intValue": "A String", # Integer value.
"stringList": { # Represents a list of strings. # List of string values.
"values": [ # The string values.
"A String",
],
},
"stringValue": "A String", # String value.
},
},
],
"nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
}
query_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.