From 4e685d3006a5e20ba9f8d82a7a1dd5e2837e1637 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Wed, 31 Jan 2018 10:55:00 -0800 Subject: [PATCH 01/17] Add swagger for annotation api for microsoft.insights components namespace for api version 2015-05-01 --- .../2015-05-01/componentAnnotations_API.json | 330 ++++++++++++++++++ .../examples/AnnotationsCreate.json | 14 + .../examples/AnnotationsDelete.json | 14 + .../2015-05-01/examples/AnnotationsGet.json | 14 + .../2015-05-01/examples/AnnotationsList.json | 32 ++ 5 files changed, 404 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json new file mode 100644 index 000000000000..aed9232c98fc --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -0,0 +1,330 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights client for Annotations for a component.", + "version": "2015-05-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/Annotations": { + "get": { + "description": "Gets the list of annotations for a component for given time range", + "operationId": "Annotations_List", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/StartParameter" + }, + { + "$ref": "#/parameters/EndParameter" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Annotation" + } + } + }, + "400": { + "description": "Invalid start or end time" + } + }, + "x-ms-examples": { + "AnnotationsList": { + "$ref": "./examples/AnnotationsList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + }, + "put": { + "description": "Create an Annotation of an Application Insights component.", + "operationId": "Annotations_Create", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "AnnotationProperties", + "description": "Properties that need to be specified to create an annotation of a Application Insights component.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Annotation" + } + } + ], + "responses": { + "200": { + "description": "An object containing the annotation definition created by this PUT call.", + "schema": { + "$ref": "#/definitions/Annotation" + } + }, + "409": { + "description": "Annotation with Id already exists.", + "schema": { + "$ref": "#/definitions/AnnotationCreateError" + } + } + }, + "x-ms-examples": { + "AnnotationsCreate": { + "$ref": "./examples/AnnotationsCreate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/Annotations/{annotationId}": { + "delete": { + "description": "Delete an Annotation of an Application Insights component.", + "operationId": "Annotations_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/AnnotationIdParameter" + } + ], + "responses": { + "200": { + "description": "The annotation that was successfully deleted.", + "schema": { + "$ref": "#/definitions/Annotation" + } + } + }, + "x-ms-examples": { + "AnnotationsDelete": { + "$ref": "./examples/AnnotationsDelete.json" + } + } + }, + "get": { + "description": "Get the annotation for given id.", + "operationId": "Annotations_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/AnnotationIdParameter" + } + ], + "responses": { + "200": { + "description": "The Annotation object for this id.", + "schema": { + "$ref": "#/definitions/Annotation" + } + }, + "404": { + "description": "The Annotation with given id does not exist.", + "schema": { + "$ref": "#/definitions/InnerError" + } + } + }, + "x-ms-examples": { + "AnnotationsGet": { + "$ref": "./examples/AnnotationsGet.json" + } + } + } + } + }, + "definitions": { + "Annotation": { + "type": "object", + "description": "Annotation associated with an application insights resource.", + "properties": { + "AnnotationName": { + "type": "string", + "description": "Name of annotation" + }, + "Category": { + "type": "string", + "description": "Category of annotation, free form" + }, + "EventTime": { + "type": "string", + "format": "date-time", + "description": "Time when event occurred" + }, + "Id": { + "type": "string", + "description": "Unique Id for annotation" + }, + "Properties": { + "type": "string", + "description": "Serialized JSON object for detailed properties" + }, + "RelatedAnnotation": { + "type": "string", + "description": "Related parent annotation if any", + "default": "null" + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error", + "properties": { + "diagnosticcontext": { + "type": "string", + "description": "Provides correlation for request" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "Request time" + } + } + }, + "AnnotationCreateError": { + "type": "object", + "description": "Error associated with trying to create annotation with Id that already exist", + "properties": { + "Code": { + "type": "string", + "description": "Error detail code and explanation" + }, + "message": { + "type": "string", + "description": "Error message" + }, + "innerError": { + "$ref": "#/definitions/InnerError" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "AnnotationIdParameter": { + "name": "annotationId", + "in": "path", + "required": true, + "type": "string", + "description": "The unique annotation ID. This is unique within a Application Insights component.", + "x-ms-parameter-location": "method" + }, + "StartParameter": { + "name": "Start", + "in": "query", + "required": true, + "type": "string", + "description": "The start time to query from for annotations, cannot be older than 90 days from current date.", + "x-ms-parameter-location": "method" + }, + "EndParameter": { + "name": "End", + "in": "query", + "required": true, + "type": "string", + "description": "The end time to query for annotations.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json new file mode 100644 index 000000000000..67c97adc651f --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "AnnotationProperties": {"AnnotationName":"TestAnnotation","Category":"Text","EventTime":"2018-01-31T13:41:38.657Z","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}"} + }, + "responses": { + "200": { + "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json new file mode 100644 index 000000000000..02aacad68201 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "AnnotationId": "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json new file mode 100644 index 000000000000..9c519feede71 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "AnnotationId": "444e2c08-274a-4bbb-a89e-d77bb720f44a" + }, + "responses": { + "200": { + "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json new file mode 100644 index 000000000000..adc82e754e22 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "AnnotationName":"InsightsPortal-20180126-1", + "Id":"4de4524f-fca5-44a8-b7e6-a67d5107796e", + "Category":"Deployment", + "Properties":"{\"ReleaseDefinitionName\":\"InsightsPortal-PPEProd-KeyVault\",\"ReleaseRequestedFor\":\"6a970e9b-6220-47f3-a78c-b8be97506698\",\"TeamFoundationCollectionUri\":\"https://mseng.visualstudio.com/\",\"BuildNumber\":\"20180126.1\",\"ReleaseDescription\":\"Triggered by InsightsPortal_master_PROD1_vNext 20180126.1.\",\"ReleaseId\":\"31075\",\"ReleaseWebUrl\":\"https://mseng.visualstudio.com/96a62c4a-58c2-4dbb-94b6-5979ebc7f2af/_release?releaseId=31075\\u0026_a=release-summary\",\"SourceBranch\":\"refs/heads/master\",\"BuildRepositoryProvider\":\"TfsGit\",\"ReleaseEnvironmentName\":\"AIMON VIP SWAP\",\"BuildRepositoryName\":\"InsightsPortal\",\"ReleaseName\":\"InsightsPortal-20180126-1\"}", + "EventTime":"2018-01-29T20:30:31+00:00", + "RelatedAnnotation":null + }, + { + "AnnotationName":"InsightsPortal-20180125-1", + "Id":"9a82214f-8f98-4699-b5bc-cad6101ed223", + "Category":"Deployment", + "Properties":"{\"ReleaseDefinitionName\":\"InsightsPortal-PPEProd-KeyVault\",\"ReleaseRequestedFor\":\"6a970e9b-6220-47f3-a78c-b8be97506698\",\"TeamFoundationCollectionUri\":\"https://mseng.visualstudio.com/\",\"BuildNumber\":\"20180125.1\",\"ReleaseDescription\":\"Triggered by InsightsPortal_master_PROD1_vNext 20180125.1.\",\"ReleaseId\":\"31035\",\"ReleaseWebUrl\":\"https://mseng.visualstudio.com/96a62c4a-58c2-4dbb-94b6-5979ebc7f2af/_release?releaseId=31035\\u0026_a=release-summary\",\"SourceBranch\":\"refs/heads/master\",\"BuildRepositoryProvider\":\"TfsGit\",\"ReleaseEnvironmentName\":\"Prod VIP Swap \",\"BuildRepositoryName\":\"InsightsPortal\",\"ReleaseName\":\"InsightsPortal-20180125-1\"}", + "EventTime":"2018-01-29T20:38:35+00:00", + "RelatedAnnotation":null + } + ] + } + } + } +} \ No newline at end of file From 1336db6466ee69af90739d7276561af9b9391ef5 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Mon, 5 Feb 2018 11:33:24 -0800 Subject: [PATCH 02/17] Address pr comment to include file in readme --- specification/applicationinsights/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index 282509b53f79..045e97f17a6e 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -173,6 +173,7 @@ input-file: - microsoft.insights/stable/2015-05-01/componentProactiveDetection_API.json - microsoft.insights/stable/2015-05-01/componentFeaturesAndPricing_API.json - microsoft.insights/stable/2015-05-01/componentApiKeys_API.json +- microsoft.insights/stable/2015-05-01/componentAnnotations_API.json ``` --- # Code Generation From e41b6589c8f5d2303897553aaa554699c86a1642 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Mon, 5 Feb 2018 16:12:55 -0800 Subject: [PATCH 03/17] Fix issues with PR=true --- .../stable/2015-05-01/componentAnnotations_API.json | 3 +++ .../stable/2015-05-01/examples/AnnotationsCreate.json | 6 +++++- .../stable/2015-05-01/examples/AnnotationsGet.json | 3 ++- .../stable/2015-05-01/examples/AnnotationsList.json | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index aed9232c98fc..eda0cb752c1b 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -119,6 +119,9 @@ "schema": { "$ref": "#/definitions/AnnotationCreateError" } + }, + "400": { + "description": "Invalid time" } }, "x-ms-examples": { diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json index 67c97adc651f..3cbce4c25616 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -9,6 +9,10 @@ "responses": { "200": { "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] - } + }, + "409": { + "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z","method":"PUT","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"Microsoft.AppInsights.Nexus.ResourceStore.ResourceStoreException: Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass6_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} + }, + "400": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z","method":"PUT","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.ArgumentException: Specify valid time of event\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.SanitizeConfigurationAsync(String nAppId, String nId, Annotation configuration)\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.ConfigurationProvider`3.d__8`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass6_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json index 9c519feede71..a13c7cfd637e 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -9,6 +9,7 @@ "responses": { "200": { "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] - } + }, + "404": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations/23D71BEA-6305-4BD3-96B8-B7A4657C2039?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at Microsoft.ManagementServices.Graph.Core.Routing.Router.<>c__DisplayClass16_0.b__6(IAsyncResult asyncResult)\r\n at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)"}} } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index adc82e754e22..d577b4c9e795 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -27,6 +27,7 @@ } ] } - } + }, + "400": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?start=2018-02-05T00:30:00.000Z&end=2018-02-06T00:33A00.000Z&api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.ArgumentException: Invalid end time\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass5_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} } } \ No newline at end of file From 74015effe67861219300974a71998ed898a31a30 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Mon, 5 Feb 2018 16:27:34 -0800 Subject: [PATCH 04/17] Fix more PR=true errors --- .../stable/2015-05-01/componentAnnotations_API.json | 2 ++ .../stable/2015-05-01/examples/AnnotationsList.json | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index eda0cb752c1b..cf0c96eefd91 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -269,6 +269,8 @@ "description": "Error message" }, "innerError": { + "title": "hello", + "description": "world", "$ref": "#/definitions/InnerError" } } diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index d577b4c9e795..57d333418daf 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -3,12 +3,13 @@ "api-version": "2015-05-01", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", - "resourceName": "my-component" + "resourceName": "my-component", + "start": "2018-02-05T00%253A30%253A00.000Z", + "end": "2018-02-06T00%253A33A00.000Z" }, "responses": { "200": { - "body": { - "value": [ + "body": [ { "AnnotationName":"InsightsPortal-20180126-1", "Id":"4de4524f-fca5-44a8-b7e6-a67d5107796e", @@ -26,7 +27,6 @@ "RelatedAnnotation":null } ] - } }, "400": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?start=2018-02-05T00:30:00.000Z&end=2018-02-06T00:33A00.000Z&api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.ArgumentException: Invalid end time\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass5_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} } From 3c9eb164a97b45ffea2b0d6d6f4314cf4e355374 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 10:06:33 -0800 Subject: [PATCH 05/17] fix more errors --- .../stable/2015-05-01/examples/AnnotationsDelete.json | 2 +- .../stable/2015-05-01/examples/AnnotationsGet.json | 2 +- .../stable/2015-05-01/examples/AnnotationsList.json | 4 ++-- .../applicationinsights/resource-manager/readme.md | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json index 02aacad68201..a12bc967c9e1 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component", - "AnnotationId": "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a" + "annotationId": "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json index a13c7cfd637e..34ed37e5a298 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component", - "AnnotationId": "444e2c08-274a-4bbb-a89e-d77bb720f44a" + "annotationId": "444e2c08-274a-4bbb-a89e-d77bb720f44a" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index 57d333418daf..009487ba57c7 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -4,8 +4,8 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component", - "start": "2018-02-05T00%253A30%253A00.000Z", - "end": "2018-02-06T00%253A33A00.000Z" + "start": "2018-02-05T00%253A30%253A00.000Z", + "end": "2018-02-06T00%253A33A00.000Z" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index 045e97f17a6e..93ce879cdb66 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -155,6 +155,12 @@ directive: # - $.definitions.ApplicationInsightsComponentProactiveDetectionConfiguration.properties.RuleDefinitions # - $.definitions.ApplicationInsightsComponentProactiveDetectionConfiguration.properties.Name # - $.definitions.ApplicationInsightsComponentProactiveDetectionConfiguration.properties.Name + # - $.definitions.Annotation.AnnotationName + # - $.definitions.Annotation.EventTime + # - $.definitions.Annotation.Category + # - $.definitions.Annotation.Id + # - $.definitions.Annotation.Properties + # - $.definitions.Annotation.RelatedAnnotation - suppress: R2066 reason: There are a bug in this rule. "ExportConfigurations_Create" is a valid operation id. From d65c3df6ec960acceee58b4d5ffdac0c25243514 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 10:40:48 -0800 Subject: [PATCH 06/17] Fix more PR=true errors --- .../2015-05-01/componentAnnotations_API.json | 16 ++++++++++------ .../2015-05-01/examples/AnnotationsDelete.json | 1 - 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index cf0c96eefd91..9066ae396fe5 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -156,8 +156,10 @@ "200": { "description": "The annotation that was successfully deleted.", "schema": { - "$ref": "#/definitions/Annotation" - } + "type": "array", + "items": { + "$ref": "#/definitions/Annotation" + } } }, "x-ms-examples": { @@ -190,8 +192,10 @@ "200": { "description": "The Annotation object for this id.", "schema": { - "$ref": "#/definitions/Annotation" - } + "type": "array", + "items": { + "$ref": "#/definitions/Annotation" + } }, "404": { "description": "The Annotation with given id does not exist.", @@ -316,7 +320,7 @@ "x-ms-parameter-location": "method" }, "StartParameter": { - "name": "Start", + "name": "start", "in": "query", "required": true, "type": "string", @@ -324,7 +328,7 @@ "x-ms-parameter-location": "method" }, "EndParameter": { - "name": "End", + "name": "end", "in": "query", "required": true, "type": "string", diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json index a12bc967c9e1..d1d85d0b0029 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json @@ -8,7 +8,6 @@ }, "responses": { "200": { - "body": "" } } } \ No newline at end of file From 109cec0eee558db1b770e17a4e4521c8961050ce Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 10:47:17 -0800 Subject: [PATCH 07/17] Fix syntax error --- .../stable/2015-05-01/componentAnnotations_API.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index 9066ae396fe5..430e241cd4e3 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -160,6 +160,7 @@ "items": { "$ref": "#/definitions/Annotation" } + } } }, "x-ms-examples": { @@ -196,6 +197,7 @@ "items": { "$ref": "#/definitions/Annotation" } + } }, "404": { "description": "The Annotation with given id does not exist.", From 62334ee15dd7fae9c97481b11076dd875773a17e Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 11:44:38 -0800 Subject: [PATCH 08/17] Fix more errors --- .../2015-05-01/componentAnnotations_API.json | 15 +++++++-------- .../2015-05-01/examples/AnnotationsDelete.json | 1 + .../2015-05-01/examples/AnnotationsGet.json | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index 430e241cd4e3..8d6f8aae768c 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -111,8 +111,11 @@ "200": { "description": "An object containing the annotation definition created by this PUT call.", "schema": { - "$ref": "#/definitions/Annotation" - } + "type": "array", + "items": { + "$ref": "#/definitions/Annotation" + } + } }, "409": { "description": "Annotation with Id already exists.", @@ -155,11 +158,7 @@ "responses": { "200": { "description": "The annotation that was successfully deleted.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Annotation" - } + "schema": { } } }, @@ -266,7 +265,7 @@ "type": "object", "description": "Error associated with trying to create annotation with Id that already exist", "properties": { - "Code": { + "code": { "type": "string", "description": "Error detail code and explanation" }, diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json index d1d85d0b0029..159f1cce5d40 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json @@ -8,6 +8,7 @@ }, "responses": { "200": { + "body": } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json index 34ed37e5a298..0f317fbd499f 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -10,6 +10,9 @@ "200": { "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] }, - "404": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations/23D71BEA-6305-4BD3-96B8-B7A4657C2039?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at Microsoft.ManagementServices.Graph.Core.Routing.Router.<>c__DisplayClass16_0.b__6(IAsyncResult asyncResult)\r\n at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)"}} + "404": { + "body": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations/23D71BEA-6305-4BD3-96B8-B7A4657C2039?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at Microsoft.ManagementServices.Graph.Core.Routing.Router.<>c__DisplayClass16_0.b__6(IAsyncResult asyncResult)\r\n at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)"} + } + } } } \ No newline at end of file From 872b4446644dd988352e183ee81490d9a85fb80a Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 11:56:44 -0800 Subject: [PATCH 09/17] Fix syntax --- .../stable/2015-05-01/examples/AnnotationsDelete.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json index 159f1cce5d40..18d90e1de9f8 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsDelete.json @@ -8,7 +8,7 @@ }, "responses": { "200": { - "body": + "body": {} } } } \ No newline at end of file From beb1e9604d786b6c5412a41d47c643768070aa7c Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 12:32:53 -0800 Subject: [PATCH 10/17] fix 2 more Pr=true errors --- .../stable/2015-05-01/componentAnnotations_API.json | 5 ++++- .../stable/2015-05-01/examples/AnnotationsCreate.json | 2 +- .../stable/2015-05-01/examples/AnnotationsGet.json | 2 +- .../stable/2015-05-01/examples/AnnotationsList.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index 8d6f8aae768c..e9b6368d4a18 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -69,7 +69,10 @@ } }, "400": { - "description": "Invalid start or end time" + "description": "Invalid start or end time", + "schema": { + "$ref": "#/definitions/InnerError" + } } }, "x-ms-examples": { diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json index 3cbce4c25616..dd1395f3e343 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -13,6 +13,6 @@ "409": { "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z","method":"PUT","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"Microsoft.AppInsights.Nexus.ResourceStore.ResourceStoreException: Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass6_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} }, - "400": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z","method":"PUT","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.ArgumentException: Specify valid time of event\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.SanitizeConfigurationAsync(String nAppId, String nId, Annotation configuration)\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.ConfigurationProvider`3.d__8`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass6_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} + "400": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}} } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json index 0f317fbd499f..d00a55b38575 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -11,7 +11,7 @@ "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] }, "404": { - "body": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations/23D71BEA-6305-4BD3-96B8-B7A4657C2039?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at Microsoft.ManagementServices.Graph.Core.Routing.Router.<>c__DisplayClass16_0.b__6(IAsyncResult asyncResult)\r\n at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)"} + "body": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z"} } } } diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index 009487ba57c7..f4336d40b3ed 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -28,6 +28,6 @@ } ] }, - "400": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z","method":"GET","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?start=2018-02-05T00:30:00.000Z&end=2018-02-06T00:33A00.000Z&api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"System.ArgumentException: Invalid end time\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass5_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} + "400": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z"}} } } \ No newline at end of file From f7c2334f6f400246eb68476a256bd22e0c6037f3 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 12:44:22 -0800 Subject: [PATCH 11/17] Try to fix errors again --- .../stable/2015-05-01/componentAnnotations_API.json | 4 +--- .../stable/2015-05-01/examples/AnnotationsCreate.json | 5 +++-- .../stable/2015-05-01/examples/AnnotationsList.json | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index e9b6368d4a18..a3ee4361cc6c 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -71,7 +71,7 @@ "400": { "description": "Invalid start or end time", "schema": { - "$ref": "#/definitions/InnerError" + "$ref": "#/definitions/AnnotationCreateError" } } }, @@ -277,8 +277,6 @@ "description": "Error message" }, "innerError": { - "title": "hello", - "description": "world", "$ref": "#/definitions/InnerError" } } diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json index dd1395f3e343..4eb01b071b46 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -11,8 +11,9 @@ "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] }, "409": { - "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z","method":"PUT","outboundurl":"https://cds.aimon.applicationinsights.io/apps/b123a2f0-0bf9-42ad-9de3-6d5c4446954f/annotations?api-version=2015-05-01&accountId=ad825170-845c-47db-8f00-11978947b089&applicationName=workitemintegrationtest2","stacktrace":"Microsoft.AppInsights.Nexus.ResourceStore.ResourceStoreException: Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists\r\n at Microsoft.AppInsights.Nexus.ResourceProvider.Annotations.AnnotationsProvider.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.AnnotationsNxController.<>c__DisplayClass6_0.<b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.ManagementServices.Rules.Endpoint.Controllers.Nexus.NexusControllerBase.d__17.MoveNext()"}} + "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z"}} }, - "400": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}} + "400": { + "body:" {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}}} } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index f4336d40b3ed..6ce93f0f1d72 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -28,6 +28,8 @@ } ] }, - "400": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z"}} + "400": { + "body": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z"}} + } } } \ No newline at end of file From a39d1a052d52275e830b1120e22556e24c0633e6 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 13:57:07 -0800 Subject: [PATCH 12/17] Fix syntax --- .../stable/2015-05-01/examples/AnnotationsCreate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json index 4eb01b071b46..3672390601ad 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -14,6 +14,6 @@ "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z"}} }, "400": { - "body:" {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}}} + "body": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}}} } } \ No newline at end of file From c284f756ab2fce153bbcd1a94274c330901588af Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 14:18:14 -0800 Subject: [PATCH 13/17] Fix more errors --- .../stable/2015-05-01/componentAnnotations_API.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index a3ee4361cc6c..306803db8835 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -127,7 +127,10 @@ } }, "400": { - "description": "Invalid time" + "description": "Invalid time", + "schema": { + "$ref": "#/definitions/AnnotationCreateError" + } } }, "x-ms-examples": { @@ -204,7 +207,7 @@ "404": { "description": "The Annotation with given id does not exist.", "schema": { - "$ref": "#/definitions/InnerError" + "$ref": "#/definitions/AnnotationCreateError" } } }, @@ -276,7 +279,7 @@ "type": "string", "description": "Error message" }, - "innerError": { + "innererror": { "$ref": "#/definitions/InnerError" } } From e89fc31a106db4ff9c86ff48d7e8ec0c3aa545f9 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Tue, 6 Feb 2018 16:35:41 -0800 Subject: [PATCH 14/17] Add work item configuration api --- .../componentWorkItemConfigs_API.json | 314 ++++++++++++++++++ .../examples/WorkItemConfigDefaultGet.json | 13 + .../examples/WorkItemConfigDelete.json | 14 + .../examples/WorkItemConfigsCreate.json | 14 + .../examples/WorkItemConfigsGet.json | 16 + .../resource-manager/readme.md | 1 + 6 files changed, 372 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDelete.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsCreate.json create mode 100644 specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json new file mode 100644 index 000000000000..08e64f907698 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json @@ -0,0 +1,314 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights client for work item configurations for a component.", + "version": "2015-05-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/WorkItemConfigs": { + "get": { + "description": "Gets the list work item configurations that exist for the application", + "operationId": "WorkItemConfigurations_List", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkItemConfiguration" + } + } + }, + "404": { + "description": "No configurations exist", + "schema": { + "$ref": "#/definitions/WorkItemConfigurationError" + } + } + }, + "x-ms-examples": { + "WorkItemConfigurationsList": { + "$ref": "./examples/WorkItemConfigsGet.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + }, + "post": { + "description": "Create a work item configuration for an Application Insights component.", + "operationId": "WorkItemConfigurations_Create", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "WorkItemConfigurationProperties", + "description": "Properties that need to be specified to create a work item configuration of a Application Insights component.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkItemCreateConfiguration" + } + } + ], + "responses": { + "200": { + "description": "An object containing the work item configuration definition created by this PUT call.", + "schema": { + "$ref": "#/definitions/WorkItemConfiguration" + } + } + }, + "x-ms-examples": { + "WorkItemConfigurationsCreate": { + "$ref": "./examples/WorkItemConfigsCreate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/DefaultWorkItemConfig": { + "get": { + "description": "Gets default work item configurations that exist for the application", + "operationId": "WorkItemConfigurations_GetDefault", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/WorkItemConfiguration" + } + } + }, + "x-ms-examples": { + "WorkItemConfigurationsGetDefault": { + "$ref": "./examples/WorkItemConfigDefaultGet.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}": { + "delete": { + "description": "Delete an workitem configuration of an Application Insights component.", + "operationId": "WorkItemConfigurations_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/WorkItemConfigIdParameter" + } + ], + "responses": { + "200": { + "description": "The workitem that was successfully deleted." + } + }, + "x-ms-examples": { + "WorkItemConfigurationDelete": { + "$ref": "./examples/WorkItemConfigDelete.json" + } + } + } + } + }, + "definitions": { + "WorkItemConfiguration": { + "type": "object", + "description": "Work item configuration associated with an application insights resource.", + "properties": { + "ConnectorId": { + "type": "string", + "description": "Connector identifier where work item is created" + }, + "ConfigDisplayName": { + "type": "string", + "description": "Configuration friendly name" + }, + "IsDefault": { + "type": "boolean", + "description": "Boolean value indicating whether configuration is default" + }, + "Id": { + "type": "string", + "description": "Unique Id for work item" + }, + "ConfigProperties": { + "type": "string", + "description": "Serialized JSON object for detailed properties" + } + } + }, + "WorkItemCreateConfiguration": { + "type": "object", + "description": "Work item configuration creation payload", + "properties": { + "ConnectorId": { + "type": "string", + "description": "Unique connector id" + }, + "ConnectorDataConfiguration": { + "type": "string", + "description": "Serialized JSON object for detaile d properties" + }, + "ValidateOnly": { + "type": "boolean", + "description": "Boolean indicating validate only" + }, + "WorkItemProperties": { + "type": "string", + "description": "Custom work item properties" + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error", + "properties": { + "diagnosticcontext": { + "type": "string", + "description": "Provides correlation for request" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "Request time" + } + } + }, + "WorkItemConfigurationError": { + "type": "object", + "description": "Error associated with trying to get work item configuration or configurations", + "properties": { + "code": { + "type": "string", + "description": "Error detail code and explanation" + }, + "message": { + "type": "string", + "description": "Error message" + }, + "innerError": { + "$ref": "#/definitions/InnerError" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "WorkItemConfigIdParameter": { + "name": "workItemConfigId", + "in": "path", + "required": true, + "type": "string", + "description": "The unique work item configuration Id. This can be either friendly name of connector as defined in connector configuration", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json new file mode 100644 index 000000000000..0091ef21820a --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component" + }, + "responses": { + "200": { + "body": {"ConnectorId":"d334e2a4-6733-488e-8645-a9fdc1694f41","IsDefault":true,"ConfigDisplayName":"Visual Studio Team Services","Id":"Visual Studio Team Services","ConfigProperties":"{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"} + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDelete.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDelete.json new file mode 100644 index 000000000000..015d47baa0a8 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "workItemConfigId": "Visual Studio Team Services" + }, + "responses": { + "200": { + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsCreate.json new file mode 100644 index 000000000000..48be36a02728 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsCreate.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "WorkItemConfigurationProperties": {"ConnectorId":"d334e2a4-6733-488e-8645-a9fdc1694f41","ConnectorDataConfiguration":{"VSOAccountBaseUrl":"https://testtodelete.visualstudio.com","ProjectCollection":"DefaultCollection","Project":"todeletefirst","ResourceId":"d0662b05-439a-4a1b-840b-33a7f8b42ebf","Custom":"{\"/fields/System.WorkItemType\":\"Bug\",\"/fields/System.AreaPath\":\"todeletefirst\",\"/fields/System.AssignedTo\":\"\"}"},"WorkItemProperties":[{"name":"Title","value":"Validate Only Title"},{"name":"Description","value":"Validate Only Description"}],"ValidateOnly":"true"} + }, + "responses": { + "200": { + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json new file mode 100644 index 000000000000..aeaccb554796 --- /dev/null +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component" + }, + "responses": { + "200": { + "body": [{"ConnectorId":"d334e2a4-6733-488e-8645-a9fdc1694f41","IsDefault":true,"ConfigDisplayName":"Visual Studio Team Services","Id":"Visual Studio Team Services","ConfigProperties":"{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"b370eeb2-5dff-4838-8253-ec3014b2c706\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"},{"ConnectorId":"4C89E219-D47E-4C14-866A-018D6D634CF3","IsDefault":false,"ConfigDisplayName":"GitHub","Id":"GitHub","ConfigProperties":"{\"GitHubAccountUrl\":\"https://github.com/jpiyali/testrepository\",\"ResourceId\":\"b370eeb2-5dff-4838-8253-ec3014b2c706\"}"}] + }, + "404": { + "body": {"code":"Did not find a default work item config","message":"Did not find a default work item config","innererror":{"diagnosticcontext":"1e1c639f-f313-4031-92d1-b8d298a4f941","time":"2018-02-07T00:20:52.0409178Z"}} + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index 93ce879cdb66..da7b6fdfb534 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -180,6 +180,7 @@ input-file: - microsoft.insights/stable/2015-05-01/componentFeaturesAndPricing_API.json - microsoft.insights/stable/2015-05-01/componentApiKeys_API.json - microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +- microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json ``` --- # Code Generation From d73b42226fcdc68510b5647b1fefff35565c700d Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Mon, 12 Feb 2018 15:45:34 -0800 Subject: [PATCH 15/17] Fix pr=true error --- .../stable/2015-05-01/componentWorkItemConfigs_API.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json index 08e64f907698..fa76ccbf125d 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json @@ -178,7 +178,9 @@ ], "responses": { "200": { - "description": "The workitem that was successfully deleted." + "description": "The work item configuration that was successfully deleted.", + "schema": { + } } }, "x-ms-examples": { @@ -265,7 +267,7 @@ "type": "string", "description": "Error message" }, - "innerError": { + "innererror": { "$ref": "#/definitions/InnerError" } } From a07c46bb722bca38995a5191f25bf2f86c6076c4 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Thu, 15 Feb 2018 14:21:44 -0800 Subject: [PATCH 16/17] Address code review comment for replacing error codes with defaultError definition --- .../2015-05-01/componentAnnotations_API.json | 28 ++++++++----------- .../componentWorkItemConfigs_API.json | 4 +-- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json index 306803db8835..d754ebbe55c4 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentAnnotations_API.json @@ -68,10 +68,10 @@ } } }, - "400": { - "description": "Invalid start or end time", - "schema": { - "$ref": "#/definitions/AnnotationCreateError" + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/AnnotationError" } } }, @@ -120,16 +120,10 @@ } } }, - "409": { - "description": "Annotation with Id already exists.", + "default": { + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/AnnotationCreateError" - } - }, - "400": { - "description": "Invalid time", - "schema": { - "$ref": "#/definitions/AnnotationCreateError" + "$ref": "#/definitions/AnnotationError" } } }, @@ -204,10 +198,10 @@ } } }, - "404": { - "description": "The Annotation with given id does not exist.", + "default": { + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/AnnotationCreateError" + "$ref": "#/definitions/AnnotationError" } } }, @@ -267,7 +261,7 @@ } } }, - "AnnotationCreateError": { + "AnnotationError": { "type": "object", "description": "Error associated with trying to create annotation with Id that already exist", "properties": { diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json index fa76ccbf125d..015450759f20 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/componentWorkItemConfigs_API.json @@ -62,8 +62,8 @@ } } }, - "404": { - "description": "No configurations exist", + "default": { + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/WorkItemConfigurationError" } From ae8994ba20c08efe60cbc9da278d15017b16946c Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Fri, 16 Feb 2018 10:46:18 -0800 Subject: [PATCH 17/17] Remove error codes from examples --- .../stable/2015-05-01/examples/AnnotationsCreate.json | 7 +------ .../stable/2015-05-01/examples/AnnotationsGet.json | 6 +----- .../stable/2015-05-01/examples/AnnotationsList.json | 5 +---- .../stable/2015-05-01/examples/WorkItemConfigsGet.json | 5 +---- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json index 3672390601ad..67c97adc651f 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsCreate.json @@ -9,11 +9,6 @@ "responses": { "200": { "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] - }, - "409": { - "body": {"code":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","message":"Annotation with id '74bb2a14-0f18-4ad1-9ad9-b848c3160413' already exists","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-05T23:58:29.0269694Z"}} - }, - "400": { - "body": {"code":"Specify valid time of event","message":"Specify valid time of event","innererror":{"diagnosticcontext":"e011d787-f884-47cd-8bcb-cf4d2339c790","time":"2018-02-06T00:04:37.4725142Z"}}} + } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json index d00a55b38575..780a05cf6f28 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsGet.json @@ -9,10 +9,6 @@ "responses": { "200": { "body": [{"AnnotationName":"TestAnnotation","Id":"444e2c08-274a-4bbb-a89e-d77bb720f44a","Category":"Text","Properties":"{\"Comments\":\"Testing\",\"Label\":\"Success\"}","EventTime":"2018-01-31T13:41:38.657+00:00","RelatedAnnotation":null}] - }, - "404": { - "body": {"code":"One or more errors occurred.","message":"One or more errors occurred.","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:10:42.3761322Z"} - } - } + } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json index 6ce93f0f1d72..0a8b6b1afb7c 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/AnnotationsList.json @@ -27,9 +27,6 @@ "RelatedAnnotation":null } ] - }, - "400": { - "body": {"code":"Invalid end time","message":"Invalid end time","innererror":{"diagnosticcontext":"e70c9679-a4cd-480f-93ce-6ddc7732a6bc","time":"2018-02-06T00:08:27.6971029Z"}} - } + } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json index aeaccb554796..7ad77c1dfc2f 100644 --- a/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json +++ b/specification/applicationinsights/resource-manager/microsoft.insights/stable/2015-05-01/examples/WorkItemConfigsGet.json @@ -8,9 +8,6 @@ "responses": { "200": { "body": [{"ConnectorId":"d334e2a4-6733-488e-8645-a9fdc1694f41","IsDefault":true,"ConfigDisplayName":"Visual Studio Team Services","Id":"Visual Studio Team Services","ConfigProperties":"{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"b370eeb2-5dff-4838-8253-ec3014b2c706\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"},{"ConnectorId":"4C89E219-D47E-4C14-866A-018D6D634CF3","IsDefault":false,"ConfigDisplayName":"GitHub","Id":"GitHub","ConfigProperties":"{\"GitHubAccountUrl\":\"https://github.com/jpiyali/testrepository\",\"ResourceId\":\"b370eeb2-5dff-4838-8253-ec3014b2c706\"}"}] - }, - "404": { - "body": {"code":"Did not find a default work item config","message":"Did not find a default work item config","innererror":{"diagnosticcontext":"1e1c639f-f313-4031-92d1-b8d298a4f941","time":"2018-02-07T00:20:52.0409178Z"}} - } + } } } \ No newline at end of file