{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Azure Application Insights client for web test based alerting.",
    "title": "ApplicationInsightsManagementClient",
    "version": "2015-05-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/webTests_API.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "applicationinsights-webTests_API",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow.",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ComponentNameParameter": {
      "description": "The name of the Application Insights component resource.",
      "in": "path",
      "name": "componentName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "WebTestNameParameter": {
      "description": "The name of the Application Insights webtest resource.",
      "in": "path",
      "name": "webTestName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests": {
      "get": {
        "description": "Get all Application Insights web test alerts definitions within a subscription.",
        "operationId": "WebTests_List",
        "parameters": [
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of 0 or more Application Insights web test definitions.",
            "schema": {
              "$ref": "#/definitions/webTestListResult"
            }
          }
        },
        "x-ms-examples": {
          "webTestList": {
            "parameters": {
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": null,
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                      "kind": "ping",
                      "location": "southcentralus",
                      "name": "my-webtest-my-component",
                      "properties": {
                        "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>"
                        },
                        "Description": "",
                        "Enabled": false,
                        "Frequency": 900,
                        "Kind": "ping",
                        "Locations": [],
                        "Name": "my-webtest",
                        "RetryEnabled": true,
                        "SyntheticMonitorId": "my-webtest-my-component",
                        "Timeout": 120,
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                      },
                      "type": "Microsoft.Insights/webtests"
                    },
                    {
                      "id": "/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-other-component",
                      "kind": "ping",
                      "location": "southcentralus",
                      "name": "my-webtest-my-other-component",
                      "properties": {
                        "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>"
                        },
                        "Description": "",
                        "Enabled": false,
                        "Frequency": 900,
                        "Kind": "ping",
                        "Locations": [],
                        "Name": "342bccf4-722f-496d-b064-123456789abc",
                        "RetryEnabled": false,
                        "SyntheticMonitorId": "my-webtest-my-other-component",
                        "Timeout": 120,
                        "provisioningState": "Succeeded"
                      },
                      "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"
                      },
                      "type": "Microsoft.Insights/webtests"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests": {
      "get": {
        "description": "Get all Application Insights web tests defined for the specified component.",
        "operationId": "WebTests_ListByComponent",
        "parameters": [
          {
            "$ref": "#/parameters/ComponentNameParameter"
          },
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A list containing 0 or more web test definitions.",
            "schema": {
              "$ref": "#/definitions/webTestListResult"
            }
          }
        },
        "x-ms-examples": {
          "webTestListByComponent": {
            "parameters": {
              "api-version": "2015-05-01",
              "componentName": "my-component",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": null,
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                      "kind": "ping",
                      "location": "southcentralus",
                      "name": "my-webtest-my-component",
                      "properties": {
                        "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>"
                        },
                        "Description": "",
                        "Enabled": false,
                        "Frequency": 900,
                        "Kind": "ping",
                        "Locations": [
                          {
                            "Id": "apac-hk-hkn-azr"
                          }
                        ],
                        "Name": "my-webtest",
                        "RetryEnabled": true,
                        "SyntheticMonitorId": "my-webtest-my-component",
                        "Timeout": 120,
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                      },
                      "type": "Microsoft.Insights/webtests"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests": {
      "get": {
        "description": "Get all Application Insights web tests defined within a specified resource group.",
        "operationId": "WebTests_ListByResourceGroup",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A list containing 0 or more web test definitions.",
            "schema": {
              "$ref": "#/definitions/webTestListResult"
            }
          }
        },
        "x-ms-examples": {
          "webTestListByResourceGroup": {
            "parameters": {
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": null,
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                      "kind": "ping",
                      "location": "southcentralus",
                      "name": "my-webtest-my-component",
                      "properties": {
                        "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>"
                        },
                        "Description": "",
                        "Enabled": false,
                        "Frequency": 900,
                        "Kind": "ping",
                        "Locations": [
                          {
                            "Id": "apac-hk-hkn-azr"
                          }
                        ],
                        "Name": "my-webtest",
                        "RetryEnabled": true,
                        "SyntheticMonitorId": "my-webtest-my-component",
                        "Timeout": 120,
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                      },
                      "type": "Microsoft.Insights/webtests"
                    },
                    {
                      "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-other-component",
                      "kind": "ping",
                      "location": "southcentralus",
                      "name": "my-webtest-my-other-component",
                      "properties": {
                        "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>"
                        },
                        "Description": "",
                        "Enabled": false,
                        "Frequency": 300,
                        "Kind": "ping",
                        "Locations": [
                          {
                            "Id": "us-fl-mia-edge"
                          }
                        ],
                        "Name": "342bccf4-722f-496d-b064-123456789abc",
                        "RetryEnabled": false,
                        "SyntheticMonitorId": "my-webtest-my-other-component",
                        "Timeout": 90,
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "Test": "You can delete this synthetic monitor anytime",
                        "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-other-component": "Resource"
                      },
                      "type": "Microsoft.Insights/webtests"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}": {
      "delete": {
        "description": "Deletes an Application Insights web test.",
        "operationId": "WebTests_Delete",
        "parameters": [
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/WebTestNameParameter"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful request to delete a web test definition."
          },
          "204": {
            "description": "No content: the request was successful, but the response is empty (the request to delete failed because the specified web test does not exist)."
          }
        },
        "x-ms-examples": {
          "webTestDelete": {
            "parameters": {
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid",
              "webTestName": "my-webtest-01-mywebservice"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Get a specific Application Insights web test definition.",
        "operationId": "WebTests_Get",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/WebTestNameParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Ann Application Insights web test definition.",
            "schema": {
              "$ref": "#/definitions/WebTest"
            }
          }
        },
        "x-ms-examples": {
          "webTestGet": {
            "parameters": {
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid",
              "webTestName": "my-webtest-01-mywebservice"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/webtests/my-webtest-01-mywebservice",
                  "kind": "ping",
                  "location": "southcentralus",
                  "name": "my-webtest-01-mywebservice",
                  "properties": {
                    "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>"
                    },
                    "Description": "",
                    "Enabled": false,
                    "Frequency": 900,
                    "Kind": "ping",
                    "Locations": [
                      {
                        "Id": "us-fl-mia-edge"
                      },
                      {
                        "Id": "apac-hk-hkn-azr"
                      }
                    ],
                    "Name": "mytest-webtest-01",
                    "RetryEnabled": true,
                    "SyntheticMonitorId": "my-webtest-01-mywebservice",
                    "Timeout": 30,
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "hidden-link:/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/components/mytester": "Resource",
                    "hidden-link:/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Web/sites/mytester": "Resource"
                  },
                  "type": "Microsoft.Insights/webtests"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Creates or updates an Application Insights web test definition.",
        "operationId": "WebTests_UpdateTags",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/WebTestNameParameter"
          },
          {
            "description": "Updated tag information to set into the web test instance.",
            "in": "body",
            "name": "WebTestTags",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TagsResource"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updating the Application Insights web test tags was successful. Web test tags are updated and returned with the rest of the WebTest object properties.",
            "schema": {
              "$ref": "#/definitions/WebTest"
            }
          }
        },
        "x-ms-examples": {
          "webTestUpdateTags": {
            "parameters": {
              "WebTestTags": {
                "tags": {
                  "Color": "AzureBlue",
                  "CustomField-01": "This is a random value",
                  "SystemType": "A08",
                  "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                  "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                }
              },
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid",
              "webTestName": "my-webtest-my-component"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                  "kind": "ping",
                  "location": "southcentralus",
                  "name": "my-webtest-my-component",
                  "properties": {
                    "Configuration": {
                      "WebTest": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-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=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
                    },
                    "Description": "Ping web test alert for mytestwebapp",
                    "Enabled": true,
                    "Frequency": 600,
                    "Kind": "ping",
                    "Locations": [
                      {
                        "Id": "us-fl-mia-edge"
                      },
                      {
                        "Id": "apac-hk-hkn-azr"
                      }
                    ],
                    "Name": "my-webtest-my-component",
                    "RetryEnabled": true,
                    "SyntheticMonitorId": "my-webtest-my-component",
                    "Timeout": 30,
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "Color": "AzureBlue",
                    "CustomField-01": "This is a random value",
                    "SystemType": "A08",
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                  },
                  "type": "Microsoft.Insights/webtests"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates or updates an Application Insights web test definition.",
        "operationId": "WebTests_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/WebTestNameParameter"
          },
          {
            "description": "Properties that need to be specified to create or update an Application Insights web test definition.",
            "in": "body",
            "name": "WebTestDefinition",
            "required": true,
            "schema": {
              "$ref": "#/definitions/WebTest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Adding the Application Insights web test was successful. Web test properties are updated and returned.",
            "schema": {
              "$ref": "#/definitions/WebTest"
            }
          }
        },
        "x-ms-examples": {
          "webTestCreate": {
            "parameters": {
              "WebTestDefinition": {
                "kind": "ping",
                "location": "South Central US",
                "properties": {
                  "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>"
                  },
                  "Description": "Ping web test alert for mytestwebapp",
                  "Enabled": true,
                  "Frequency": 900,
                  "Kind": "ping",
                  "Locations": [
                    {
                      "Id": "us-fl-mia-edge"
                    }
                  ],
                  "Name": "my-webtest-my-component",
                  "RetryEnabled": true,
                  "SyntheticMonitorId": "my-webtest-my-component",
                  "Timeout": 120
                }
              },
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid",
              "webTestName": "my-webtest-my-component"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                  "kind": "ping",
                  "location": "southcentralus",
                  "name": "my-webtest-my-component",
                  "properties": {
                    "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>"
                    },
                    "Description": "Ping web test alert for mytestwebapp",
                    "Enabled": true,
                    "Frequency": 900,
                    "Kind": "ping",
                    "Locations": [
                      {
                        "Id": "us-fl-mia-edge"
                      }
                    ],
                    "Name": "my-webtest-my-component",
                    "RetryEnabled": true,
                    "SyntheticMonitorId": "my-webtest-my-component",
                    "Timeout": 120,
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                  },
                  "type": "Microsoft.Insights/webtests"
                }
              }
            }
          },
          "webTestUpdate": {
            "parameters": {
              "WebTestDefinition": {
                "kind": "ping",
                "location": "South Central US",
                "properties": {
                  "Configuration": {
                    "WebTest": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-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=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
                  },
                  "Frequency": 600,
                  "Kind": "ping",
                  "Locations": [
                    {
                      "Id": "us-fl-mia-edge"
                    },
                    {
                      "Id": "apac-hk-hkn-azr"
                    }
                  ],
                  "Name": "my-webtest-my-component",
                  "SyntheticMonitorId": "my-webtest-my-component",
                  "Timeout": 30
                }
              },
              "api-version": "2015-05-01",
              "resourceGroupName": "my-resource-group",
              "subscriptionId": "subid",
              "webTestName": "my-webtest-my-component"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
                  "kind": "ping",
                  "location": "southcentralus",
                  "name": "my-webtest-my-component",
                  "properties": {
                    "Configuration": {
                      "WebTest": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-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=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
                    },
                    "Description": "Ping web test alert for mytestwebapp",
                    "Enabled": true,
                    "Frequency": 600,
                    "Kind": "ping",
                    "Locations": [
                      {
                        "Id": "us-fl-mia-edge"
                      },
                      {
                        "Id": "apac-hk-hkn-azr"
                      }
                    ],
                    "Name": "my-webtest-my-component",
                    "RetryEnabled": true,
                    "SyntheticMonitorId": "my-webtest-my-component",
                    "Timeout": 30,
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
                    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
                  },
                  "type": "Microsoft.Insights/webtests"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "TagsResource": {
      "description": "A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance.",
      "properties": {
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags"
        }
      }
    },
    "WebTest": {
      "allOf": [
        {
          "$ref": "#/definitions/WebtestsResource"
        }
      ],
      "description": "An Application Insights web test definition.",
      "properties": {
        "kind": {
          "default": "ping",
          "description": "The kind of web test that this web test watches. Choices are ping and multistep.",
          "enum": [
            "ping",
            "multistep"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "WebTestKind"
          }
        },
        "properties": {
          "$ref": "#/definitions/WebTestProperties",
          "description": "Metadata describing a web test for an Azure resource.",
          "x-ms-client-flatten": true
        }
      }
    },
    "WebTestGeolocation": {
      "description": "Geo-physical location to run a web test from. You must specify one or more locations for the test to run from.",
      "properties": {
        "Id": {
          "description": "Location ID for the webtest to run from.",
          "type": "string",
          "x-ms-client-name": "location"
        }
      },
      "type": "object"
    },
    "WebTestProperties": {
      "description": "Metadata describing a web test for an Azure resource.",
      "properties": {
        "Configuration": {
          "description": "An XML configuration specification for a WebTest.",
          "properties": {
            "WebTest": {
              "description": "The XML specification of a WebTest to run against an application.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "Description": {
          "description": "Purpose/user defined descriptive test for this WebTest.",
          "type": "string"
        },
        "Enabled": {
          "description": "Is the test actively being monitored.",
          "type": "boolean"
        },
        "Frequency": {
          "default": 300,
          "description": "Interval in seconds between test runs for this WebTest. Default value is 300.",
          "format": "int32",
          "type": "integer"
        },
        "Kind": {
          "default": "ping",
          "description": "The kind of web test this is, valid choices are ping and multistep.",
          "enum": [
            "ping",
            "multistep"
          ],
          "type": "string",
          "x-ms-client-name": "WebTestKind",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "WebTestKind"
          }
        },
        "Locations": {
          "description": "A list of where to physically run the tests from to give global coverage for accessibility of your application.",
          "items": {
            "$ref": "#/definitions/WebTestGeolocation"
          },
          "type": "array"
        },
        "Name": {
          "description": "User defined name if this WebTest.",
          "type": "string",
          "x-ms-client-name": "WebTestName"
        },
        "RetryEnabled": {
          "description": "Allow for retries should this WebTest fail.",
          "type": "boolean"
        },
        "SyntheticMonitorId": {
          "description": "Unique ID of this WebTest. This is typically the same value as the Name field.",
          "type": "string"
        },
        "Timeout": {
          "default": 30,
          "description": "Seconds until this WebTest will timeout and fail. Default value is 30.",
          "format": "int32",
          "type": "integer"
        },
        "provisioningState": {
          "description": "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.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "Name",
        "Kind",
        "Locations",
        "SyntheticMonitorId"
      ]
    },
    "WebtestsResource": {
      "description": "An azure resource object",
      "properties": {
        "id": {
          "description": "Azure resource Id",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "Resource location",
          "type": "string",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "name": {
          "description": "Azure resource name",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags"
        },
        "type": {
          "description": "Azure resource type",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "location"
      ],
      "x-ms-azure-resource": true
    },
    "webTestListResult": {
      "description": "A list of 0 or more Application Insights web test definitions.",
      "properties": {
        "nextLink": {
          "description": "The link to get the next part of the returned list of web tests, should the return set be too large for a single request. May be null.",
          "type": "string"
        },
        "value": {
          "description": "Set of Application Insights web test definitions.",
          "items": {
            "$ref": "#/definitions/WebTest"
          },
          "type": "array"
        }
      },
      "required": [
        "value"
      ]
    }
  }
}