Google Tag Manager · Arazzo Workflow

Google Tag Manager List and Get a Workspace

Version 1.0.0

List the workspaces in a container, then fetch the first one in detail.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsConversion TrackingMarketingTag ManagementTrackingArazzoWorkflows

Provider

google-tag-manager

Workflows

list-and-get-workspace
List container workspaces and get the first one when present.
Lists the workspaces in the supplied container and, when at least one is returned, fetches the first workspace in full detail.
2 steps inputs: accessToken, containerPath outputs: firstWorkspacePath, workspaceName
1
listWorkspaces
List all workspaces that belong to the supplied container.
2
getWorkspace
Fetch the first workspace returned by the list in full detail.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Tag Manager List and Get a Workspace
  summary: List the workspaces in a container, then fetch the first one in detail.
  description: >-
    A read-side discovery flow. The workflow lists the workspaces in a container
    and branches on the result: when at least one workspace exists it fetches the
    first workspace by its resource path, and when the container has no
    workspaces 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: workspacesApi
  url: ../openapi/google-tag-manager-workspaces-api-openapi.yml
  type: openapi
workflows:
- workflowId: list-and-get-workspace
  summary: List container workspaces and get the first one when present.
  description: >-
    Lists the workspaces in the supplied container and, when at least one is
    returned, fetches the first workspace in full detail.
  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}.
  steps:
  - stepId: listWorkspaces
    description: >-
      List all workspaces that belong to the supplied container.
    operationId: listWorkspaces
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: parent
      in: path
      value: $inputs.containerPath
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstWorkspacePath: $response.body#/workspace/0/path
    onSuccess:
    - name: hasWorkspace
      type: goto
      stepId: getWorkspace
      criteria:
      - context: $response.body
        condition: $.workspace.length > 0
        type: jsonpath
    - name: noWorkspace
      type: end
      criteria:
      - context: $response.body
        condition: $.workspace.length == 0
        type: jsonpath
  - stepId: getWorkspace
    description: >-
      Fetch the first workspace returned by the list in full detail.
    operationId: getWorkspace
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: workspacePath
      in: path
      value: $steps.listWorkspaces.outputs.firstWorkspacePath
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      workspacePath: $response.body#/path
      workspaceName: $response.body#/name
      fingerprint: $response.body#/fingerprint
  outputs:
    firstWorkspacePath: $steps.listWorkspaces.outputs.firstWorkspacePath
    workspaceName: $steps.getWorkspace.outputs.workspaceName

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/google-tag-manager-list-and-get-workspace-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

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.

A second provider on the same verified email joins the account you already have.