arazzo: 1.0.1
info:
title: Google Analytics Audit a Property's Custom Definitions
summary: List the custom dimensions and then the custom metrics defined on a GA4 property.
description: >-
An audit flow on the GA4 Admin API that enumerates a property's custom
definitions. The workflow lists the custom dimensions registered on a
property and then lists the custom metrics, returning both collections so a
caller can review what custom data has been configured for reporting. Each
request is spelled out inline, including the OAuth bearer authorization.
version: 1.0.0
sourceDescriptions:
- name: propertiesApi
url: ../openapi/_superseded/google-analytics-properties-api-openapi.yml
type: openapi
workflows:
- workflowId: audit-custom-definitions
summary: List the custom dimensions and custom metrics defined on a property.
description: >-
Lists the custom dimensions on the property, then lists the custom metrics
on the same property.
inputs:
type: object
required:
- accessToken
- property
properties:
accessToken:
type: string
description: OAuth 2.0 bearer access token with an analytics read scope.
property:
type: string
description: 'GA4 property resource name (e.g. properties/1234).'
steps:
- stepId: listCustomDimensions
description: >-
List the custom dimensions registered on the property, returning up to 200
in a single page.
operationId: analyticsadmin.properties.customDimensions.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:
customDimensions: $response.body#/customDimensions
dimensionsNextPageToken: $response.body#/nextPageToken
- stepId: listCustomMetrics
description: >-
List the custom metrics registered on the property, returning up to 200 in
a single page.
operationId: analyticsadmin.properties.customMetrics.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:
customMetrics: $response.body#/customMetrics
metricsNextPageToken: $response.body#/nextPageToken
outputs:
customDimensions: $steps.listCustomDimensions.outputs.customDimensions
customMetrics: $steps.listCustomMetrics.outputs.customMetrics
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.