Gmail Postmaster Tools API . domains . trafficStats

Instance Methods

get(name, x__xgafv=None)

Get traffic statistics for a domain on a specific date.

list(parent, startDate_month=None, startDate_day=None, pageSize=None, pageToken=None, startDate_year=None, endDate_day=None, endDate_year=None, endDate_month=None, x__xgafv=None)

List traffic statistics for all available days.

list_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

get(name, x__xgafv=None)
Get traffic statistics for a domain on a specific date.
Returns PERMISSION_DENIED if user does not have permission to access
TrafficStats for the domain.

Args:
  name: string, The resource name of the traffic statistics to get.
E.g., domains/mymail.mydomain.com/trafficStats/20160807. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Email traffic statistics pertaining to a specific date.
    "outboundEncryptionRatio": 3.14, # The ratio of outgoing mail (from Gmail) that was accepted over secure
        # transport (TLS).
    "spfSuccessRatio": 3.14, # The ratio of mail that successfully authenticated with SPF vs. all mail
        # that attempted to authenticate with [SPF](http://www.openspf.org/). Spoofed
        # mail is excluded.
    "name": "A String", # The resource name of the traffic statistics. Traffic statistic names have
        # the form `domains/{domain}/trafficStats/{date}`, where
        # domain_name is the fully qualified domain name (i.e.,  mymail.mydomain.com)
        # of the domain this traffic statistics pertains to and date is the date in
        # yyyymmdd format that these statistics corresponds to.
        # For example: domains/mymail.mydomain.com/trafficStats/20160807
    "domainReputation": "A String", # Reputation of the domain.
    "dkimSuccessRatio": 3.14, # The ratio of mail that successfully authenticated with DKIM vs. all mail
        # that attempted to authenticate with [DKIM](http://www.dkim.org/). Spoofed
        # mail is excluded.
    "dmarcSuccessRatio": 3.14, # The ratio of mail that passed [DMARC](https://dmarc.org/) alignment checks
        # vs all mail received from the domain that successfully authenticated with
        # either of [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
    "deliveryErrors": [ # Delivery errors for the domain. This metric only pertains to traffic that
        # passed [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
      { # Metric on a particular delivery error type.
        "errorClass": "A String", # The class of delivery error.
        "errorType": "A String", # The type of delivery error.
        "errorRatio": 3.14, # The ratio of messages where the error occurred vs all authenticated
            # traffic.
      },
    ],
    "userReportedSpamRatio": 3.14, # The ratio of user-report spam vs. email that was sent to the inbox. This
        # metric only pertains to emails authenticated by
        # [DKIM](http://www.dkim.org/).
    "spammyFeedbackLoops": [ # Spammy [Feedback loop identifiers]
        # (https://support.google.com/mail/answer/6254652) with their individual spam
        # rates. This metric only pertains to traffic that is authenticated by
        # [DKIM](http://www.dkim.org/).
      { # [Feedback loop](https://support.google.com/mail/answer/6254652) identifier
          # information.
        "spamRatio": 3.14, # The ratio of user marked spam messages with the identifier vs the total
            # number of inboxed messages with that identifier.
        "id": "A String", # Feedback loop identifier that uniquely identifies individual campaigns.
      },
    ],
    "ipReputations": [ # Reputation information pertaining to the IP addresses of the email servers
        # for the domain. There is exactly one entry for each reputation category
        # except
        # REPUTATION_CATEGORY_UNSPECIFIED.
      { # IP Reputation information for a set of IPs in a specific reputation category.
        "numIps": "A String", # Total number of unique IPs in this reputation category. This metric only
            # pertains to traffic that passed [SPF](http://www.openspf.org/) or
            # [DKIM](http://www.dkim.org/).
        "reputation": "A String", # The reputation category this IP reputation represents.
        "sampleIps": [ # A sample of IPs in this reputation category.
          "A String",
        ],
      },
    ],
    "inboundEncryptionRatio": 3.14, # The ratio of incoming mail (to Gmail), that passed secure transport (TLS)
        # vs all mail received from that domain. This metric only pertains to traffic
        # that passed [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
  }
list(parent, startDate_month=None, startDate_day=None, pageSize=None, pageToken=None, startDate_year=None, endDate_day=None, endDate_year=None, endDate_month=None, x__xgafv=None)
List traffic statistics for all available days.
Returns PERMISSION_DENIED if user does not have permission to access
TrafficStats for the domain.

Args:
  parent: string, The resource name of the domain whose traffic statistics we'd like to list.
It should have the form `domains/{domain_name}`, where domain_name is
the fully qualified domain name. (required)
  startDate_month: integer, Month of year. Must be from 1 to 12, or 0 if specifying a year without a
month and day.
  startDate_day: integer, Day of month. Must be from 1 to 31 and valid for the year and month, or 0
if specifying a year by itself or a year and month where the day is not
significant.
  pageSize: integer, Requested page size. Server may return fewer TrafficStats than
requested. If unspecified, server will pick an appropriate default.
  pageToken: string, The next_page_token value returned from a previous List request, if any.
This is the value of
ListTrafficStatsResponse.next_page_token
returned from the previous call to `ListTrafficStats` method.
  startDate_year: integer, Year of date. Must be from 1 to 9999, or 0 if specifying a date without
a year.
  endDate_day: integer, Day of month. Must be from 1 to 31 and valid for the year and month, or 0
if specifying a year by itself or a year and month where the day is not
significant.
  endDate_year: integer, Year of date. Must be from 1 to 9999, or 0 if specifying a date without
a year.
  endDate_month: integer, Month of year. Must be from 1 to 12, or 0 if specifying a year without a
month and day.
  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 ListTrafficStats.
    "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
        # more results in the list.
    "trafficStats": [ # The list of TrafficStats.
      { # Email traffic statistics pertaining to a specific date.
        "outboundEncryptionRatio": 3.14, # The ratio of outgoing mail (from Gmail) that was accepted over secure
            # transport (TLS).
        "spfSuccessRatio": 3.14, # The ratio of mail that successfully authenticated with SPF vs. all mail
            # that attempted to authenticate with [SPF](http://www.openspf.org/). Spoofed
            # mail is excluded.
        "name": "A String", # The resource name of the traffic statistics. Traffic statistic names have
            # the form `domains/{domain}/trafficStats/{date}`, where
            # domain_name is the fully qualified domain name (i.e.,  mymail.mydomain.com)
            # of the domain this traffic statistics pertains to and date is the date in
            # yyyymmdd format that these statistics corresponds to.
            # For example: domains/mymail.mydomain.com/trafficStats/20160807
        "domainReputation": "A String", # Reputation of the domain.
        "dkimSuccessRatio": 3.14, # The ratio of mail that successfully authenticated with DKIM vs. all mail
            # that attempted to authenticate with [DKIM](http://www.dkim.org/). Spoofed
            # mail is excluded.
        "dmarcSuccessRatio": 3.14, # The ratio of mail that passed [DMARC](https://dmarc.org/) alignment checks
            # vs all mail received from the domain that successfully authenticated with
            # either of [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
        "deliveryErrors": [ # Delivery errors for the domain. This metric only pertains to traffic that
            # passed [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
          { # Metric on a particular delivery error type.
            "errorClass": "A String", # The class of delivery error.
            "errorType": "A String", # The type of delivery error.
            "errorRatio": 3.14, # The ratio of messages where the error occurred vs all authenticated
                # traffic.
          },
        ],
        "userReportedSpamRatio": 3.14, # The ratio of user-report spam vs. email that was sent to the inbox. This
            # metric only pertains to emails authenticated by
            # [DKIM](http://www.dkim.org/).
        "spammyFeedbackLoops": [ # Spammy [Feedback loop identifiers]
            # (https://support.google.com/mail/answer/6254652) with their individual spam
            # rates. This metric only pertains to traffic that is authenticated by
            # [DKIM](http://www.dkim.org/).
          { # [Feedback loop](https://support.google.com/mail/answer/6254652) identifier
              # information.
            "spamRatio": 3.14, # The ratio of user marked spam messages with the identifier vs the total
                # number of inboxed messages with that identifier.
            "id": "A String", # Feedback loop identifier that uniquely identifies individual campaigns.
          },
        ],
        "ipReputations": [ # Reputation information pertaining to the IP addresses of the email servers
            # for the domain. There is exactly one entry for each reputation category
            # except
            # REPUTATION_CATEGORY_UNSPECIFIED.
          { # IP Reputation information for a set of IPs in a specific reputation category.
            "numIps": "A String", # Total number of unique IPs in this reputation category. This metric only
                # pertains to traffic that passed [SPF](http://www.openspf.org/) or
                # [DKIM](http://www.dkim.org/).
            "reputation": "A String", # The reputation category this IP reputation represents.
            "sampleIps": [ # A sample of IPs in this reputation category.
              "A String",
            ],
          },
        ],
        "inboundEncryptionRatio": 3.14, # The ratio of incoming mail (to Gmail), that passed secure transport (TLS)
            # vs all mail received from that domain. This metric only pertains to traffic
            # that passed [SPF](http://www.openspf.org/) or [DKIM](http://www.dkim.org/).
      },
    ],
  }
list_next(previous_request, previous_response)
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.