Google Analytics · Arazzo Workflow

Google Analytics Inventory a Property's Data Streams

Version 1.0.0

List the properties under an account, then list the data streams for the chosen property.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine LearningAttributionArazzoWorkflows

Provider

google-analytics

Workflows

inventory-property-data-streams
Confirm a property exists and list its data streams.
Lists the properties under an account and lists the data streams for the supplied property.
2 steps inputs: accessToken, account, property outputs: dataStreams, properties
1
listProperties
analyticsadmin.properties.list
List the GA4 properties under the account so the target property can be confirmed before listing its data streams.
2
listDataStreams
analyticsadmin.properties.dataStreams.list
List the data streams attached to the property, returning up to 200 in a single page.

Source API Descriptions

Arazzo Workflow Specification

google-analytics-inventory-property-data-streams-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Google Analytics Inventory a Property's Data Streams
  summary: List the properties under an account, then list the data streams for the chosen property.
  description: >-
    An inventory flow on the GA4 Admin API. The workflow lists the GA4
    properties under an account so the target property can be confirmed, then
    lists the data streams attached to that property — the web and app streams
    that feed it measurement data. Each request is spelled out inline, including
    the OAuth bearer authorization, so the inventory can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: analyticsAdminApi
  url: ../openapi/google-analytics-admin-api.yaml
  type: openapi
workflows:
- workflowId: inventory-property-data-streams
  summary: Confirm a property exists and list its data streams.
  description: >-
    Lists the properties under an account and lists the data streams for the
    supplied property.
  inputs:
    type: object
    required:
    - accessToken
    - account
    - property
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token with an analytics read scope.
      account:
        type: string
        description: 'Account resource name to list properties under (e.g. accounts/123).'
      property:
        type: string
        description: 'GA4 property resource name (e.g. properties/1234).'
  steps:
  - stepId: listProperties
    description: >-
      List the GA4 properties under the account so the target property can be
      confirmed before listing its data streams.
    operationId: analyticsadmin.properties.list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: filter
      in: query
      value: parent:$inputs.account
    - name: pageSize
      in: query
      value: 200
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      properties: $response.body#/properties
  - stepId: listDataStreams
    description: >-
      List the data streams attached to the property, returning up to 200 in a
      single page.
    operationId: analyticsadmin.properties.dataStreams.list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: parent
      in: path
      value: $inputs.property
    - name: pageSize
      in: query
      value: 200
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      dataStreams: $response.body#/dataStreams
      nextPageToken: $response.body#/nextPageToken
  outputs:
    properties: $steps.listProperties.outputs.properties
    dataStreams: $steps.listDataStreams.outputs.dataStreams