AdMob API . accounts . mediationGroups

Instance Methods

mediationAbExperiments()

Returns the mediationAbExperiments Resource.

close()

Close httplib2 connections.

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

Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

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

List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

list_next()

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

Args:
  parent: string, Required. The parent which owns the mediation group. Format: accounts/{publisher_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Describes an AdMob mediation group.
  "displayName": "A String", # User provided name for the mediation group. The maximum length allowed is 120 characters.
  "mediationAbExperimentState": "A String", # Output only. The state of the mediation a/b experiment that belongs to this mediation group.
  "mediationGroupId": "A String", # The ID of the mediation group. Example: "0123456789". This is a read only property.
  "mediationGroupLines": { # The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.
    "a_key": { # Settings for an ad network used by a mediation group.
      "adSourceId": "A String", # The ID of the ad source this mediation line is associated with.
      "adUnitMappings": { # References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.
        "a_key": "A String",
      },
      "cpmMicros": "A String", # The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros.
      "cpmMode": "A String", # Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.
      "displayName": "A String", # User-provided label for this mediation line. The maximum length allowed is 255 characters.
      "experimentVariant": "A String", # Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.
      "id": "A String", # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.
      "state": "A String", # The status of the mediation group line. Only enabled mediation group lines will be served.
    },
  },
  "name": "A String", # Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789
  "state": "A String", # The status of the mediation group. Only enabled mediation groups will be served.
  "targeting": { # Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. # Set of criteria targeted by this mediation group, such as ad units and geo locations.
    "adUnitIds": [ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
      "A String",
    ],
    "excludedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region.
      "A String",
    ],
    "format": "A String", # Ad format targeted by this mediation group. Examples: "banner", "native".
    "idfaTargeting": "A String", # The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.
    "platform": "A String", # Describes the platform of the app. Examples: "IOS", "Android".
    "targetedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
      "A String",
    ],
  },
}

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

Returns:
  An object of the form:

    { # Describes an AdMob mediation group.
  "displayName": "A String", # User provided name for the mediation group. The maximum length allowed is 120 characters.
  "mediationAbExperimentState": "A String", # Output only. The state of the mediation a/b experiment that belongs to this mediation group.
  "mediationGroupId": "A String", # The ID of the mediation group. Example: "0123456789". This is a read only property.
  "mediationGroupLines": { # The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.
    "a_key": { # Settings for an ad network used by a mediation group.
      "adSourceId": "A String", # The ID of the ad source this mediation line is associated with.
      "adUnitMappings": { # References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.
        "a_key": "A String",
      },
      "cpmMicros": "A String", # The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros.
      "cpmMode": "A String", # Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.
      "displayName": "A String", # User-provided label for this mediation line. The maximum length allowed is 255 characters.
      "experimentVariant": "A String", # Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.
      "id": "A String", # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.
      "state": "A String", # The status of the mediation group line. Only enabled mediation group lines will be served.
    },
  },
  "name": "A String", # Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789
  "state": "A String", # The status of the mediation group. Only enabled mediation groups will be served.
  "targeting": { # Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. # Set of criteria targeted by this mediation group, such as ad units and geo locations.
    "adUnitIds": [ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
      "A String",
    ],
    "excludedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region.
      "A String",
    ],
    "format": "A String", # Ad format targeted by this mediation group. Examples: "banner", "native".
    "idfaTargeting": "A String", # The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.
    "platform": "A String", # Describes the platform of the app. Examples: "IOS", "Android".
    "targetedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
      "A String",
    ],
  },
}
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

Args:
  parent: string, Required. Resource name of the account to list mediation groups for. Example: accounts/pub-9876543210987654 (required)
  filter: string, The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible fields to filter by are: - "AD_SOURCE_IDS" - "AD_UNIT_IDS" - "APP_IDS" - "DISPLAY_NAME" - "FORMAT" - "MEDIATION_GROUP_ID" - "PLATFORM" - "STATE" - "TARGETED_REGION_CODES" Possible filter functions are: - `IN`: Used to filter fields that represent a singleton including "MEDIATION_GROUP_ID", "DISPLAY_NAME", "STATE", "PLATFORM", and "FORMAT". - `CONTAINS_ANY`: Used to filter fields that represent a collection including "AD_SOURCE_IDS", "AD_UNIT_IDS", "APP_IDS", and "TARGETED_REGION_CODES". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, "Test Group 1", "Test Group 2") AND IN(PLATFORM, "ANDROID") AND CONTAINS_ANY(AD_SOURCE_IDS, "5450213213286189855")
  pageSize: integer, The maximum number of mediation groups to return. If unspecified or 0, at most 10,000 mediation groups will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.
  pageToken: string, The value returned by the last `ListMediationGroupsResponse`; indicates that this is a continuation of a prior `ListMediationGroups` call, and that the system should return the next page of data.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for the mediation groups list request.
  "mediationGroups": [ # The resulting mediation groups for the requested account.
    { # Describes an AdMob mediation group.
      "displayName": "A String", # User provided name for the mediation group. The maximum length allowed is 120 characters.
      "mediationAbExperimentState": "A String", # Output only. The state of the mediation a/b experiment that belongs to this mediation group.
      "mediationGroupId": "A String", # The ID of the mediation group. Example: "0123456789". This is a read only property.
      "mediationGroupLines": { # The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.
        "a_key": { # Settings for an ad network used by a mediation group.
          "adSourceId": "A String", # The ID of the ad source this mediation line is associated with.
          "adUnitMappings": { # References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.
            "a_key": "A String",
          },
          "cpmMicros": "A String", # The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros.
          "cpmMode": "A String", # Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.
          "displayName": "A String", # User-provided label for this mediation line. The maximum length allowed is 255 characters.
          "experimentVariant": "A String", # Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.
          "id": "A String", # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.
          "state": "A String", # The status of the mediation group line. Only enabled mediation group lines will be served.
        },
      },
      "name": "A String", # Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789
      "state": "A String", # The status of the mediation group. Only enabled mediation groups will be served.
      "targeting": { # Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. # Set of criteria targeted by this mediation group, such as ad units and geo locations.
        "adUnitIds": [ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
          "A String",
        ],
        "excludedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region.
          "A String",
        ],
        "format": "A String", # Ad format targeted by this mediation group. Examples: "banner", "native".
        "idfaTargeting": "A String", # The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.
        "platform": "A String", # Describes the platform of the app. Examples: "IOS", "Android".
        "targetedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
          "A String",
        ],
      },
    },
  ],
  "nextPageToken": "A String", # If not empty, indicates that there may be more mediation groups for the request; this value should be passed in a new `ListMediationGroupsRequest`.
}
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.
        
patch(name, body=None, updateMask=None, x__xgafv=None)
Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.

Args:
  name: string, Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789 (required)
  body: object, The request body.
    The object takes the form of:

{ # Describes an AdMob mediation group.
  "displayName": "A String", # User provided name for the mediation group. The maximum length allowed is 120 characters.
  "mediationAbExperimentState": "A String", # Output only. The state of the mediation a/b experiment that belongs to this mediation group.
  "mediationGroupId": "A String", # The ID of the mediation group. Example: "0123456789". This is a read only property.
  "mediationGroupLines": { # The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.
    "a_key": { # Settings for an ad network used by a mediation group.
      "adSourceId": "A String", # The ID of the ad source this mediation line is associated with.
      "adUnitMappings": { # References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.
        "a_key": "A String",
      },
      "cpmMicros": "A String", # The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros.
      "cpmMode": "A String", # Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.
      "displayName": "A String", # User-provided label for this mediation line. The maximum length allowed is 255 characters.
      "experimentVariant": "A String", # Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.
      "id": "A String", # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.
      "state": "A String", # The status of the mediation group line. Only enabled mediation group lines will be served.
    },
  },
  "name": "A String", # Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789
  "state": "A String", # The status of the mediation group. Only enabled mediation groups will be served.
  "targeting": { # Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. # Set of criteria targeted by this mediation group, such as ad units and geo locations.
    "adUnitIds": [ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
      "A String",
    ],
    "excludedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region.
      "A String",
    ],
    "format": "A String", # Ad format targeted by this mediation group. Examples: "banner", "native".
    "idfaTargeting": "A String", # The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.
    "platform": "A String", # Describes the platform of the app. Examples: "IOS", "Android".
    "targetedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
      "A String",
    ],
  },
}

  updateMask: string, List of mediation group fields to be updated. Updates to repeated fields such as items in a list will fully replace the existing value(s) with the new value(s). Updates to individual values in a map can be done by indexing by the key. The following field masks are supported for mediation group updates: - "mediation_group_lines[\"{mediation_group_line_id}\"]" clang-format off - "mediation_group_lines[\"{mediation_group_line_id}\"].ad_unit_mappings[\"{ad_unit_id}\"]" clang-format on - "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_micros" - "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_mode" - "mediation_group_lines[\"{mediation_group_line_id}\"].state" - "mediation_group_lines[\"{mediation_group_line_id}\"].display_name" - "targeting.ad_unit_ids" To update a mediation group with a new mediation group line, use a distinct negative number for the "mediation_group_line_id". For Example: update_mask { paths: "mediation_group_lines[\"123456789012345\"].cpm_micros" }
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Describes an AdMob mediation group.
  "displayName": "A String", # User provided name for the mediation group. The maximum length allowed is 120 characters.
  "mediationAbExperimentState": "A String", # Output only. The state of the mediation a/b experiment that belongs to this mediation group.
  "mediationGroupId": "A String", # The ID of the mediation group. Example: "0123456789". This is a read only property.
  "mediationGroupLines": { # The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.
    "a_key": { # Settings for an ad network used by a mediation group.
      "adSourceId": "A String", # The ID of the ad source this mediation line is associated with.
      "adUnitMappings": { # References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.
        "a_key": "A String",
      },
      "cpmMicros": "A String", # The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros.
      "cpmMode": "A String", # Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.
      "displayName": "A String", # User-provided label for this mediation line. The maximum length allowed is 255 characters.
      "experimentVariant": "A String", # Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.
      "id": "A String", # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.
      "state": "A String", # The status of the mediation group line. Only enabled mediation group lines will be served.
    },
  },
  "name": "A String", # Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789
  "state": "A String", # The status of the mediation group. Only enabled mediation groups will be served.
  "targeting": { # Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. # Set of criteria targeted by this mediation group, such as ad units and geo locations.
    "adUnitIds": [ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
      "A String",
    ],
    "excludedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region.
      "A String",
    ],
    "format": "A String", # Ad format targeted by this mediation group. Examples: "banner", "native".
    "idfaTargeting": "A String", # The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.
    "platform": "A String", # Describes the platform of the app. Examples: "IOS", "Android".
    "targetedRegionCodes": [ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
      "A String",
    ],
  },
}