- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Date
- Try it!
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 |
The resource name of the domain whose traffic statistics we'd like to list. It should have the form |
Query parameters
Parameters | |
---|---|
startDate |
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 |
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 |
Requested page size. Server may return fewer TrafficStats than requested. If unspecified, server will pick an appropriate default. |
pageToken |
The nextPageToken value returned from a previous List request, if any. This is the value of |
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 ( |
Fields | |
---|---|
trafficStats[] |
The list of TrafficStats. |
nextPageToken |
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:
google.type.TimeOfDay
google.type.DateTime
google.protobuf.Timestamp
JSON representation |
---|
{ "year": integer, "month": integer, "day": integer } |
Fields | |
---|---|
year |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
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. |