Method: domains.trafficStats.list

List traffic statistics for all available days. Returns PERMISSION_DENIED if user does not have permission to access TrafficStats for the domain.

HTTP request

GET https://gmailpostmastertools.googleapis.com/v1/{parent=domains/*}/trafficStats

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
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.

Query parameters

Parameters
startDate

object (Date)

The earliest day of the metrics to retrieve inclusive. startDate and endDate must both be specified or both left unspecified. If only one is specified, or endDate is earlier in time than startDate, then INVALID_ARGUMENT is returned.

endDate

object (Date)

The most recent day of the metrics to retrieve exclusive. startDate and endDate must both be specified or both left unspecified. If only one is specified, or endDate is earlier in time than startDate, then INVALID_ARGUMENT is returned.

pageSize

integer

Requested page size. Server may return fewer TrafficStats than requested. If unspecified, server will pick an appropriate default.

pageToken

string

The nextPageToken value returned from a previous List request, if any. This is the value of ListTrafficStatsResponse.next_page_token returned from the previous call to trafficStats.list method.

Request body

The request body must be empty.

Response body

Response message for trafficStats.list.

If successful, the response body contains data with the following structure:

JSON representation
{
  "trafficStats": [
    {
      object (TrafficStats)
    }
  ],
  "nextPageToken": string
}
Fields
trafficStats[]

object (TrafficStats)

The list of TrafficStats.

nextPageToken

string

Token to retrieve the next page of results, or empty if there are no more results in the list.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/postmaster.readonly

For more information, see the Authorization guide.

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:

JSON representation
{
  "year": integer,
  "month": integer,
  "day": integer
}
Fields
year

integer

Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

month

integer

Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

day

integer

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.