Search Ads 360 Reporting API . customers . accountLinks

Instance Methods

close()

Close httplib2 connections.

create(customerId, body=None, x__xgafv=None)

Creates an account link. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]() [ThirdPartyAppAnalyticsLinkError]()

mutate(customerId, body=None, x__xgafv=None)

Creates or removes an account link. From V5, create is not supported through AccountLinkService.MutateAccountLink. Use AccountLinkService.CreateAccountLink instead. List of thrown errors: [AccountLinkError]() [AuthenticationError]() [AuthorizationError]() [FieldMaskError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()

Method Details

close()
Close httplib2 connections.
create(customerId, body=None, x__xgafv=None)
Creates an account link. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]() [ThirdPartyAppAnalyticsLinkError]()

Args:
  customerId: string, Required. The ID of the customer for which the account link is created. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for AccountLinkService.CreateAccountLink.
  "accountLink": { # Represents the data sharing connection between a Google Ads account and another account # Required. The account link to be created.
    "accountLinkId": "A String", # Output only. The ID of the link. This field is read only.
    "resourceName": "A String", # Immutable. Resource name of the account link. AccountLink resource names have the form: `customers/{customer_id}/accountLinks/{account_link_id}`
    "status": "A String", # The status of the link.
    "thirdPartyAppAnalytics": { # The identifiers of a Third Party App Analytics Link. # Immutable. A third party app analytics link.
      "appAnalyticsProviderId": "A String", # Immutable. The ID of the app analytics provider. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
      "appId": "A String", # Immutable. A string that uniquely identifies a mobile application from which the data was collected to the Google Ads API. For iOS, the ID string is the 9 digit string that appears at the end of an App Store URL (for example, "422689480" for "Gmail" whose App Store link is https://apps.apple.com/us/app/gmail-email-by-google/id422689480). For Android, the ID string is the application's package name (for example, "com.google.android.gm" for "Gmail" given Google Play link https://play.google.com/store/apps/details?id=com.google.android.gm) This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
      "appVendor": "A String", # Immutable. The vendor of the app. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
    },
    "type": "A String", # Output only. The type of the linked account.
  },
}

  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 AccountLinkService.CreateAccountLink.
  "resourceName": "A String", # Returned for successful operations. Resource name of the account link.
}
mutate(customerId, body=None, x__xgafv=None)
Creates or removes an account link. From V5, create is not supported through AccountLinkService.MutateAccountLink. Use AccountLinkService.CreateAccountLink instead. List of thrown errors: [AccountLinkError]() [AuthenticationError]() [AuthorizationError]() [FieldMaskError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()

Args:
  customerId: string, Required. The ID of the customer being modified. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for AccountLinkService.MutateAccountLink.
  "operation": { # A single update on an account link. # Required. The operation to perform on the link.
    "remove": "A String", # Remove operation: A resource name for the account link to remove is expected, in this format: `customers/{customer_id}/accountLinks/{account_link_id}`
    "update": { # Represents the data sharing connection between a Google Ads account and another account # Update operation: The account link is expected to have a valid resource name.
      "accountLinkId": "A String", # Output only. The ID of the link. This field is read only.
      "resourceName": "A String", # Immutable. Resource name of the account link. AccountLink resource names have the form: `customers/{customer_id}/accountLinks/{account_link_id}`
      "status": "A String", # The status of the link.
      "thirdPartyAppAnalytics": { # The identifiers of a Third Party App Analytics Link. # Immutable. A third party app analytics link.
        "appAnalyticsProviderId": "A String", # Immutable. The ID of the app analytics provider. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
        "appId": "A String", # Immutable. A string that uniquely identifies a mobile application from which the data was collected to the Google Ads API. For iOS, the ID string is the 9 digit string that appears at the end of an App Store URL (for example, "422689480" for "Gmail" whose App Store link is https://apps.apple.com/us/app/gmail-email-by-google/id422689480). For Android, the ID string is the application's package name (for example, "com.google.android.gm" for "Gmail" given Google Play link https://play.google.com/store/apps/details?id=com.google.android.gm) This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
        "appVendor": "A String", # Immutable. The vendor of the app. This field should not be empty when creating a new third party app analytics link. It is unable to be modified after the creation of the link.
      },
      "type": "A String", # Output only. The type of the linked account.
    },
    "updateMask": "A String", # FieldMask that determines which resource fields are modified in an update.
  },
  "partialFailure": True or False, # If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.
  "validateOnly": True or False, # If true, the request is validated but not executed. Only errors are returned, not results.
}

  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 account link mutate.
  "partialFailureError": { # 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). # Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # 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.
  },
  "result": { # The result for the account link mutate. # Result for the mutate.
    "resourceName": "A String", # Returned for successful operations.
  },
}