Skip to content

Commit 704e4e9

Browse files
committed
corrections
1 parent 0550d23 commit 704e4e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/azure-monitor/essentials/rest-api-walkthrough.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The result should be similar to the following example:
178178

179179
The API endpoints use the following pattern:
180180
`/<resource URI>/providers/microsoft.insights/<metrics|metricDefinitions>?api-version=<apiVersion>`
181-
The `resource URI` is comprised of the following:
181+
The `resource URI` is composed of the following components:
182182
`/subscriptions/<subscription id>/resourcegroups/<resourceGroupName>/providers/<resourceProviderNamespace>/<resourceType>/<resourceName>/`
183183

184184
> [!IMPORTANT]
@@ -409,7 +409,7 @@ Content-Type: application/json
409409
Authorization: Bearer <access token>
410410
```
411411

412-
The following example retrieves the top three APIs, by the number of `Transactions` in descending value order, during a 5-minute range, where the `GeoType` dimension has a value of `Primary`.
412+
The following example retrieves the top three APIs, by the number of `Transactions` in descending value order, during a 5-minute range, where the `GeoType` dimension has a value of `Primary`.
413413

414414
```curl
415415
curl --location --request GET 'https://management.azure.com/subscriptions/12345678-abcd-98765432-abcdef012345/resourceGroups/azmon-rest-api-walkthrough/providers/Microsoft.Storage/storageAccounts/ContosoStorage/providers/microsoft.insights/metrics \
@@ -494,12 +494,12 @@ There are some important differences between querying metrics for multiple and i
494494

495495
### Querying metrics for multiple resources examples
496496

497-
The following example shows an individual metricdefinitions request:
497+
The following example shows an individual metric definitions request:
498498
```
499499
GET https://management.azure.com/subscriptions/12345678-abcd-98765432-abcdef012345/resourceGroups/EASTUS-TESTING/providers/Microsoft.Compute/virtualMachines/TestVM1/providers/microsoft.insights/metricdefinitions?api-version=2021-05-01
500500
```
501501

502-
The following request shows the equivalent metricdefinitions request for multiple resources.
502+
The following request shows the equivalent metric definitions request for multiple resources.
503503
The only changes are the subscription path instead of a resource ID path, and the addition of `region` and `metricNamespace` query parameters.
504504
```
505505
GET https://management.azure.com/subscriptions/12345678-abcd-98765432-abcdef012345/providers/microsoft.insights/metricdefinitions?api-version=2021-05-01&region=eastus&metricNamespace=microsoft.compute/virtualmachines
@@ -514,7 +514,7 @@ Below is an equivalent metrics request for multiple resources:
514514
```
515515
GET https://management.azure.com/subscriptions/12345678-abcd-98765432-abcdef012345/providers/microsoft.Insights/metrics?timespan=2023-06-25T22:20:00.000Z/2023-06-26T22:25:00.000Z&interval=PT5M&metricnames=Percentage CPU&aggregation=average&api-version=2021-05-01&region=eastus&metricNamespace=microsoft.compute/virtualmachines&$filter=Microsoft.ResourceId eq '*'
516516
```
517-
Note that a `Microsoft.ResourceId eq '*'` filter is added for the multi resource metrics requests as well. The filter tells the API to return a separate time series per virtual machine resource in the subscription and region. Without the filter the API would return a single time series aggregating the average CPU for all VMs. The times series for each resource is differentiated by the `Microsoft.ResourceId` metadata value on each time series entry, as can be seen in the following sample return value.
517+
Note that a `Microsoft.ResourceId eq '*'` filter is added for the multi resource metrics requests as well. The filter tells the API to return a separate time series per virtual machine resource in the subscription and region. Without the filter the API would return a single time series aggregating the average CPU for all VMs. The times series for each resource is differentiated by the `Microsoft.ResourceId` metadata value on each time series entry, as can be seen in the following sample return value.
518518

519519
```JSON
520520
{
@@ -642,7 +642,7 @@ Note that a `Microsoft.ResourceId eq '*'` filter is added for the multi resourc
642642
### Troubleshooting querying metrics for multiple resources
643643

644644
+ No data returned can be due to the wrong region being specified:
645-
The multi resource APIs do not verify that any valid resources exist in the specified region and subscription combination. The only indicator that the region may be wrong is getting an empty time series data response. For example: `"timeseries": [],`
645+
The multi resource APIs don't verify that any valid resources exist in the specified region and subscription combination. The only indicator that the region may be wrong is getting an empty time series data response. For example: `"timeseries": [],`
646646
+ 401 authorization errors:
647647
The individual resource metrics APIs requires a user have the [Monitoring Reader](../../role-based-access-control/built-in-roles.md#monitoring-reader) permission on the resource being queried. Because the multi resource metrics APIs are subscription level APIs, users must have the [Monitoring Reader](../../role-based-access-control/built-in-roles.md#monitoring-reader) permission for the queried subscription to use the multi resource metrics APIs. Even if users have Monitoring Reader on all the resources in a subscription, the request fails if the user doesn't have Monitoring Reader on the subscription itself.
648648

0 commit comments

Comments
 (0)