Google Marketing Platform Admin API

The Marketing Platform Admin API enables programmatic management of organization-level settings including links to Google Analytics accounts, service level configuration, and organization administration.

OpenAPI Specification

openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Marketing Platform Admin API
  description: >-
    The Google Marketing Platform Admin API provides programmatic access to
    manage links between Google Marketing Platform organizations and Google
    Analytics accounts, including service level management.
  version: v1alpha
  contact:
    name: Google
    url: https://developers.google.com/marketing-platform/devguides/api/admin/v1/rest
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
servers:
- url: https://marketingplatformadmin.googleapis.com
  description: Marketing Platform Admin API server
paths:
  /v1alpha/organizations:
    get:
      summary: Google Marketing Platform Admin List Organizations
      description: Lists the Google Marketing Platform organizations accessible by the caller.
      operationId: listOrganizations
      parameters:
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationsResponse'
      tags:
      - V1alpha
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1alpha/{parent}/analyticsAccountLinks:
    get:
      summary: Google Marketing Platform Admin List Analytics Account Links
      description: Lists analytics account links for the specified organization.
      operationId: listAnalyticsAccountLinks
      parameters:
      - name: parent
        in: path
        required: true
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAnalyticsAccountLinksResponse'
      tags:
      - V1alpha
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: Google Marketing Platform Admin Create Analytics Account Link
      description: Creates an analytics account link for the specified organization.
      operationId: createAnalyticsAccountLink
      parameters:
      - name: parent
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsAccountLink'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsAccountLink'
      tags:
      - V1alpha
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1alpha/{name}:
    delete:
      summary: Google Marketing Platform Admin Delete Analytics Account Link
      description: Deletes an analytics account link.
      operationId: deleteAnalyticsAccountLink
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      tags:
      - V1alpha
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1alpha/{analyticsAccountLink}:setPropertyServiceLevel:
    post:
      summary: Google Marketing Platform Admin Set Property Service Level
      description: Sets the service level for an Analytics property.
      operationId: setPropertyServiceLevel
      parameters:
      - name: analyticsAccountLink
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPropertyServiceLevelRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetPropertyServiceLevelResponse'
      tags:
      - V1alpha
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Organization:
      type: object
      properties:
        name:
          type: string
          description: Resource name of the organization.
          example: Example Title
        displayName:
          type: string
          description: The display name of the organization.
          example: example_value
    ListOrganizationsResponse:
      type: object
      properties:
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/Organization'
          example: []
        nextPageToken:
          type: string
          example: example_value
    AnalyticsAccountLink:
      type: object
      properties:
        name:
          type: string
          description: Resource name of the link.
          example: Example Title
        analyticsAccount:
          type: string
          description: The Analytics account resource name.
          example: example_value
        displayName:
          type: string
          description: The display name of the Analytics account.
          example: example_value
        linkVerificationState:
          type: string
          enum:
          - LINK_VERIFICATION_STATE_UNSPECIFIED
          - LINK_VERIFICATION_STATE_VERIFIED
          - LINK_VERIFICATION_STATE_NOT_VERIFIED
          example: LINK_VERIFICATION_STATE_UNSPECIFIED
    ListAnalyticsAccountLinksResponse:
      type: object
      properties:
        analyticsAccountLinks:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticsAccountLink'
          example: []
        nextPageToken:
          type: string
          example: example_value
    SetPropertyServiceLevelRequest:
      type: object
      properties:
        analyticsProperty:
          type: string
          description: The Analytics property resource name.
          example: example_value
        serviceLevel:
          type: string
          enum:
          - ANALYTICS_SERVICE_LEVEL_UNSPECIFIED
          - ANALYTICS_SERVICE_LEVEL_STANDARD
          - ANALYTICS_SERVICE_LEVEL_360
          example: ANALYTICS_SERVICE_LEVEL_UNSPECIFIED
    SetPropertyServiceLevelResponse:
      type: object
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/marketingplatformadmin.analytics.read: View Analytics links
            https://www.googleapis.com/auth/marketingplatformadmin.analytics.update: Manage Analytics links
security:
- oauth2:
  - https://www.googleapis.com/auth/marketingplatformadmin.analytics.update
tags:
- name: V1alpha