Class: Google::Apis::MarketingplatformadminV1alpha::GoogleMarketingPlatformAdminAPIService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MarketingplatformadminV1alpha::GoogleMarketingPlatformAdminAPIService
- Defined in:
- lib/google/apis/marketingplatformadmin_v1alpha/service.rb
Overview
Google Marketing Platform Admin API
The Google Marketing Platform Admin API allows for programmatic access to the Google Marketing Platform configuration data. You can use the Google Marketing Platform Admin API to manage links between your Google Marketing Platform organization and Google Analytics accounts, and to set the service level of your GA4 properties.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://marketingplatformadmin.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink
Creates the link between the Analytics account and the Google Marketing Platform organization.
-
#delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Empty
Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization.
-
#find_organization_sales_partner_managed_clients(organization, find_sales_partner_managed_clients_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::FindSalesPartnerManagedClientsResponse
Returns a list of clients managed by the sales partner organization.
-
#get_organization(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Organization
Lookup for a single organization.
-
#initialize ⇒ GoogleMarketingPlatformAdminAPIService
constructor
A new instance of GoogleMarketingPlatformAdminAPIService.
-
#list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
-
#list_organizations(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListOrganizationsResponse
Returns a list of organizations that the user has access to.
-
#report_organization_property_usage(organization, report_property_usage_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ReportPropertyUsageResponse
Get the usage and billing data for properties within the organization for the specified month.
-
#set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse
Updates the service level for an Analytics property.
Constructor Details
#initialize ⇒ GoogleMarketingPlatformAdminAPIService
Returns a new instance of GoogleMarketingPlatformAdminAPIService.
51 52 53 54 55 56 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 51 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-marketingplatformadmin_v1alpha', client_version: Google::Apis::MarketingplatformadminV1alpha::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
44 45 46 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 44 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
49 50 51 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 49 def quota_user @quota_user end |
Instance Method Details
#create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink
Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.
230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 230 def create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+parent}/analyticsAccountLinks', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink::Representation command.request_object = analytics_account_link_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Empty
Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.
265 266 267 268 269 270 271 272 273 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 265 def delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::Empty::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#find_organization_sales_partner_managed_clients(organization, find_sales_partner_managed_clients_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::FindSalesPartnerManagedClientsResponse
Returns a list of clients managed by the sales partner organization. User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 82 def find_organization_sales_partner_managed_clients(organization, find_sales_partner_managed_clients_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+organization}:findSalesPartnerManagedClients', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::FindSalesPartnerManagedClientsRequest::Representation command.request_object = find_sales_partner_managed_clients_request_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::FindSalesPartnerManagedClientsResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::FindSalesPartnerManagedClientsResponse command.params['organization'] = organization unless organization.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_organization(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Organization
Lookup for a single organization.
115 116 117 118 119 120 121 122 123 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 115 def get_organization(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::Organization::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::Organization command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 307 def list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+parent}/analyticsAccountLinks', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organizations(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListOrganizationsResponse
Returns a list of organizations that the user has access to.
153 154 155 156 157 158 159 160 161 162 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 153 def list_organizations(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/organizations', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::ListOrganizationsResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::ListOrganizationsResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#report_organization_property_usage(organization, report_property_usage_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ReportPropertyUsageResponse
Get the usage and billing data for properties within the organization for the specified month. Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/ BillingAdmin on the sales partner client org in order to view the usage data only.
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 192 def report_organization_property_usage(organization, report_property_usage_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+organization}:reportPropertyUsage', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::ReportPropertyUsageRequest::Representation command.request_object = report_property_usage_request_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::ReportPropertyUsageResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::ReportPropertyUsageResponse command.params['organization'] = organization unless organization.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse
Updates the service level for an Analytics property.
342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 342 def set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelRequest::Representation command.request_object = set_property_service_level_request_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse command.params['analyticsAccountLink'] = analytics_account_link unless analytics_account_link.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |