| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="gmailpostmastertools_v2.html">Gmail Postmaster Tools API</a> . <a href="gmailpostmastertools_v2.domainStats.html">domainStats</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#batchQuery">batchQuery(body=None, x__xgafv=None)</a></code></p> |
| 79 |
<p class="firstline">Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for any of the requested domains.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#close">close()</a></code></p> |
| 82 |
<p class="firstline">Close httplib2 connections.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="batchQuery">batchQuery(body=None, x__xgafv=None)</code> |
| 86 |
<pre>Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for any of the requested domains. |
| 87 |
|
| 88 |
Args: |
| 89 |
body: object, The request body. |
| 90 |
The object takes the form of: |
| 91 |
|
| 92 |
{ # Request message for BatchQueryDomainStats. |
| 93 |
"requests": [ # Required. A list of individual query requests. Each request can be for a different domain. A maximum of 100 requests can be included in a single batch. |
| 94 |
{ # Request message for QueryDomainStats. |
| 95 |
"aggregationGranularity": "A String", # Optional. The granularity at which to aggregate the statistics. If unspecified, defaults to DAILY. |
| 96 |
"metricDefinitions": [ # Required. The specific metrics to query. You can define a custom name for each metric, which will be used in the response. |
| 97 |
{ # Defines a specific metric to query, including a user-defined name, the base metric type, and optional filters. |
| 98 |
"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. |
| 99 |
"standardMetric": "A String", # A predefined standard metric. |
| 100 |
}, |
| 101 |
"filter": "A String", # Optional. Optional filters to apply to the metric. |
| 102 |
"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. |
| 103 |
}, |
| 104 |
], |
| 105 |
"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. |
| 106 |
"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. |
| 107 |
"parent": "A String", # Required. The parent resource name where the stats are queried. Format: domains/{domain} |
| 108 |
"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. |
| 109 |
"dateList": { # A set of specific dates. # A list of specific dates. |
| 110 |
"dates": [ # Required. The list of specific dates for which to retrieve data. |
| 111 |
{ # 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 |
| 112 |
"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. |
| 113 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 114 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 115 |
}, |
| 116 |
], |
| 117 |
}, |
| 118 |
"dateRanges": { # A set of date ranges. # A list of date ranges. |
| 119 |
"dateRanges": [ # Required. The list of date ranges for which to retrieve data. |
| 120 |
{ # A single date range defined by a start and end date. |
| 121 |
"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. |
| 122 |
"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. |
| 123 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 124 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 125 |
}, |
| 126 |
"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. |
| 127 |
"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. |
| 128 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 129 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 130 |
}, |
| 131 |
}, |
| 132 |
], |
| 133 |
}, |
| 134 |
}, |
| 135 |
}, |
| 136 |
], |
| 137 |
} |
| 138 |
|
| 139 |
x__xgafv: string, V1 error format. |
| 140 |
Allowed values |
| 141 |
1 - v1 error format |
| 142 |
2 - v2 error format |
| 143 |
|
| 144 |
Returns: |
| 145 |
An object of the form: |
| 146 |
|
| 147 |
{ # Response message for BatchQueryDomainStats. |
| 148 |
"results": [ # A list of responses, one for each query in the BatchQueryDomainStatsRequest. The order of responses will correspond to the order of requests. |
| 149 |
{ # Represents the result of a single QueryDomainStatsRequest within a batch. |
| 150 |
"error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error status if the individual query failed. |
| 151 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 152 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 153 |
{ |
| 154 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 155 |
}, |
| 156 |
], |
| 157 |
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
| 158 |
}, |
| 159 |
"response": { # Response message for QueryDomainStats. # The successful response for the individual query. |
| 160 |
"domainStats": [ # The list of domain statistics. Each DomainStat object contains the value for a metric requested in the QueryDomainStatsRequest. |
| 161 |
{ # Email statistics for a domain for a specified time period or date. |
| 162 |
"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. |
| 163 |
"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. |
| 164 |
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 165 |
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 166 |
}, |
| 167 |
"metric": "A String", # The user-defined name from MetricDefinition.name in the request, used to correlate this result with the requested metric. |
| 168 |
"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. |
| 169 |
"value": { # The actual value of a statistic. # The value of the corresponding metric. |
| 170 |
"doubleValue": 3.14, # Double value. |
| 171 |
"floatValue": 3.14, # Float value. |
| 172 |
"intValue": "A String", # Integer value. |
| 173 |
"stringList": { # Represents a list of strings. # List of string values. |
| 174 |
"values": [ # The string values. |
| 175 |
"A String", |
| 176 |
], |
| 177 |
}, |
| 178 |
"stringValue": "A String", # String value. |
| 179 |
}, |
| 180 |
}, |
| 181 |
], |
| 182 |
"nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list. |
| 183 |
}, |
| 184 |
}, |
| 185 |
], |
| 186 |
}</pre> |
| 187 |
</div> |
| 188 |
|
| 189 |
<div class="method"> |
| 190 |
<code class="details" id="close">close()</code> |
| 191 |
<pre>Close httplib2 connections.</pre> |
| 192 |
</div> |
| 193 |
|
| 194 |
</body></html> |