Gmail Postmaster Tools API . domains

Instance Methods

domainStats()

Returns the domainStats Resource.

users()

Returns the users Resource.

close()

Close httplib2 connections.

create(body=None, x__xgafv=None)

[Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user.

delete(name, x__xgafv=None)

[Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account. Returns NOT_FOUND if the domain is not registered by the user.

get(name, x__xgafv=None)

Retrieves detailed information about a domain registered by you. Returns NOT_FOUND if the domain is not registered by you. Domain represents the metadata of a domain that has been registered within the system and linked to a user.

getComplianceStatus(name, x__xgafv=None)

Retrieves the compliance status for a given domain. Returns PERMISSION_DENIED if you don't have permission to access compliance status for the domain.

getVerificationToken(name, verificationMethod=None, x__xgafv=None)

[Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain.

list(pageSize=None, pageToken=None, x__xgafv=None)

Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list.

list_next()

Retrieves the next page of results.

verify(name, body=None, x__xgafv=None)

[Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level. Note that this is distinct from checking if the user has OWNER status within IRDB.

Method Details

close()
Close httplib2 connections.
create(body=None, x__xgafv=None)
[Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user.

Args:
  body: object, The request body.
    The object takes the form of:

{ # [Developer Preview](https://developers.google.com/workspace/preview): Request message for CreateDomain.
  "domainId": "A String", # Required. The domain to add. e.g., "example.com"
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Information about a domain registered by the user.
  "createTime": "A String", # Output only. Immutable. The timestamp at which the domain was added to the user's account.
  "lastVerifyTime": "A String", # The timestamp at which the domain was last verified by the user.
  "name": "A String", # Identifier. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com).
  "permission": "A String", # Output only. User's permission of this domain.
  "verificationState": "A String", # Output only. Information about a user's verification history and properties for the domain.
}
delete(name, x__xgafv=None)
[Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account. Returns NOT_FOUND if the domain is not registered by the user.

Args:
  name: string, Required. The domain to delete. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Retrieves detailed information about a domain registered by you. Returns NOT_FOUND if the domain is not registered by you. Domain represents the metadata of a domain that has been registered within the system and linked to a user.

Args:
  name: string, Required. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com). (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Information about a domain registered by the user.
  "createTime": "A String", # Output only. Immutable. The timestamp at which the domain was added to the user's account.
  "lastVerifyTime": "A String", # The timestamp at which the domain was last verified by the user.
  "name": "A String", # Identifier. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com).
  "permission": "A String", # Output only. User's permission of this domain.
  "verificationState": "A String", # Output only. Information about a user's verification history and properties for the domain.
}
getComplianceStatus(name, x__xgafv=None)
Retrieves the compliance status for a given domain. Returns PERMISSION_DENIED if you don't have permission to access compliance status for the domain.

Args:
  name: string, Required. The resource name of the domain's compliance status to retrieve. Format: `domains/{domain_id}/complianceStatus`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Compliance status for a domain.
  "complianceData": { # Compliance data for a given domain. # Compliance data for the registrable domain part of the domain in `name`. For example, if `name` is `domains/example.com/complianceStatus`, this field contains compliance data for `example.com`.
    "deliverabilityStatusVerdict": { # [Developer Preview](https://developers.google.com/workspace/preview): Verdict of domain deliverability status. # Output only. Deliverability status verdict.
      "reason": "A String", # Output only. The specific reason for the compliance verdict.
      "state": { # The status of a sender compliance requirement. # Output only. The compliance state.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "domainId": "A String", # Domain that this data is for.
    "honorUnsubscribeVerdict": { # Compliance verdict for whether a sender meets the unsubscribe honoring compliance requirement. # Unsubscribe honoring compliance verdict.
      "reason": "A String", # The specific reason for the compliance verdict. Must be empty if the status is compliant.
      "status": { # The status of a sender compliance requirement. # The compliance status.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "oneClickUnsubscribeVerdict": { # Compliance verdict for whether a sender meets the one-click unsubscribe compliance requirement. # One-click unsubscribe compliance verdict.
      "reason": "A String", # The specific reason for the compliance verdict. Must be empty if the status is compliant.
      "status": { # The status of a sender compliance requirement. # The compliance status.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "rowData": [ # Data for each of the rows of the table. Each message contains all the data that backs a single row.
      { # Data for a single row of the compliance status table.
        "requirement": "A String", # The compliance requirement.
        "status": { # The status of a sender compliance requirement. # The compliance status for the requirement.
          "status": "A String", # Output only. The compliance status.
        },
      },
    ],
  },
  "name": "A String", # Identifier. The resource name of the domain's compliance status. Format: `domains/{domain_id}/complianceStatus`.
  "subdomainComplianceData": { # Compliance data for a given domain. # Compliance data calculated specifically for the subdomain in `name`. This field is only populated if the domain in `name` is a subdomain that differs from its registrable domain (e.g., `sub.example.com`), and if compliance data is available for that specific subdomain.
    "deliverabilityStatusVerdict": { # [Developer Preview](https://developers.google.com/workspace/preview): Verdict of domain deliverability status. # Output only. Deliverability status verdict.
      "reason": "A String", # Output only. The specific reason for the compliance verdict.
      "state": { # The status of a sender compliance requirement. # Output only. The compliance state.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "domainId": "A String", # Domain that this data is for.
    "honorUnsubscribeVerdict": { # Compliance verdict for whether a sender meets the unsubscribe honoring compliance requirement. # Unsubscribe honoring compliance verdict.
      "reason": "A String", # The specific reason for the compliance verdict. Must be empty if the status is compliant.
      "status": { # The status of a sender compliance requirement. # The compliance status.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "oneClickUnsubscribeVerdict": { # Compliance verdict for whether a sender meets the one-click unsubscribe compliance requirement. # One-click unsubscribe compliance verdict.
      "reason": "A String", # The specific reason for the compliance verdict. Must be empty if the status is compliant.
      "status": { # The status of a sender compliance requirement. # The compliance status.
        "status": "A String", # Output only. The compliance status.
      },
    },
    "rowData": [ # Data for each of the rows of the table. Each message contains all the data that backs a single row.
      { # Data for a single row of the compliance status table.
        "requirement": "A String", # The compliance requirement.
        "status": { # The status of a sender compliance requirement. # The compliance status for the requirement.
          "status": "A String", # Output only. The compliance status.
        },
      },
    ],
  },
}
getVerificationToken(name, verificationMethod=None, x__xgafv=None)
[Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain.

Args:
  name: string, Required. The resource name of the verification token to retrieve. Format: `domains/{domain}/verificationToken` (required)
  verificationMethod: string, Required. The verification method used. Must be specified, i.e. TXT or CNAME.
    Allowed values
      DOMAIN_VERIFICATION_METHOD_UNSPECIFIED - Unspecified.
      TXT - Generate a DNS TXT verification token.
      CNAME - Generate a DNS CNAME verification token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # [Developer Preview](https://developers.google.com/workspace/preview): The DNS token a user can use to verify ownership of a domain.
  "name": "A String", # Identifier. The resource name of the domain verification token. Format: domains/{domain}/verificationToken
  "token": "A String", # The verification token.
  "verificationMethod": "A String", # The verification method used.
}
list(pageSize=None, pageToken=None, x__xgafv=None)
Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list.

Args:
  pageSize: integer, Optional. Requested page size. Server may return fewer domains than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200.
  pageToken: string, Optional. The next_page_token value returned from a previous List request, if any.
  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 ListDomains.
  "domains": [ # The domains that have been registered by the user.
    { # Information about a domain registered by the user.
      "createTime": "A String", # Output only. Immutable. The timestamp at which the domain was added to the user's account.
      "lastVerifyTime": "A String", # The timestamp at which the domain was last verified by the user.
      "name": "A String", # Identifier. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com).
      "permission": "A String", # Output only. User's permission of this domain.
      "verificationState": "A String", # Output only. Information about a user's verification history and properties for the domain.
    },
  ],
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
}
list_next()
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.
        
verify(name, body=None, x__xgafv=None)
[Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level. Note that this is distinct from checking if the user has OWNER status within IRDB.

Args:
  name: string, Required. The domain to verify. (required)
  body: object, The request body.
    The object takes the form of:

{ # [Developer Preview](https://developers.google.com/workspace/preview): Request message for VerifyDomain.
  "verificationMethod": "A String", # Required. The verification method used. Must be specified, i.e. TXT or CNAME.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # [Developer Preview](https://developers.google.com/workspace/preview): Response message for VerifyDomain.
}