arazzo: 1.0.1
info:
title: Google Tag Manager Audit Container Versions
summary: List a container's version headers, then fetch the newest one in full.
description: >-
A version-history audit flow. The workflow lists the container version
headers for a container and branches: when at least one version exists it
fetches the first (most recent) version document in full, and when no
versions exist it ends. Each step spells out its request inline, including
the inline bearer authorization, so the flow can be read and executed without
opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: versionsApi
url: ../openapi/google-tag-manager-versions-api-openapi.yml
type: openapi
workflows:
- workflowId: audit-container-versions
summary: List container version headers and get the newest version in detail.
description: >-
Lists the container version headers for the supplied container and, when at
least one is present, fetches the first version document for inspection.
inputs:
type: object
required:
- accessToken
- containerPath
properties:
accessToken:
type: string
description: OAuth 2.0 bearer access token for the Tag Manager API.
containerPath:
type: string
description: >-
The container API relative path, e.g.
accounts/{accountId}/containers/{containerId}.
includeDeleted:
type: boolean
description: Also retrieve deleted (archived) versions when true.
steps:
- stepId: listVersionHeaders
description: >-
List all container version headers for the container.
operationId: listContainerVersionHeaders
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: parent
in: path
value: $inputs.containerPath
- name: includeDeleted
in: query
value: $inputs.includeDeleted
successCriteria:
- condition: $statusCode == 200
outputs:
firstVersionPath: $response.body#/containerVersionHeader/0/path
onSuccess:
- name: hasVersions
type: goto
stepId: getVersion
criteria:
- context: $response.body
condition: $.containerVersionHeader.length > 0
type: jsonpath
- name: noVersions
type: end
criteria:
- context: $response.body
condition: $.containerVersionHeader.length == 0
type: jsonpath
- stepId: getVersion
description: >-
Fetch the first container version document returned by the list.
operationId: getContainerVersion
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: versionPath
in: path
value: $steps.listVersionHeaders.outputs.firstVersionPath
successCriteria:
- condition: $statusCode == 200
outputs:
versionPath: $response.body#/path
versionName: $response.body#/name
tags: $response.body#/tag
triggers: $response.body#/trigger
variables: $response.body#/variable
outputs:
firstVersionPath: $steps.listVersionHeaders.outputs.firstVersionPath
versionName: $steps.getVersion.outputs.versionName
Discovery needs no key. Ratings and market analysis are Pro.
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. See our Privacy Policy and
Terms.