UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 12.7 kB
{"openapi":"3.0.0","info":{"title":"MonitorManagementClient","version":"2018-01-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-ms-code-generation-settings":{"name":"MonitorManagementClient"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"monitor-metrics_API","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/{resourceUri}/providers/microsoft.insights/metrics":{"get":{"description":"**Lists the metric values for a resource**.","operationId":"Metrics_List","parameters":[{"$ref":"#/components/parameters/ResourceUriParameter"},{"$ref":"#/components/parameters/TimespanParameter"},{"$ref":"#/components/parameters/IntervalParameter"},{"$ref":"#/components/parameters/MetricNamesParameter"},{"$ref":"#/components/parameters/AggregationsParameter"},{"$ref":"#/components/parameters/TopParameter"},{"$ref":"#/components/parameters/OrderByParameter"},{"description":"The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.","in":"query","name":"$filter","required":false,"schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"BlobType eq '*'"},"Get Metric for metadata":{"value":"BlobType eq '*'"}}},{"$ref":"#/components/parameters/ResultTypeParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/MetricNamespaceParameter"}],"responses":{"200":{"description":"Successful request to get the list of metric values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"},"examples":{"Get Metric for data":{"$ref":"#/components/examples/Get_Metric_for_data"},"Get Metric for metadata":{"$ref":"#/components/examples/Get_Metric_for_metadata"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Metrics"],"x-ms-odata":"#/components/schemas/MetadataValue"}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"Get_Metric_for_data":{"value":{"cost":0,"interval":"PT1M","namespace":"Microsoft.Storage/storageAccounts/blobServices","resourceregion":"eastus2","timespan":"2017-04-14T02:20:00Z/2017-04-14T04:20:00Z","value":[{"id":"/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity","name":{"localizedValue":"Blob Capacity","value":"BlobCapacity"},"timeseries":[{"data":[{"count":0,"timeStamp":"2017-04-14T02:20:00Z"},{"count":0,"timeStamp":"2017-04-14T02:21:00Z"},{"count":0,"timeStamp":"2017-04-14T02:22:00Z"},{"average":0,"count":1,"timeStamp":"2017-04-14T02:23:00Z"}],"metadatavalues":[{"name":{"localizedValue":"blobtype","value":"blobtype"},"value":"PageBlob"}]},{"data":[{"count":0,"timeStamp":"2017-04-14T02:20:00Z"},{"count":0,"timeStamp":"2017-04-14T02:21:00Z"},{"count":0,"timeStamp":"2017-04-14T02:22:00Z"},{"average":245,"count":1,"timeStamp":"2017-04-14T02:23:00Z"}],"metadatavalues":[{"name":{"localizedValue":"blobtype","value":"blobtype"},"value":"BlockBlob"}]}],"type":"Microsoft.Insights/metrics","unit":"Bytes"}]}},"Get_Metric_for_metadata":{"value":{"namespace":"Microsoft.Storage/storageAccounts/blobServices","resourceregion":"eastus2","timespan":"2017-04-14T02:20:00Z/2017-04-14T04:20:00Z","value":[{"id":"/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity","name":{"localizedValue":"Blob Capacity","value":"BlobCapacity"},"timeseries":[{"metadatavalues":[{"name":{"localizedValue":"blobtype","value":"blobtype"},"value":"BlockBlob"}]},{"metadatavalues":[{"name":{"localizedValue":"blobtype","value":"blobtype"},"value":"PageBlob"}]}],"type":"Microsoft.Insights/metrics","unit":"Bytes"}]}}},"parameters":{"AggregationsParameter":{"description":"The list of aggregation types (comma separated) to retrieve.","in":"query","name":"aggregation","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"Average,count"},"Get Metric for metadata":{"value":"Average,count"}}},"ApiVersionParameter":{"description":"Client Api Version.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"2018-01-01"},"Get Metric for metadata":{"value":"2018-01-01"}}},"IntervalParameter":{"description":"The interval (i.e. timegrain) of the query.","in":"query","name":"interval","required":false,"x-ms-parameter-location":"method","schema":{"type":"string","format":"duration"},"examples":{"Get Metric for data":{"value":"PT1M"},"Get Metric for metadata":{"value":"PT1M"}}},"MetricNamesParameter":{"description":"The names of the metrics (comma separated) to retrieve.","in":"query","name":"metricnames","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"}},"MetricNamespaceParameter":{"description":"Metric namespace to query metric definitions for.","in":"query","name":"metricnamespace","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"Microsoft.Storage/storageAccounts/blobServices"},"Get Metric for metadata":{"value":"Microsoft.Storage/storageAccounts/blobServices"}}},"OrderByParameter":{"description":"The aggregation to use for sorting results and the direction of the sort.\nOnly one order can be specified.\nExamples: sum asc.","in":"query","name":"orderby","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"Average asc"},"Get Metric for metadata":{"value":"Average asc"}}},"ResourceUriParameter":{"description":"The identifier of the resource.","in":"path","name":"resourceUri","required":true,"x-ms-parameter-location":"method","x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"},"Get Metric for metadata":{"value":"subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"}}},"ResultTypeParameter":{"description":"Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.","in":"query","name":"resultType","required":false,"x-ms-enum":{"modelAsString":false,"name":"ResultType"},"x-ms-parameter-location":"method","schema":{"type":"string","enum":["Data","Metadata"]}},"TimespanParameter":{"description":"The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.","in":"query","name":"timespan","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get Metric for data":{"value":"2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"},"Get Metric for metadata":{"value":"2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"}}},"TopParameter":{"description":"The maximum number of records to retrieve.\nValid only if $filter is specified.\nDefaults to 10.","in":"query","name":"top","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer","format":"int32"},"examples":{"Get Metric for data":{"value":3},"Get Metric for metadata":{"value":3}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"ErrorResponse":{"description":"Describes the format of Error response.","properties":{"code":{"description":"Error code","type":"string"},"message":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"LocalizableString":{"description":"The localizable string class.","properties":{"localizedValue":{"description":"the locale specific value.","type":"string"},"value":{"description":"the invariant value.","type":"string"}},"required":["value"]},"MetadataValue":{"description":"Represents a metric metadata value.","properties":{"name":{"$ref":"#/components/schemas/LocalizableString"},"value":{"description":"the value of the metadata.","type":"string"}}},"Metric":{"description":"The result data of a query.","properties":{"id":{"description":"the metric Id.","type":"string"},"name":{"$ref":"#/components/schemas/LocalizableString"},"timeseries":{"description":"the time series returned when a data query is performed.","items":{"$ref":"#/components/schemas/TimeSeriesElement"},"type":"array"},"type":{"description":"the resource type of the metric resource.","type":"string"},"unit":{"$ref":"#/components/schemas/Unit"}},"required":["id","type","name","unit","timeseries"],"type":"object"},"MetricValue":{"description":"Represents a metric value.","properties":{"average":{"description":"the average value in the time range.","format":"double","type":"number"},"count":{"description":"the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.","format":"double","type":"number"},"maximum":{"description":"the greatest value in the time range.","format":"double","type":"number"},"minimum":{"description":"the least value in the time range.","format":"double","type":"number"},"timeStamp":{"description":"the timestamp for the metric value in ISO 8601 format.","format":"date-time","type":"string"},"total":{"description":"the sum of all of the values in the time range.","format":"double","type":"number"}},"required":["timeStamp"]},"Response":{"description":"The response to a metrics query.","properties":{"cost":{"description":"The integer value representing the cost of the query, for data case.","format":"int32","minimum":0,"type":"number"},"interval":{"description":"The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.","format":"duration","type":"string"},"namespace":{"description":"The namespace of the metrics been queried","type":"string"},"resourceregion":{"description":"The region of the resource been queried for metrics.","type":"string"},"timespan":{"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.","type":"string"},"value":{"description":"the value of the collection.","items":{"$ref":"#/components/schemas/Metric"},"type":"array"}},"required":["timespan","value"],"type":"object"},"TimeSeriesElement":{"description":"A time series result type. The discriminator value is always TimeSeries in this case.","properties":{"data":{"description":"An array of data points representing the metric values. This is only returned if a result type of data is specified.","items":{"$ref":"#/components/schemas/MetricValue"},"type":"array"},"metadatavalues":{"description":"the metadata values returned if $filter was specified in the call.","items":{"$ref":"#/components/schemas/MetadataValue"},"type":"array"}},"type":"object"},"Unit":{"description":"the unit of the metric.","enum":["Count","Bytes","Seconds","CountPerSecond","BytesPerSecond","Percent","MilliSeconds","ByteSeconds","Unspecified","Cores","MilliCores","NanoCores","BitsPerSecond"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"Unit"}}}}}