swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector Metrics API
schemes:
- https
tags:
- name: Metrics
paths:
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}:
get:
tags:
- Metrics
description: Gets the server related metrics for a given metric and group combination.
x-ms-examples:
service_getMetrics:
$ref: ./examples/Service_MetricSets.json
operationId: microsoftAzureServiceGetmetrics
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- name: groupName
in: path
description: The group name
required: true
type: string
- name: groupKey
in: query
description: The group key
required: false
type: string
- name: fromDate
in: query
description: The start date.
required: false
type: string
format: date-time
- name: toDate
in: query
description: The end date.
required: false
type: string
format: date-time
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The metric sets for a given service.
schema:
$ref: '#/definitions/MetricSets'
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metrics Metricname Groups Groupname
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/average:
get:
tags:
- Metrics
description: Gets the average of the metric values for a given metric and group combination.
x-ms-examples:
services_listMetricsAverage:
$ref: ./examples/Metrics.json
operationId: microsoftAzureServicesListmetricsaverage
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- name: groupName
in: path
description: The group name
required: true
type: string
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The list of average metrics for a given service.
schema:
$ref: '#/definitions/Metrics'
x-ms-pageable:
nextLinkName: nextLink
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metrics Metricname Groups Groupname Average
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/sum:
get:
tags:
- Metrics
description: Gets the sum of the metric values for a given metric and group combination.
x-ms-examples:
services_listMetricsSum:
$ref: ./examples/Metrics.json
operationId: microsoftAzureServicesListmetricssum
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- name: groupName
in: path
description: The group name
required: true
type: string
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The list of metrics for a given service.
schema:
$ref: '#/definitions/Metrics'
x-ms-pageable:
nextLinkName: nextLink
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metrics Metricname Groups Groupname Sum
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata:
get:
tags:
- Metrics
description: Gets the service related metrics information.
x-ms-examples:
services_listMetricMetadata:
$ref: ./examples/MetricMetadataList.json
operationId: microsoftAzureServicesListmetricmetadata
parameters:
- name: $filter
in: query
description: The metric metadata property filter to apply.
required: false
type: string
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: perfCounter
in: query
description: Indicates if only performance counter metrics are requested.
required: false
type: boolean
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The list of metric metadata for a given service.
schema:
$ref: '#/definitions/MetricMetadataList'
x-ms-pageable:
nextLinkName: nextLink
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metricmetadata
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}:
get:
tags:
- Metrics
description: Gets the service related metrics information.
x-ms-examples:
services_getMetricMetadata:
$ref: ./examples/MetricMetadata.json
operationId: microsoftAzureServicesGetmetricmetadata
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The metric metadata for a given metric.
schema:
$ref: '#/definitions/MetricMetadata'
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metricmetadata Metricname
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}/groups/{groupName}:
get:
tags:
- Metrics
description: Gets the service related metrics for a given metric and group combination.
x-ms-examples:
services_getMetricMetadataForGroup:
$ref: ./examples/MetricSets.json
operationId: microsoftAzureServicesGetmetricmetadataforgroup
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- name: groupName
in: path
description: The group name
required: true
type: string
- name: groupKey
in: query
description: The group key
required: false
type: string
- name: fromDate
in: query
description: The start date.
required: false
type: string
format: date-time
- name: toDate
in: query
description: The end date.
required: false
type: string
format: date-time
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The metric sets for a given service and group.
schema:
$ref: '#/definitions/MetricSets'
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Metricmetadata Metricname Groups Groupname
? /providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}/groups/{groupName}
: get:
tags:
- Metrics
description: Gets the server related metrics for a given metric and group combination.
x-ms-examples:
serviceMembers_getMetrics:
$ref: ./examples/Server_MetricSets.json
operationId: microsoftAzureServicemembersGetmetrics
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: metricName
in: path
description: The metric name
required: true
type: string
- name: groupName
in: path
description: The group name
required: true
type: string
- name: serviceMemberId
in: path
description: The server id.
required: true
type: string
format: uuid
- name: groupKey
in: query
description: The group key
required: false
type: string
- name: fromDate
in: query
description: The start date.
required: false
type: string
format: date-time
- name: toDate
in: query
description: The end date.
required: false
type: string
format: date-time
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: The list of metric sets for a given metric.
schema:
$ref: '#/definitions/MetricSets'
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Servicemembers Servicememberid Metrics Metricname Groups Groupname
/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}:
get:
tags:
- Metrics
description: Gets the list of connectors and run profile names.
x-ms-examples:
serviceMembers_getConnectorMetadata:
$ref: ./examples/ConnectorMetadata.json
operationId: microsoftAzureServicemembersGetconnectormetadata
parameters:
- name: serviceName
in: path
description: The name of the service.
required: true
type: string
- name: serviceMemberId
in: path
description: The service member id.
required: true
type: string
format: uuid
- name: metricName
in: path
description: The name of the metric.
required: true
type: string
- $ref: '#/parameters/apiVersionParameter'
responses:
'200':
description: Gets the list of connectors and run profile names for the given service and service member.
schema:
$ref: '#/definitions/ConnectorMetadata'
summary: Microsoft Azure Get Providers Microsoft Adhybridhealthservice Services Servicename Servicemembers Servicememberid Metrics Metricname
? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProvider}/{resourceTypeName}/{resourceName}/metrics
: post:
tags:
- Metrics
operationId: microsoftAzureMetricsCreate
description: '**Post the metric values for a resource**.'
consumes:
- application/json
produces:
- application/json
parameters:
- in: header
name: Content-Type
description: Supports application/json and application/x-ndjson
required: true
type: string
- in: header
name: Content-Length
description: Content length of the payload
type: integer
required: true
format: int32
- in: header
name: Authorization
description: Authorization token issue for issued for audience "https:\\monitoring.azure.com\"
required: true
type: string
- in: path
name: subscriptionId
description: The azure subscription id
required: true
type: string
- in: path
name: resourceGroupName
description: The ARM resource group name
required: true
type: string
- in: path
name: resourceProvider
description: The ARM resource provider name
required: true
type: string
- in: path
name: resourceTypeName
description: The ARM resource type name
required: true
type: string
- in: path
name: resourceName
description: The ARM resource name
required: true
type: string
- in: body
name: body
description: The Azure metrics document json payload
required: true
schema:
$ref: '#/definitions/AzureMetricsDocument'
responses:
'200':
description: The azure metrics publish succeeded
schema:
$ref: '#/definitions/AzureMetricsResult'
default:
description: An unexpected error from the server. See response object for the reason
schema:
$ref: '#/definitions/AzureMetricsResult'
x-ms-examples:
Post azure metrics for cows sold with related metadata as dimensions:
$ref: ./examples/AzureMetrics_IngestMetrics.json
summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Resourceprovider Resourcetypename Resourcename Metrics
/subscriptions/{subscriptionId}/metrics:getBatch:
post:
tags:
- Metrics
operationId: microsoftAzureMetricsbatchBatch
description: Lists the metric values for multiple resources.
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/StartTimeParameter'
- $ref: '#/parameters/EndTimeParameter'
- $ref: '#/parameters/IntervalParameter'
- $ref: '#/parameters/MetricNamespaceParameter'
- $ref: '#/parameters/MetricNamesParameter'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/AggregationsParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/TopParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/OrderByParameter
- $ref: '#/parameters/FilterParameter'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RollUpByParameter
- $ref: '#/parameters/ApiVersionParameter'
- name: batchRequest
in: body
required: true
description: Metrics batch body including the list of resource ids
schema:
$ref: '#/definitions/ResourceIdList'
responses:
'200':
description: The response to a metrics query.
schema:
$ref: '#/definitions/MetricResultsResponse'
default:
description: Describes the format of Error response.
headers:
x-ms-error-code:
type: string
description: Error code for specific error that occurred.
schema:
$ref: ../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
x-ms-examples:
Query Storage Metrics:
$ref: ./examples/MetricBatchExample.json
Query Redis Metrics summary:
$ref: ./examples/MetricBatchExample2.json
summary: Microsoft Azure Post Subscriptions Subscriptionid Metrics:getbatch
/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metrics:
get:
tags:
- Metrics
operationId: microsoftAzureMetricsListatsubscriptionscope
description: '**Lists the metric data for a subscription**.'
parameters:
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RegionParameter
- $ref: '#/parameters/TimespanParameter'
- $ref: '#/parameters/IntervalParameter_2'
- $ref: '#/parameters/MetricNamesParameter_2'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/AggregationsParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/TopParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/OrderByParameter
- $ref: '#/parameters/FilterParameter_2'
- $ref: '#/parameters/SubscriptionScopeResultTypeParameter'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/MetricNamespaceParameter
- $ref: '#/parameters/AutoAdjustTimegrain'
- $ref: '#/parameters/ValidateDimensions'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RollUpByParameter
responses:
'200':
description: Successful request to get the list of metric values.
schema:
$ref: '#/definitions/Response'
default:
description: Error response describing why the operation failed.
schema:
$ref: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/ErrorContract
x-ms-odata: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/MetadataValue
x-ms-examples:
Get subscription level metric data:
$ref: ./examples/GetMultiResourceMetric.json
Get subscription level metric metadata:
$ref: ./examples/GetMultiResourceMetricMetadata.json
summary: Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Insights Metrics
post:
tags:
- Metrics
operationId: microsoftAzureMetricsListatsubscriptionscopepost
description: '**Lists the metric data for a subscription**. Parameters can be specified on either query params or the body.'
parameters:
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RegionParameter
- $ref: '#/parameters/TimespanParameter'
- $ref: '#/parameters/IntervalParameter_2'
- $ref: '#/parameters/MetricNamesParameter_2'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/AggregationsParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/TopParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/OrderByParameter
- $ref: '#/parameters/FilterParameter_2'
- $ref: '#/parameters/SubscriptionScopeResultTypeParameter'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/MetricNamespaceParameter
- $ref: '#/parameters/AutoAdjustTimegrain'
- $ref: '#/parameters/ValidateDimensions'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RollUpByParameter
- in: body
name: body
description: Parameters serialized in the body
schema:
$ref: '#/definitions/SubscriptionScopeMetricsRequestBodyParameters'
responses:
'200':
description: Successful request to get the list of metric values.
schema:
$ref: '#/definitions/Response'
default:
description: Error response describing why the operation failed.
schema:
$ref: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/ErrorContract
x-ms-odata: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/MetadataValue
x-ms-examples:
Post request for subscription level metric data:
$ref: ./examples/GetMultiResourceMetric.json
Post request for subscription level metric data using body params:
$ref: ./examples/PostMultiResourceMetricBody.json
Post request for subscription level metric metadata:
$ref: ./examples/GetMultiResourceMetricMetadata.json
summary: Microsoft Azure Post Subscriptions Subscriptionid Providers Microsoft Insights Metrics
/{resourceUri}/providers/Microsoft.Insights/metrics:
get:
tags:
- Metrics
operationId: microsoftAzureMetricsList
description: '**Lists the metric values for a resource**.'
parameters:
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/ResourceUriParameter
- $ref: '#/parameters/TimespanParameter'
- $ref: '#/parameters/IntervalParameter_2'
- $ref: '#/parameters/MetricNamesParameter_2'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/AggregationsParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/TopParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/OrderByParameter
- $ref: '#/parameters/FilterParameter_2'
- $ref: '#/parameters/ResultTypeParameter'
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/MetricNamespaceParameter
- $ref: '#/parameters/AutoAdjustTimegrain'
- $ref: '#/parameters/ValidateDimensions'
- $ref: ../../../../common-types/v2/commonMonitoringTypes.json#/parameters/RollUpByParameter
responses:
'200':
description: Successful request to get the list of metric values.
schema:
$ref: '#/definitions/Response'
default:
description: Error response describing why the operation failed.
schema:
$ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse
x-ms-odata: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/MetadataValue
x-ms-examples:
Get Metric for data:
$ref: ./examples/GetMetric.json
Get Metric for metadata:
$ref: ./examples/GetMetricMetadata.json
Get Metric with error:
$ref: ./examples/GetMetricError.json
summary: Microsoft Azure Get Resourceuri Providers Microsoft Insights Metrics
/{resourceUri}/providers/microsoft.insights/metrics:
get:
tags:
- Metrics
operationId: microsoftAzureMetricsList
description: Lists the metric values for a resource.
parameters:
- $ref: ./serviceDiagnosticsSettings_API.json#/parameters/ResourceUriParameter
- name: $filter
in: query
type: string
description: 'Reduces the set of data collected.
The filter is optional. If present it must contain a list of metric names to retrieve of the form: *(name.value eq ''metricName'' [or name.value eq ''metricName'' or ...])*. Optionally, the filter can contain conditions for the following attributes *aggregationType*, *startTime*, *endTime*, and *timeGrain* of the form *attributeName operator value*. Where operator is one of *ne*, *eq*, *gt*, *lt*.
Several conditions can be combined with parentheses and logical operators, e.g: *and*, *or*.
Some example filter expressions are:
- $filter=(name.value eq ''RunsSucceeded'') and aggregationType eq ''Total'' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration''PT1M'',
- $filter=(name.value eq ''RunsSucceeded'') and (aggregationType eq ''Total'' or aggregationType eq ''Average'') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration''PT1H'',
- $filter=(name.value eq ''ActionsCompleted'' or name.value eq ''RunsSucceeded'') and (aggregationType eq ''Total'' or aggregationType eq ''Average'') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration''PT1M''.
**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.'
required: false
- $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
responses:
'200':
description: Successful request to get the list of metric values
schema:
$ref: '#/definitions/MetricCollection'
examples:
application/json:
value:
- data:
- timeStamp: '2016-11-23T19:14:00Z'
total: 1
- timeStamp: '2016-11-23T19:15:00Z'
- timeStamp: '2016-11-23T19:16:00Z'
- timeStamp: '2016-11-23T19:17:00Z'
- timeStamp: '2016-11-23T19:18:00Z'
- timeStamp: '2016-11-23T19:19:00Z'
total: 1
- timeStamp: '2016-11-23T19:20:00Z'
- timeStamp: '2016-11-23T19:21:00Z'
- timeStamp: '2016-11-23T19:22:00Z'
- timeStamp: '2016-11-23T19:23:00Z'
- timeStamp: '2016-11-23T19:24:00Z'
total: 1
id: /subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metrics/RunsStarted
name:
value: RunsStarted
localizedValue: Runs Started
type: Microsoft.Insights/metrics
unit: Count
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-pageable:
nextLinkName: null
x-ms-odata: '#/definitions/Metric'
x-ms-examples:
Get Metric without filter:
$ref: ./examples/GetMetric.json
Get Metric with filter:
$ref: ./examples/GetMetricFiltered.json
summary: Microsoft Azure Get Resourceuri Providers Microsoft Insights Metrics
definitions:
Response:
type: object
description: The response to a metrics query.
properties:
cost:
type: number
format: int32
minimum: 0
description: The integer value representing the relative cost of the query.
timespan:
type: string
description: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
interval:
type: string
description: "The interval (window size) for which the metric data was returned in ISO 8601 duration format with a special case for 'FULL' value that returns single datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, FULL*). \nThis may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified. This is not present if a metadata request was made."
namespace:
type: string
description: The namespace of the metrics being queried
resourceregion:
type: string
description: The region of the resource being queried for metrics.
value:
type: array
items:
$ref: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/Metric
description: The value of the collection.
required:
- timespan
- value
MetricGroup:
description: ' The metric group details.'
type: object
properties:
key:
description: The key for the group.
type: string
displayName:
description: The display name for the group.
type: string
invisibleForUi:
description: indicates if the metric group is displayed in Azure Active Directory Connect Health UI.
type: boolean
AzureMetricsData:
type: object
properties:
baseData:
$ref: '#/definitions/AzureMetricsBaseData'
required:
- baseData
MetricValue:
required:
- timeStamp
properties:
timeStamp:
type: string
format: date-time
description: the timestamp for the metric value in ISO 8601 format.
average:
type: number
format: double
description: the average value in the time range.
minimum:
type: number
format: double
description: the least value in the time range.
maximum:
type: number
format: double
description: the greatest value in the time range.
total:
type: number
format: double
description: the sum of all of the values in the time range.
count:
type: integer
format: int64
description: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
description: Represents a metric value.
MetricMetadataList:
description: The list of metric metadata.
type: object
properties:
nextLink:
description: The link used to get the next page of operations.
type: string
value:
description: The value returned by the operation.
type: array
items:
$ref: '#/definitions/MetricMetadata'
totalCount:
description: The total count of service elements.
type: integer
continuationToken:
description: The continuation token for paginated calls.
type: string
MetricResultsResponse:
description: The metrics result for a resource.
type: object
properties:
values:
description: The collection of metric data responses per resource, per metric.
type: array
items:
type: object
properties:
starttime:
type: string
description: The start time, in datetime format, for which the data was retrieved.
endtime:
type: string
description: The end time, in datetime format, for which the data was retrieved.
interval:
type: string
description: "The interval (window size) for which the metric data was returned in ISO 8601 duration format with a special case for 'FULL' value that returns single datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, FULL*). \nThis may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified."
namespace:
type: string
description: The namespace of the metrics been queried
resourceregion:
type: string
description: The region of the resource been queried for metrics.
resourceid:
type: string
description: The resource that has been queried for metrics.
value:
type: array
items:
$ref: ../../../../common-types/v2/commonMonitoringTypes.json#/definitions/Metric
description: The value of the collection.
required:
- starttime
- endtime
- value
MetricSet:
description: ' The set of metric values. Example of a MetricSet are Values of token requests for a Server1 or RelyingParty1.'
type: object
properties:
setName:
description: The name of the set.
type: string
values:
description: The list of the metric values.
type: array
items:
type: integer
SubscriptionScopeMetricsRequestBodyParameters:
description: Query parameters can also be specified in the body, specifying the same parameter in both the body and query parameters will result in an error.
type: object
properties:
timespan:
description: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
type: string
interval:
description: 'The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for ''FULL'' value that returns single datapoint for entire time span requested.
*Examples: PT15M, PT1H, P1D, FULL*'
type: string
metricNames:
description: The names of the metrics (comma separated) to retrieve.
type: string
aggregation:
description: The list of aggregation types (comma separated) to retrieve.
type: string
filter:
description: The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
type: string
top:
description: 'The maximum number of records to retrieve.
Valid only if $filter is specified.
Defaults to 10.'
type: integer
format: int32
orderBy:
description: 'The aggregation to use for sorting results and the direction of the sort.
Only one order can be specified.
Examples: sum asc.'
type: string
rollUpBy:
description: Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
type: string
resultType:
description: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.
type: string
enum:
- Data
- Metadata
x-ms-enum:
name: MetricResultType
modelAsString: true
metricNamespace:
description: Metric namespace where the metrics you want reside.
type: string
autoAdjustTimegrain:
description: When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.
type: boolean
validateDimensions:
description: When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.
type: boolean
Metric:
required:
- name
- unit
- data
properties:
id:
type: string
description: the id, resourceId, of the metric.
type:
type: string
description: the resource type of the metric resource.
name:
$ref: '#/definitions/LocalizableString'
description: the name and the display name of the metric, i.e. it is localizable string.
unit:
$ref: '#/definitions/Unit'
description: the unit of the metric.
data:
type: array
items:
$ref: '#/definitions/MetricValue'
description: Array of data points representing the metric values.
description: A set of metric values in a time range.
Unit:
type: string
description: The unit of the metric.
enum:
- Count
- Bytes
- Seconds
- CountPerSecond
- BytesPerSecond
- Percent
- MilliSeconds
- ByteSeconds
- Unspecified
- Cores
- MilliCores
- NanoCores
- BitsPerSecond
x-ms-enum:
name: Unit
modelAsString: false
AzureMetricsDocument:
type: object
properties:
time:
description: Gets or sets Time property (in ISO 8601 format)
type: string
data:
$ref: '#/definitions/AzureMetricsData'
required:
- time
- data
Item:
description: The key value pair for properties.
type: object
properties:
key:
description: The key for the property.
type: string
value:
description: The value for the key.
type: string
Metrics:
description: The list of metric items.
type: object
properties:
nextLink:
description: The link used to get the next page of operations.
type: string
value:
description: The value returned by the operation.
type: array
items:
$ref: '#/definitions/Item'
totalCount:
description: The total count of metrics.
type: integer
continuationToken:
description: The continuation token for paginated calls.
type: string
ResourceIdList:
description: The comma separated list of resource IDs to query metrics for.
type: object
properties:
resourceids:
description: The list of resource IDs to query metrics for.
type: array
items:
type: string
format: arm-id
example:
resourceids:
- /subscriptions/123456728-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1
- /subscriptions/123456728-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2
ConnectorMetadataDetails:
description: Details of the connector.
type: object
properties:
connectorId:
description: The Connector Id.
type: string
connectorDisplayName:
description: The Connector Display Name
type: string
MetricSets:
description: The metrics data represented set.
type: object
properties:
sets:
description: The list of metric set.
type: array
items:
$ref: '#/definitions/MetricSet'
timeStamps:
description: The list of timestamps for each metric in the metric set.
type: array
items:
type: string
format: date-time
MetricMetadata:
description: The metric meta data
type: object
properties:
metricsProcessorClassName:
description: The name of the class which retrieve and process the metric.
type: string
metricName:
description: The metric name
type: string
groupings:
description: The groupings for the metrics.
type: array
items:
$ref: '#/definitions/MetricGroup'
displayName:
description: The display name for the metric.
type: string
valueKind:
description: Indicates if the metrics is a rate,value, percent or duration type.
type: string
minValue:
description: The minimum value.
type: integer
maxValue:
description: The maximum value.
type: integer
kind:
description: Indicates whether the dashboard to represent the metric is a line, bar,pie, area or donut chart.
type: string
isDefault:
description: Indicates if the metric is a default metric or not.
type: boolean
isPerfCounter:
description: Indicates if the metric is a performance counter metric or not.
type: boolean
isDevOps:
description: Indicates if the metric is visible to DevOps or not.
type: boolean
ApiFailureResponse:
type: object
properties:
error:
$ref: '#/definitions/ApiError'
LocalizableString:
required:
- value
properties:
value:
type: string
description: the invariant value.
localizedValue:
type: string
description: the locale specific value.
description: The localizable string class.
ErrorResponse:
description: Describes the format of Error response.
type: object
properties:
code:
description: Error code
type: string
message:
description: Error message indicating why the operation failed.
type: string
ConnectorMetadata:
description: Gets the list of connectors and run profile names.
type: object
properties:
connectors:
description: The list of connectors.
type: array
items:
$ref: '#/definitions/ConnectorMetadataDetails'
runProfileNames:
description: The list of run profile names.
type: array
items:
type: string
AzureMetricsBaseData:
type: object
properties:
metric:
description: Gets or sets the Metric name
type: string
namespace:
description: Gets or sets the Metric namespace
type: string
dimNames:
description: Gets or sets the list of dimension names (optional)
type: array
items:
type: string
series:
description: Gets or sets the list of time series data for the metric (one per unique dimension combination)
type: array
items:
$ref: '#/definitions/AzureTimeSeriesData'
required:
- metric
- namespace
- series
MetricCollection:
properties:
value:
type: array
items:
$ref: '#/definitions/Metric'
description: the value of the collection.
required:
- value
description: The collection of metric value sets.
ApiError:
type: object
properties:
code:
description: Gets or sets the azure metrics error code
type: string
message:
description: Gets or sets the azure metrics error message
type: string
AzureTimeSeriesData:
type: object
properties:
dimValues:
description: Gets or sets dimension values
type: array
items:
type: string
min:
format: double
description: Gets or sets Min value
type: number
max:
format: double
description: Gets or sets Max value
type: number
sum:
format: double
description: Gets or sets Sum value
type: number
count:
format: int32
description: Gets or sets Count value
type: integer
required:
- min
- max
- sum
- count
AzureMetricsResult:
type: object
properties:
statusCode:
format: int32
description: 'Http status code response '
type: integer
apiFailureResponse:
$ref: '#/definitions/ApiFailureResponse'
parameters:
MetricNamespaceParameter:
name: metricnamespace
in: query
required: true
type: string
description: Metric namespace that contains the requested metric names.
x-ms-parameter-location: method
ResultTypeParameter:
name: resultType
in: query
type: string
enum:
- Data
- Metadata
x-ms-enum:
name: ResultType
modelAsString: false
description: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.
x-ms-parameter-location: method
required: false
ApiVersionParameter:
name: api-version
in: query
required: true
type: string
description: Client Api Version.
x-ms-parameter-location: client
FilterParameter_2:
name: $filter
in: query
type: string
description: The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
required: false
x-ms-parameter-location: method
ValidateDimensions:
name: ValidateDimensions
in: query
required: false
type: boolean
description: When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.
x-ms-parameter-location: method
FilterParameter:
name: filter
in: query
required: false
type: string
description: The filter is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
x-ms-parameter-location: method
IntervalParameter_2:
name: interval
in: query
required: false
type: string
description: 'The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for ''FULL'' value that returns single datapoint for entire time span requested.
*Examples: PT15M, PT1H, P1D, FULL*'
x-ms-parameter-location: method
SubscriptionIdParameter:
name: subscriptionId
in: path
required: true
type: string
format: uuid
description: The subscription identifier for the resources in this batch.
x-ms-parameter-location: method
TimespanParameter:
name: timespan
in: query
required: false
type: string
description: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
x-ms-parameter-location: method
MetricNamesParameter_2:
name: metricnames
in: query
required: false
type: string
description: The names of the metrics (comma separated) to retrieve.
x-ms-parameter-location: method
apiVersionParameter:
name: api-version
in: query
description: The version of the API to be used with the client request.
required: true
type: string
MetricNamesParameter:
name: metricnames
in: query
required: true
type: array
items:
type: string
collectionFormat: csv
description: The names of the metrics (comma separated) to retrieve.
x-ms-parameter-location: method
IntervalParameter:
name: interval
in: query
required: false
type: string
default: PT1M
description: 'The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for ''FULL'' value that returns single datapoint for entire time span requested.
*Examples: PT15M, PT1H, P1D, FULL*'
x-ms-parameter-location: method
AutoAdjustTimegrain:
name: AutoAdjustTimegrain
in: query
required: false
type: boolean
description: When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.
x-ms-parameter-location: method
StartTimeParameter:
name: starttime
in: query
required: false
type: string
description: 'The start time of the query. It is a string in the format ''yyyy-MM-ddTHH:mm:ss.fffZ''. If you have specified the endtime parameter, then this parameter is required.
If only starttime is specified, then endtime defaults to the current time.
If no time interval is specified, the default is 1 hour.'
x-ms-parameter-location: method
EndTimeParameter:
name: endtime
in: query
required: false
type: string
description: The end time of the query. It is a string in the format 'yyyy-MM-ddTHH:mm:ss.fffZ'.
x-ms-parameter-location: method
SubscriptionScopeResultTypeParameter:
name: resultType
in: query
type: string
enum:
- Data
- Metadata
x-ms-enum:
name: MetricResultType
modelAsString: true
description: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.
x-ms-parameter-location: method
required: false
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'