openapi: 3.2.0 info: title: AdMob Mediation Ab Experiments API version: v1beta description: The AdMob API allows publishers to programmatically get information about their AdMob account. contact: name: Google url: https://developers.google.com/admob/api/ termsOfService: https://developers.google.com/terms license: name: Google APIs Terms of Service url: https://developers.google.com/terms x-discovery-revision: '20260731' servers: - url: https://admob.googleapis.com description: AdMob API security: - GoogleOAuth2: - https://www.googleapis.com/auth/admob.readonly - https://www.googleapis.com/auth/admob.report tags: - name: mediationAbExperiments paths: /v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments: post: operationId: accounts_mediationGroups_mediationAbExperiments_create summary: Create an A/B testing experiment for a specified AdMob account and a mediation group. This method has limited access. If description: Create an A/B testing experiment for a specified AdMob account and a mediation group. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access. tags: - mediationAbExperiments parameters: - name: parent in: path description: 'Required. The parent which owns the mediation group. Format: accounts/{publisher_id}/mediationGroups/{mediation_group_id}' required: true schema: type: string pattern: ^accounts/[^/]+/mediationGroups/[^/]+$ requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MediationAbExperiment' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MediationAbExperiment' /v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments:stop: post: operationId: accounts_mediationGroups_mediationAbExperiments_stop summary: Stop the mediation A/B experiment and choose a variant. This method has limited access. If you see a 403 permission deni description: Stop the mediation A/B experiment and choose a variant. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access. tags: - mediationAbExperiments parameters: - name: name in: path description: 'Name of the mediation group, the experiment for which to choose a variant for. Example: accounts/pub-9876543210987654/mediationGroups/0123456789/ mediationAbExperiments' required: true schema: type: string pattern: ^accounts/[^/]+/mediationGroups/[^/]+/mediationAbExperiments$ requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StopMediationAbExperimentRequest' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MediationAbExperiment' components: schemas: MediationAbExperimentExperimentMediationLine: type: object description: The mediation group line for the experiment. It will be used for serving during the run of the experiment. properties: mediationGroupLine: $ref: '#/components/schemas/MediationGroupMediationGroupLine' StopMediationAbExperimentRequest: type: object description: Request to end the mediation A/B experiment and choose a winning variant. properties: variantChoice: type: string description: The choice for the winning variant. enum: - VARIANT_CHOICE_UNSPECIFIED - VARIANT_CHOICE_A - VARIANT_CHOICE_B x-enumDescriptions: - Default value for an unset field. Do not use. - Use the mediation lines from Variant A and complete the experiment. Variant A contains the original serving lines before the experiment creation. - Use the mediation lines form Variant B and complete the experiment. Variant B contains the newly added serving lines. MediationGroupMediationGroupLine: type: object description: Settings for an ad network used by a mediation group. properties: adSourceId: type: string description: The ID of the ad source this mediation line is associated with. state: type: string description: The status of the mediation group line. Only enabled mediation group lines will be served. enum: - STATE_UNSPECIFIED - ENABLED - DISABLED - REMOVED x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group line is active and used to serve ads. - The mediation group line has been disabled and is no longer served. Disabled mediation group lines can be re-enabled. - The mediation group line will be removed and no longer served. Removed mediation group lines can not be re-enabled and will no longer be visible. This is an input only field. cpmMicros: type: string format: int64 description: 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: type: string description: 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. enum: - CPM_MODE_UNSPECIFIED - LIVE - MANUAL - ANO x-enumDescriptions: - Default value for an unset field. Do not use. - CPM is calculated per ad request based on the ad auction. - CPM is set by the user manually. - CPM is retrieved from the ad network using the publisher specified credentials. Output only. adUnitMappings: type: object description: 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. additionalProperties: type: string experimentVariant: type: string description: Output only. The Mediation A/B experiment variant to which the mediation group line belongs to. enum: - VARIANT_UNSPECIFIED - VARIANT_A - VARIANT_B - ORIGINAL x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group line belongs to the variant A. - The mediation group line belongs to the variant B. - The mediation group line isn't a part of an experiment. readOnly: true id: type: string description: 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. displayName: type: string description: User-provided label for this mediation line. The maximum length allowed is 255 characters. MediationAbExperiment: type: object description: The mediation A/B experiment. properties: endTime: type: string format: google-datetime description: Output only. The time at which the experiment was ended or target to end (in UTC). readOnly: true state: type: string description: Output only. The state of the experiment. It is an output only field. enum: - EXPERIMENT_STATE_UNSPECIFIED - EXPIRED - RUNNING - ENDED x-enumDescriptions: - Default for an unset field. Do not use. - The experiment has expired. - The experiment is running and thus used in serving. - The experiment is ended, but not yet expired. Serving continues in the original configurations while the experiment is ready to call an action. readOnly: true treatmentMediationLines: type: array description: The experiment mediation lines created for the treatment. They will be used for serving when the experiment status is RUNNING. items: $ref: '#/components/schemas/MediationAbExperimentExperimentMediationLine' mediationGroupId: type: string description: Output only. The mediation group id this experiment belongs to. This can be used for filtering the experiments in the list experiments API. readOnly: true displayName: type: string description: The display name for the mediation A/B experiment. experimentId: type: string description: Output only. Unique identifier for the mediation A/B experiment. It is an output only property. readOnly: true startTime: type: string format: google-datetime description: Output only. The time at which the experiment was started (in UTC). readOnly: true controlMediationLines: type: array description: Output only. The experiment mediation lines for control. They are inherited from the parent mediation group. It is an output only field. readOnly: true items: $ref: '#/components/schemas/MediationAbExperimentExperimentMediationLine' name: type: string description: 'Resource name for this experiment. The format is accounts/{publisher_id}/ mediationGroups/{mediation_group_id}/mediationAbExperiment/ {mediation_group_experiment_id}. For example: accounts/pub-9876543210987654/mediationGroups/0123456789/ mediationAbExperiment/12345' treatmentTrafficPercentage: type: string format: int64 description: The percentage of the mediation A/B experiment traffic that will be send to the treatment (variant B). The remainder is sent to the control (variant A). The percentage is expressed as an integer in the inclusive range of [1,99]. See https://support.google.com/admob/answer/9572326 for details. variantLeader: type: string description: Output only. The variant leader for the experiment according to some key metrics. enum: - VARIANT_LEADER_UNSPECIFIED - CONTROL - TREATMENT - INSUFFICIENT_DATA - TOO_EARLY_TO_CALL - NO_VARIANT_LEADER x-enumDescriptions: - Default value of the enum. Do not use. - The control leading the experiment. - The treatment leading the experiment. - Collected data (impressions) are insufficient to determine a leader. - Experiment hasn't run long enough to determine a leader. - Neither variant is a decisive winner in the observed data. readOnly: true securitySchemes: GoogleOAuth2: type: oauth2 description: Google OAuth 2.0. See https://developers.google.com/admob/api/v1/auth flows: authorizationCode: authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth tokenUrl: https://oauth2.googleapis.com/token scopes: https://www.googleapis.com/auth/admob.readonly: See your AdMob data https://www.googleapis.com/auth/admob.report: See your AdMob data externalDocs: url: https://developers.google.com/admob/api/