Azure Monitor · Arazzo Workflow

Azure Monitor Batch Metrics Query

Version 1.0.0

Resolve a resource's metric definitions, then batch-query the same metric across many resources at once.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Application InsightsCloudLogsMetricsMonitoringObservabilityArazzoWorkflows

Provider

microsoft-azure-monitor

Workflows

batch-query-metrics
Confirm a metric definition, then batch-query that metric across multiple resources.
Resolves the metric definitions for a representative resource and then retrieves the chosen metric values across a list of resource IDs in a single batch request.
2 steps inputs: aggregation, endtime, interval, metricNamespace, metricnames, representativeResourceUri, resourceids, starttime, subscriptionId outputs: batchValues, definitions
1
listMetricDefinitions
List the metric definitions for the representative resource to confirm the metric name and namespace before batching.
2
batchGetMetrics
Retrieve the chosen metric values across the supplied resource IDs in a single batch request.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Azure Monitor Batch Metrics Query
  summary: Resolve a resource's metric definitions, then batch-query the same metric across many resources at once.
  description: >-
    The fleet-wide metrics pattern. The workflow first lists the metric
    definitions for a representative resource to confirm the metric name and
    namespace, then issues a single batch query that retrieves those metric
    values for a list of resources in the same subscription, region, and resource
    type. Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: metricDefinitionsApi
  url: ../openapi/microsoft-azure-monitor-metric-definitions-api-openapi.yml
  type: openapi
- name: metricsBatchApi
  url: ../openapi/microsoft-azure-monitor-metrics-batch-api-openapi.yml
  type: openapi
workflows:
- workflowId: batch-query-metrics
  summary: Confirm a metric definition, then batch-query that metric across multiple resources.
  description: >-
    Resolves the metric definitions for a representative resource and then
    retrieves the chosen metric values across a list of resource IDs in a single
    batch request.
  inputs:
    type: object
    required:
    - subscriptionId
    - representativeResourceUri
    - metricNamespace
    - metricnames
    - starttime
    - endtime
    - resourceids
    properties:
      subscriptionId:
        type: string
        description: The ID of the target subscription.
      representativeResourceUri:
        type: string
        description: A representative resource used to resolve metric definitions before the batch query.
      metricNamespace:
        type: string
        description: The metric namespace shared by all resources in the batch.
      metricnames:
        type: string
        description: The comma-separated metric names to retrieve.
      starttime:
        type: string
        description: The start time of the batch query in ISO 8601 format.
      endtime:
        type: string
        description: The end time of the batch query in ISO 8601 format.
      interval:
        type: string
        description: The interval (window size) of the query in ISO 8601 duration format.
      aggregation:
        type: string
        description: The comma-separated list of aggregation types to retrieve.
      resourceids:
        type: array
        description: The list of resource IDs to query metrics for; all must share subscription, region, and type.
        items:
          type: string
  steps:
  - stepId: listMetricDefinitions
    description: >-
      List the metric definitions for the representative resource to confirm the
      metric name and namespace before batching.
    operationId: MetricDefinitions_List
    parameters:
    - name: resourceUri
      in: path
      value: $inputs.representativeResourceUri
    - name: api-version
      in: query
      value: '2023-10-01'
    - name: metricNamespace
      in: query
      value: $inputs.metricNamespace
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      definitions: $response.body#/value
  - stepId: batchGetMetrics
    description: >-
      Retrieve the chosen metric values across the supplied resource IDs in a
      single batch request.
    operationId: MetricsBatch_Batch
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: api-version
      in: query
      value: '2024-02-01'
    - name: starttime
      in: query
      value: $inputs.starttime
    - name: endtime
      in: query
      value: $inputs.endtime
    - name: interval
      in: query
      value: $inputs.interval
    - name: metricnames
      in: query
      value: $inputs.metricnames
    - name: metricNamespace
      in: query
      value: $inputs.metricNamespace
    - name: aggregation
      in: query
      value: $inputs.aggregation
    requestBody:
      contentType: application/json
      payload:
        resourceids: $inputs.resourceids
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      batchValues: $response.body#/values
  outputs:
    definitions: $steps.listMetricDefinitions.outputs.definitions
    batchValues: $steps.batchGetMetrics.outputs.batchValues

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/microsoft-azure-monitor-batch-metrics-query-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.