Web Tests - Get
Get a specific Application Insights web test definition.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}?api-version=2022-06-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
web
|
path | True |
string |
The name of the Application Insights WebTest resource. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Ann Application Insights web test definition. |
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
webTestGet
Sample request
Sample response
{
"id": "/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/webtests/my-webtest-01-mywebservice",
"name": "my-webtest-01-mywebservice",
"type": "Microsoft.Insights/webtests",
"location": "southcentralus",
"tags": {
"hidden-link:/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/components/mytester": "Resource"
},
"kind": "ping",
"properties": {
"SyntheticMonitorId": "my-webtest-01-mywebservice",
"Name": "mytest-webtest-01",
"Description": "",
"Enabled": false,
"Frequency": 900,
"Timeout": 30,
"Kind": "ping",
"RetryEnabled": true,
"Locations": [
{
"Id": "us-fl-mia-edge"
},
{
"Id": "apac-hk-hkn-azr"
}
],
"Configuration": {
"WebTest": "<WebTest Name=\"mytest-webtest-01\" Id=\"0317d26b-8672-4370-bd6b-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\"><Items><Request Method=\"GET\" Guid=\"a55ce143-4f1e-a7e6-b69e-123456789abc\" Version=\"1.1\" Url=\"http://mytester.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"False\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
},
"provisioningState": "Succeeded"
}
}
Definitions
Name | Description |
---|---|
Configuration |
An XML configuration specification for a WebTest. |
Content |
The collection of content validation properties |
Header |
A header to add to the WebTest. |
Request |
The collection of request properties |
Validation |
The collection of validation rule properties |
Web |
An Application Insights WebTest definition. |
Web |
Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. |
Web |
The kind of WebTest that this web test watches. Choices are ping, multistep and standard. |
Configuration
An XML configuration specification for a WebTest.
Name | Type | Description |
---|---|---|
WebTest |
string |
The XML specification of a WebTest to run against an application. |
ContentValidation
The collection of content validation properties
Name | Type | Description |
---|---|---|
ContentMatch |
string |
Content to look for in the return of the WebTest. Must not be null or empty. |
IgnoreCase |
boolean |
When set, this value makes the ContentMatch validation case insensitive. |
PassIfTextFound |
boolean |
When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match |
HeaderField
A header to add to the WebTest.
Name | Type | Description |
---|---|---|
key |
string |
The name of the header. |
value |
string |
The value of the header. |
Request
The collection of request properties
Name | Type | Description |
---|---|---|
FollowRedirects |
boolean |
Follow redirects for this web test. |
Headers |
List of headers and their values to add to the WebTest call. |
|
HttpVerb |
string |
Http verb to use for this web test. |
ParseDependentRequests |
boolean |
Parse Dependent request for this WebTest. |
RequestBody |
string |
Base64 encoded string body to send with this web test. |
RequestUrl |
string |
Url location to test. |
ValidationRules
The collection of validation rule properties
Name | Type | Description |
---|---|---|
ContentValidation |
The collection of content validation properties |
|
ExpectedHttpStatusCode |
integer |
Validate that the WebTest returns the http status code provided. |
IgnoreHttpStatusCode |
boolean |
When set, validation will ignore the status code. |
SSLCertRemainingLifetimeCheck |
integer |
A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true. |
SSLCheck |
boolean |
Checks to see if the SSL cert is still valid. |
WebTest
An Application Insights WebTest definition.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Azure resource Id |
|
kind | ping |
The kind of WebTest that this web test watches. Choices are ping, multistep and standard. |
|
location |
string |
Resource location |
|
name |
string |
Azure resource name |
|
properties.Configuration |
An XML configuration specification for a WebTest. |
||
properties.Description |
string |
User defined description for this WebTest. |
|
properties.Enabled |
boolean |
Is the test actively being monitored. |
|
properties.Frequency |
integer |
300 |
Interval in seconds between test runs for this WebTest. Default value is 300. |
properties.Kind | ping |
The kind of web test this is, valid choices are ping, multistep and standard. |
|
properties.Locations |
A list of where to physically run the tests from to give global coverage for accessibility of your application. |
||
properties.Name |
string |
User defined name if this WebTest. |
|
properties.Request |
The collection of request properties |
||
properties.RetryEnabled |
boolean |
Allow for retries should this WebTest fail. |
|
properties.SyntheticMonitorId |
string |
Unique ID of this WebTest. This is typically the same value as the Name field. |
|
properties.Timeout |
integer |
30 |
Seconds until this WebTest will timeout and fail. Default value is 30. |
properties.ValidationRules |
The collection of validation rule properties |
||
properties.provisioningState |
string |
Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. |
|
tags |
object |
Resource tags |
|
type |
string |
Azure resource type |
WebTestGeolocation
Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from.
Name | Type | Description |
---|---|---|
Id |
string |
Location ID for the WebTest to run from. |
WebTestKind
The kind of WebTest that this web test watches. Choices are ping, multistep and standard.
Name | Type | Description |
---|---|---|
multistep |
string |
|
ping |
string |
|
standard |
string |