Log Analytics - Get Log Analytics Metrics
Get log report for AFD profile
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics?api-version=2025-04-15&metrics={metrics}&dateTimeBegin={dateTimeBegin}&dateTimeEnd={dateTimeEnd}&granularity={granularity}&customDomains={customDomains}&protocols={protocols}
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics?api-version=2025-04-15&metrics={metrics}&dateTimeBegin={dateTimeBegin}&dateTimeEnd={dateTimeEnd}&granularity={granularity}&groupBy={groupBy}&continents={continents}&countryOrRegions={countryOrRegions}&customDomains={customDomains}&protocols={protocols}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
profile
|
path | True |
string |
Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
Name of the Resource group within the Azure subscription. |
subscription
|
path | True |
string |
Azure Subscription ID. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Current version is 2025-04-15. |
custom
|
query | True |
string[] |
|
date
|
query | True |
string (date-time) |
|
date
|
query | True |
string (date-time) |
|
granularity
|
query | True | ||
metrics
|
query | True | ||
protocols
|
query | True |
string[] |
|
continents
|
query |
string[] |
||
country
|
query |
string[] |
||
group
|
query |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Describe the result of a successful operation. |
|
Other Status Codes |
Azure Front Door Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
LogAnalytics_GetLogAnalyticsMetrics
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/getLogAnalyticsMetrics?api-version=2025-04-15&metrics=clientRequestCount&dateTimeBegin=2020-11-04T04:30:00.000Z&dateTimeEnd=2020-11-04T05:00:00.000Z&granularity=PT5M&groupBy=protocol&customDomains=customdomain1.azurecdn.net&customDomains=customdomain2.azurecdn.net&protocols=https
Sample response
{
"dateTimeBegin": "2020-11-04T12:30:27.554+08:00",
"dateTimeEnd": "2020-11-04T13:00:27.554+08:00",
"granularity": "PT5M",
"series": [
{
"metric": "clientRequestCount",
"unit": "count",
"groups": [
{
"name": "protocol",
"value": "https"
}
],
"data": [
{
"dateTime": "2020-11-04T04:35:00+00:00",
"value": 4250
},
{
"dateTime": "2020-11-04T04:40:00+00:00",
"value": 3120
},
{
"dateTime": "2020-11-04T04:45:00+00:00",
"value": 2221
},
{
"dateTime": "2020-11-04T04:50:00+00:00",
"value": 2466
},
{
"dateTime": "2020-11-04T04:55:00+00:00",
"value": 2654
},
{
"dateTime": "2020-11-04T05:00:00+00:00",
"value": 3565
}
]
}
]
}
Definitions
Name | Description |
---|---|
Afd |
Error response |
Data | |
Error |
The resource management error additional info. |
Error |
The error detail. |
Groups | |
Log |
|
Log |
|
Log |
|
Metrics |
|
Metrics |
Metrics Response |
Metrics |
|
Series |
AfdErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
Data
Name | Type | Description |
---|---|---|
dateTime |
string (date-time) |
|
value |
number |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
Groups
Name | Type | Description |
---|---|---|
name |
string |
|
value |
string |
LogMetric
Value | Description |
---|---|
clientRequestCount | |
clientRequestTraffic | |
clientRequestBandwidth | |
originRequestTraffic | |
originRequestBandwidth | |
totalLatency |
LogMetricsGranularity
Value | Description |
---|---|
PT5M | |
PT1H | |
P1D |
LogMetricsGroupBy
Value | Description |
---|---|
httpStatusCode | |
protocol | |
cacheStatus | |
countryOrRegion | |
customDomain |
MetricsGranularity
Value | Description |
---|---|
PT5M | |
PT1H | |
P1D |
MetricsResponse
Metrics Response
Name | Type | Description |
---|---|---|
dateTimeBegin |
string (date-time) |
|
dateTimeEnd |
string (date-time) |
|
granularity | ||
series |
Series[] |
MetricsSeriesUnit
Value | Description |
---|---|
count | |
bytes | |
bitsPerSecond | |
milliSeconds |
Series
Name | Type | Description |
---|---|---|
data |
Data[] |
|
groups |
Groups[] |
|
metric |
string |
|
unit |