Skip to content

Commit 55149d9

Browse files
committed
fixes2
1 parent 87eccd1 commit 55149d9

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

[!NOTE]

Whitespace-only changes.

[!NOTE]git

Whitespace-only changes.

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ Retrieve metric definitions, dimension values, and metric values using the Azure
1616

1717
## Authenticate Azure Monitor requests
1818

19-
Request submitted using the Azure Monitor API use the Azure Resource Manager authentication model. All requests are authenticated with Azure Active Directory. One approach to authenticating the client application is to create an Azure Active Directory service principal and retrieve the authentication token. See
20-
21-
## Create an Azure Active Directory service principal
22-
23-
You can create an Azure Active Directory service principal using the Azure portal, CLI, or PowerShell. For more information, see [Register an App to request authorization tokens and work with APIs](../logs/api/register-app-for-token)
24-
19+
Request submitted using the Azure Monitor API use the Azure Resource Manager authentication model. All requests are authenticated with Azure Active Directory. One approach to authenticating the client application is to create an Azure Active Directory service principal and retrieve an authentication token. You can create an Azure Active Directory service principal using the Azure portal, CLI, or PowerShell. For more information, see [Register an App to request authorization tokens and work with APIs](../logs/api/register-app-for-token)
2520

2621
## Retrieve a token
2722
Once you've created a service principal, retrieve an access token using a REST call. Submit the following request using the `appId` and `password` for your service principal or app:
@@ -194,7 +189,7 @@ In this example, only the second metric has dimensions.
194189

195190
After the retrieving the available metric definitions, retrieve the range of values for the metric's dimensions. Use dimension values to filter or segment the metrics in your queries. Use the [Azure Monitor Metrics REST API](/rest/api/monitor/metrics) to find all of the values for a given metric dimension.
196191

197-
Use the metric's `name.value` element for filtering requests. If no filters are specified, the default metric is returned. The API only allows one dimension to have a wildcard filter.
192+
Use the metric's `name.value` element in the filter definitions. If no filters are specified, the default metric is returned. The API only allows one dimension to have a wildcard filter.
198193
Specify the request for dimension values using the `"resultType=metadata"` query parameter. The `resultType` is omitted for a metric values request.
199194

200195
> [!NOTE]
@@ -214,7 +209,7 @@ Host: management.azure.com
214209
Content-Type: application/json
215210
Authorization: Bearer <access token>
216211
```
217-
For example, to retrieve the list of dimension values that were emitted for the `API Name` dimension for the `Transactions` metric, where the GeoType dimension = `Primary` during the specified time range, the request would be:
212+
The following example retrieves the list of dimension values that were emitted for the `API Name` dimension of the `Transactions` metric, where the `GeoType` dimension has a value of `Primary`, for the specified time range.
218213

219214
```curl
220215
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 \
@@ -274,9 +269,9 @@ The following JSON shows an example response body.
274269

275270
## Retrieve metric values
276271

277-
After the available metric definitions and dimension values are known, you can then retrieve the metric values. Use the [Azure Monitor Metrics REST API](/rest/api/monitor/metrics) to retrieve the metric values.
272+
After retrieving the metric definitions and dimension values, retrieve the metric values. Use the [Azure Monitor Metrics REST API](/rest/api/monitor/metrics) to retrieve the metric values.
278273

279-
Use the metric's `name.value` element (not `localizedValue`) for any filtering requests. If no dimension filters are specified, the rolled up, aggregated metric is returned.
274+
Use the metric's `name.value` element in the filter definitions. If no dimension filters are specified, the rolled up, aggregated metric is returned.
280275

281276
To fetch multiple time series with specific dimension values, specify a filter query parameter that specifies both dimension values such as `"&$filter=ApiName eq 'ListContainers' or ApiName eq 'GetBlobServiceProperties'"`.
282277

@@ -295,7 +290,7 @@ Content-Type: application/json
295290
Authorization: Bearer <access token>
296291
```
297292

298-
For example, to retrieve the top three APIs, in descending value, by the number of `Transactions` during a 5-minute range, where the GeoType was `Primary`, the request would be:
293+
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 is `Primary`.
299294

300295
```curl
301296
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 \
@@ -482,6 +477,8 @@ The result should be similar to the following example:
482477

483478
Use the Azure Monitor REST API to query [activity log](/rest/api/monitor/activitylogs) data.
484479

480+
Use the following request format for activity log queries.
481+
485482
```curl
486483
GET /subscriptions/<subscriptionId>/providers/Microsoft.Insights/eventtypes/management/values \
487484
?api-version=2015-04-01 \

0 commit comments

Comments
 (0)