Diagnostics - Execute Site Detector Slot
Description for Execute Detector
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute?api-version=2025-03-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute?startTime={startTime}&endTime={endTime}&timeGrain={timeGrain}&api-version=2025-03-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
detector
|
path | True |
string |
Detector Resource Name |
|
diagnostic
|
path | True |
string |
Category Name |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
Name of the resource group to which the resource belongs. |
|
site
|
path | True |
string |
Site Name |
|
slot
|
path | True |
string |
Slot Name |
|
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
|
api-version
|
query | True |
string |
API Version |
|
end
|
query |
string (date-time) |
End Time |
|
|
start
|
query |
string (date-time) |
Start Time |
|
|
time
|
query |
string pattern: PT[1-9][0-9]+[SMH] |
Time Grain |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
App Service error response. |
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
| Execute site detector |
| Execute site slot detector |
Execute site detector
Sample request
POST https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/Production/diagnostics/availability/detectors/sitecrashes/execute?api-version=2025-03-01
Sample response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/detectors/sitecrashes",
"name": "sitecrashes",
"properties": {
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"abnormalTimePeriods": [
{
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"solutions": []
}
]
}
}
Execute site slot detector
Sample request
POST https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/detectors/sitecrashes/execute?api-version=2025-03-01
Sample response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/detectors/sitecrashes",
"name": "sitecrashes",
"properties": {
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"abnormalTimePeriods": [
{
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"solutions": []
}
]
}
}
Definitions
| Name | Description |
|---|---|
|
Data |
Class representing data source used by the detectors |
|
Default |
App Service error response. |
| Details | |
|
Detector |
Class representing Abnormal Time Period detected. |
|
Detector |
Class representing detector definition |
|
Diagnostic |
Class representing Response from Diagnostic Detectors |
|
Diagnostic |
Class representing Diagnostic Metric |
|
Diagnostic |
Class representing Diagnostic Metric information |
| Error |
Error model. |
|
Issue |
Represents the type of the Detector |
|
Name |
Name value pair. |
|
Response |
|
| Solution |
Class Representing Solution for problems detected. |
|
Solution |
Type of Solution |
DataSource
Class representing data source used by the detectors
| Name | Type | Description |
|---|---|---|
| dataSourceUri |
Datasource Uri Links |
|
| instructions |
string[] |
Instructions if any for the data source |
DefaultErrorResponse
App Service error response.
| Name | Type | Description |
|---|---|---|
| error |
Error model. |
Details
| Name | Type | Description |
|---|---|---|
| code |
string |
Standardized string to programmatically identify the error. |
| message |
string |
Detailed error description and debugging information. |
| target |
string |
Detailed error description and debugging information. |
DetectorAbnormalTimePeriod
Class representing Abnormal Time Period detected.
| Name | Type | Description |
|---|---|---|
| endTime |
string (date-time) |
End time of the correlated event |
| message |
string |
Message describing the event |
| metaData |
Downtime metadata |
|
| priority |
number (double) |
Represents the rank of the Detector |
| solutions |
Solution[] |
List of proposed solutions |
| source |
string |
Represents the name of the Detector |
| startTime |
string (date-time) |
Start time of the correlated event |
| type |
Represents the type of the Detector |
DetectorDefinition
Class representing detector definition
| Name | Type | Description |
|---|---|---|
| description |
string |
Description of the detector |
| displayName |
string |
Display name of the detector |
| isEnabled |
boolean |
Flag representing whether detector is enabled or not. |
| rank |
number (double) |
Detector Rank |
DiagnosticDetectorResponse
Class representing Response from Diagnostic Detectors
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource Id. |
| kind |
string |
Kind of resource. |
| name |
string |
Resource Name. |
| properties.abnormalTimePeriods |
List of Correlated events found by the detector |
|
| properties.data |
Additional Data that detector wants to send. |
|
| properties.detectorDefinition |
Detector's definition |
|
| properties.endTime |
string (date-time) |
End time of the period |
| properties.issueDetected |
boolean |
Flag representing Issue was detected. |
| properties.metrics |
Metrics provided by the detector |
|
| properties.responseMetaData |
Meta Data |
|
| properties.startTime |
string (date-time) |
Start time of the period |
| type |
string |
Resource type. |
DiagnosticMetricSample
Class representing Diagnostic Metric
| Name | Type | Description |
|---|---|---|
| isAggregated |
boolean |
Whether the values are aggregates across all workers or not |
| maximum |
number (double) |
Maximum of the metric sampled during the time period |
| minimum |
number (double) |
Minimum of the metric sampled during the time period |
| roleInstance |
string |
Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis |
| timestamp |
string (date-time) |
Time at which metric is measured |
| total |
number (double) |
Total value of the metric. If multiple measurements are made this will have sum of all. |
DiagnosticMetricSet
Class representing Diagnostic Metric information
| Name | Type | Description |
|---|---|---|
| endTime |
string (date-time) |
End time of the period |
| name |
string |
Name of the metric |
| startTime |
string (date-time) |
Start time of the period |
| timeGrain |
string |
Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D |
| unit |
string |
Metric's unit |
| values |
Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} |
Error
Error model.
| Name | Type | Description |
|---|---|---|
| code |
string |
Standardized string to programmatically identify the error. |
| details |
Details[] |
Detailed errors. |
| innererror |
string |
More information to debug error. |
| message |
string |
Detailed error description and debugging information. |
| target |
string |
Detailed error description and debugging information. |
IssueType
Represents the type of the Detector
| Value | Description |
|---|---|
| ServiceIncident | |
| AppDeployment | |
| AppCrash | |
| RuntimeIssueDetected | |
| AseDeployment | |
| UserIssue | |
| PlatformIssue | |
| Other |
NameValuePair
Name value pair.
| Name | Type | Description |
|---|---|---|
| name |
string |
Pair name. |
| value |
string |
Pair value. |
ResponseMetaData
| Name | Type | Description |
|---|---|---|
| dataSource |
Source of the Data |
Solution
Class Representing Solution for problems detected.
| Name | Type | Description |
|---|---|---|
| data |
Solution Data. |
|
| description |
string |
Description of the solution |
| displayName |
string |
Display Name of the solution |
| id |
number (double) |
Solution Id. |
| metadata |
Solution Metadata. |
|
| order |
number (double) |
Order of the solution. |
| type |
Type of Solution |
SolutionType
Type of Solution
| Value | Description |
|---|---|
| QuickSolution | |
| DeepInvestigation | |
| BestPractices |