Web Tests - List

Get all Application Insights web test definitions for the specified subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests?api-version=2022-06-15

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

webTestListResult

A list of 0 or more Application Insights web test definitions.

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

webTestList

Sample Request

GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Insights/webtests?api-version=2022-06-15

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
      "name": "my-webtest-my-component",
      "type": "Microsoft.Insights/webtests",
      "location": "southcentralus",
      "tags": {
        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource"
      },
      "kind": "ping",
      "properties": {
        "SyntheticMonitorId": "my-webtest-my-component",
        "Name": "my-webtest",
        "Description": "",
        "Enabled": false,
        "Frequency": 900,
        "Timeout": 120,
        "Kind": "ping",
        "RetryEnabled": true,
        "Locations": [],
        "Configuration": {
          "WebTest": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" 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=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
        },
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-other-component",
      "name": "my-webtest-my-other-component",
      "type": "Microsoft.Insights/webtests",
      "location": "southcentralus",
      "tags": {
        "Test": "You can delete this synthetic monitor anytime",
        "hidden-link:/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/components/my-other-component": "Resource"
      },
      "kind": "ping",
      "properties": {
        "SyntheticMonitorId": "my-webtest-my-other-component",
        "Name": "342bccf4-722f-496d-b064-123456789abc",
        "Description": "",
        "Enabled": false,
        "Frequency": 900,
        "Timeout": 120,
        "Kind": "ping",
        "RetryEnabled": false,
        "Locations": [],
        "Configuration": {
          "WebTest": "<WebTest Name=\"342bccf4-722f-496d-b064-123456789abc\" Id=\"00a15cc1-c903-4f97-9af4-123456789abc\" Enabled=\"False\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" 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=\"347e1924-9899-4c6e-ad78-123456789abc\" Version=\"1.1\" Url=\"http://my-other-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
        },
        "provisioningState": "Succeeded"
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
Configuration

An XML configuration specification for a WebTest.

ContentValidation

The collection of content validation properties

HeaderField

A header to add to the WebTest.

Request

The collection of request properties

ValidationRules

The collection of validation rule properties

WebTest

An Application Insights WebTest definition.

WebTestGeolocation

Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from.

WebTestKind

The kind of WebTest that this web test watches. Choices are ping, multistep and standard.

webTestListResult

A list of 0 or more Application Insights WebTest definitions.

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

HeaderField[]

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

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

WebTestKind

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

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

WebTestKind

ping

The kind of web test this is, valid choices are ping, multistep and standard.

properties.Locations

WebTestGeolocation[]

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

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

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

webTestListResult

A list of 0 or more Application Insights WebTest definitions.

Name Type Description
nextLink

string

The link to get the next part of the returned list of WebTest, should the return set be too large for a single request. May be null.

value

WebTest[]

Set of Application Insights WebTest definitions.