blob: 263d286c0c34f17ef7ddb8e1859726214ea5d223 [file] [log] [blame] [edit]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="gmailpostmastertools_v2.html">Gmail Postmaster Tools API</a> . <a href="gmailpostmastertools_v2.domainStats.html">domainStats</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#batchQuery">batchQuery(body=None, x__xgafv=None)</a></code></p>
<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>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="batchQuery">batchQuery(body=None, x__xgafv=None)</code>
<pre>Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don&#x27;t have permission to access DomainStats for any of the requested domains.
Args:
body: object, The request body.
The object takes the form of:
{ # Request message for BatchQueryDomainStats.
&quot;requests&quot;: [ # 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.
{ # Request message for QueryDomainStats.
&quot;aggregationGranularity&quot;: &quot;A String&quot;, # Optional. The granularity at which to aggregate the statistics. If unspecified, defaults to DAILY.
&quot;metricDefinitions&quot;: [ # 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.
&quot;baseMetric&quot;: { # 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.
&quot;standardMetric&quot;: &quot;A String&quot;, # A predefined standard metric.
},
&quot;filter&quot;: &quot;A String&quot;, # Optional. Optional filters to apply to the metric.
&quot;name&quot;: &quot;A String&quot;, # Required. The user-defined name for this metric. This name will be used as the key for this metric&#x27;s value in the response.
},
],
&quot;pageSize&quot;: 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.
&quot;pageToken&quot;: &quot;A String&quot;, # 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 + &quot;/&quot; + metric name. If the aggregation granularity is OVERALL, the page token will be the encoded metric name.
&quot;parent&quot;: &quot;A String&quot;, # Required. The parent resource name where the stats are queried. Format: domains/{domain}
&quot;timeQuery&quot;: { # 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.
&quot;dateList&quot;: { # A set of specific dates. # A list of specific dates.
&quot;dates&quot;: [ # 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
&quot;day&quot;: 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&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
],
},
&quot;dateRanges&quot;: { # A set of date ranges. # A list of date ranges.
&quot;dateRanges&quot;: [ # Required. The list of date ranges for which to retrieve data.
{ # A single date range defined by a start and end date.
&quot;end&quot;: { # 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.
&quot;day&quot;: 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&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
&quot;start&quot;: { # 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.
&quot;day&quot;: 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&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 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 BatchQueryDomainStats.
&quot;results&quot;: [ # A list of responses, one for each query in the BatchQueryDomainStatsRequest. The order of responses will correspond to the order of requests.
{ # Represents the result of a single QueryDomainStatsRequest within a batch.
&quot;error&quot;: { # 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.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # 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.
},
&quot;response&quot;: { # Response message for QueryDomainStats. # The successful response for the individual query.
&quot;domainStats&quot;: [ # 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.
&quot;date&quot;: { # 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.
&quot;day&quot;: 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&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
&quot;metric&quot;: &quot;A String&quot;, # The user-defined name from MetricDefinition.name in the request, used to correlate this result with the requested metric.
&quot;name&quot;: &quot;A String&quot;, # 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.
&quot;value&quot;: { # The actual value of a statistic. # The value of the corresponding metric.
&quot;doubleValue&quot;: 3.14, # Double value.
&quot;floatValue&quot;: 3.14, # Float value.
&quot;intValue&quot;: &quot;A String&quot;, # Integer value.
&quot;stringList&quot;: { # Represents a list of strings. # List of string values.
&quot;values&quot;: [ # The string values.
&quot;A String&quot;,
],
},
&quot;stringValue&quot;: &quot;A String&quot;, # String value.
},
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
},
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
</body></html>