From a892e9fd58932c8cfc3faa94d0525e5824dcc247 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:18:09 -0700 Subject: [PATCH 01/13] Adding Workbooks resource type. --- .../examples/LinkedWorkbookResponseOnly.json | 13 + .../2015-05-01/examples/WorkbookAdd.json | 51 ++ .../2015-05-01/examples/WorkbookAddLink.json | 14 + .../2015-05-01/examples/WorkbookGet.json | 33 + .../examples/WorkbookResponseOnly.json | 16 + .../2015-05-01/examples/WorkbookUpdate.json | 50 ++ .../examples/WorkbookUpdateLink.json | 32 + .../2015-05-01/examples/WorkbooksList.json | 49 ++ .../examples/WorkbooksListLink.json | 51 ++ .../2015-05-01/examples/workbookDelete.json | 15 + .../stable/2015-05-01/workbooks_API.json | 695 ++++++++++++++++++ .../resource-manager/readme.md | 2 + .../2015-04-01/examples/OperationList.json | 49 +- 13 files changed, 1065 insertions(+), 5 deletions(-) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json new file mode 100644 index 000000000000..7fe66f3c0846 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "linkProperties": { + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" + } + }, + "responses": { + "200": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json new file mode 100644 index 000000000000..0e7c71f15345 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "subscriptionId": "subid", + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json new file mode 100644 index 000000000000..12d17c0aee18 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json new file mode 100644 index 000000000000..ceb4e88622bc --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "type": "", + "location": "westus", + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json new file mode 100644 index 000000000000..5abc43074990 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "sourceId": "azure source id", + "category": "workbook", + "location": "us west", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json new file mode 100644 index 000000000000..f135343b34df --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } +} + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json new file mode 100644 index 000000000000..79a275036eb1 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "timeModified": null, + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json new file mode 100644 index 000000000000..e762584335e6 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "category": "workbook" + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"verion\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json new file mode 100644 index 000000000000..b0262789137d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "canFetchWorkbook": true, + "tags": [] + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json new file mode 100644 index 000000000000..4b7ff91a4b45 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json new file mode 100644 index 000000000000..c2987ea71f1d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -0,0 +1,695 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights workbook type.", + "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}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "get": { + "description": "Get all Workbooks defined within a specified resource group and category.", + "operationId": "Workbooks_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "$ref": "#/definitions/WorkbookListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbooks_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookDelete.json" + } + } + }, + "put": { + "description": "Create a new workbook.", + "operationId": "Workbooks_Create", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/WorkbookAdd.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The workbook definition updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbooks_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + }, + "/providers/microsoft.insights/workbooks": { + "get": { + "description": "Gets a list of workbooks.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksListLink.json" + } + } + }, + "put": { + "description": "Create a new workbook link.", + "operationId": "Workbooks_CreateLink", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The link has been created." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_UpdateLink", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The workbook link updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbooks_DeleteLink", + "parameters": [ + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook link has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookResponseOnly.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "WorkbookListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + }, + "description": "An array of workbooks." + } + }, + "description": "Workbook list result." + }, + "Workbook": { + "description": "An Application Insights workbook definition.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": false + } + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a web test for an Azure resource.", + "$ref": "#/definitions/WorkbookProperties" + } + } + }, + "LinkProperties": { + "description": "Contains a sourceId and workbook resource id to link two resources.", + "properties": { + "sourceId": { + "type": "string", + "description": "The source Azure resource id" + }, + "targetId": { + "type": "string", + "description": "The workbook Azure resource id" + }, + "category": { + "type": "string", + "description": "The category of workbook" + } + } + }, + "WorkbookProperties": { + "description": "Properties that contain a workbook.", + "required": [ + "name", + "kind", + "category", + "workbookId", + "serializedData", + "userId" + ], + "properties": { + "name": { + "type": "string", + "description": "The user-defined name of the workbook." + }, + "serializedData": { + "type": "string", + "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" + }, + "version": { + "type": "string", + "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." + }, + "workbookId": { + "type": "string", + "description": "Internally assigned unique id of the workbook definition." + }, + "kind": { + "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", + "x-ms-client-name": "SharedTypeKind", + "default": "shared", + "type": "string", + "enum": [ + "shared", + "user" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": false + } + }, + "timeModified": { + "type": "string", + "description": "Date and time in UTC of the last modification that was made to this workbook definition.", + "readOnly": true + }, + "category": { + "type": "string", + "description": "Workbook category, as defined by the user at creation time." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of 0 or more tags that are associated with this workbook definition" + }, + "userId": { + "type": "string", + "description": "Unique user id of the specific user that owns this workbook." + }, + "sourceResourceId": { + "type": "string", + "description": "Optional resourceId for a source resource." + } + } + }, + "ErrorFieldContract": { + "properties": { + "code": { + "type": "string", + "description": "Property level error code." + }, + "message": { + "type": "string", + "description": "Human-readable representation of property-level error." + }, + "target": { + "type": "string", + "description": "Property name." + } + }, + "description": "Error Field contract." + }, + "WorkbookErrorResponse": { + "properties": { + "code": { + "type": "string", + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorFieldContract" + }, + "description": "The list of invalid fields send in request, in case of validation error." + } + }, + "description": "Error message body that will indicate why the operation failed." + } + }, + "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" + }, + "WorkbookResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "query", + "required": true, + "type": "string", + "description": "The name of location where workbook is stored.", + "x-ms-parameter-location": "method" + }, + "CategoryParameter": { + "name": "category", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "workbook", + "TSG", + "performance", + "retention" + ], + "x-ms-enum": { + "name": "CategoryType", + "modelAsString": true + }, + "description": "Category of workbook to return.", + "x-ms-parameter-location": "method" + }, + "SourceIdParameter": { + "name": "sourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id that will fetch all linked workbooks.", + "x-ms-parameter-location": "method" + }, + "CanFetchWorkbookContentParameter": { + "name": "canFetchContent", + "in": "query", + "required": false, + "type": "boolean", + "description": "Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks.", + "x-ms-parameter-location": "method" + }, + "TagsParameter": { + "name": "tags", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Tags presents on each workbook returned.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index c56fa95dcc25..48a626053ec4 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -245,6 +245,7 @@ input-file: - Microsoft.Insights/stable/2015-05-01/favorites_API.json - Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json - Microsoft.Insights/stable/2015-05-01/webTests_API.json +- Microsoft.Insights/stable/2015-05-01/workbooks_API.json ``` ### Tag: package-2017-10 @@ -376,6 +377,7 @@ input-file: - ./Microsoft.Insights/stable/2015-05-01/aiOperations_API.json - ./Microsoft.Insights/stable/2015-05-01/components_API.json - ./Microsoft.Insights/stable/2015-05-01/webTests_API.json + - ./Microsoft.Insights/stable/2015-05-01/workbooks_API.json override-info: title: ApplicationInsightsManagementClient diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json b/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json index ecb517307f53..a9b7694da946 100644 --- a/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json @@ -659,13 +659,52 @@ } }, { - "name":"Microsoft.Insights/Webtests/Read", + "name":"Microsoft.Insights/Workbooks/Read", "display":{ "publisher":"Microsoft", - "provider":"Microsoft Monitoring Insights", - "resource":"Web tests", - "operation":"Webtest read", - "description":"Reading a webtest configuration" + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks read", + "description":"Reading a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks write", + "description":"Writing to a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks delete", + "description":"Deleting a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks read", + "description":"Reading a Workbooks configuration" }, "properties":{ From aee99140e738b1db27861cc263ff999b6a57c637 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:30:45 -0700 Subject: [PATCH 02/13] Rename workbookDelete.json to WorkbookDelete.json --- .../examples/{workbookDelete.json => WorkbookDelete.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/{workbookDelete.json => WorkbookDelete.json} (100%) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json similarity index 100% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json From 4ba66aa10ab02dd9018381b7b3e7210174b60dc1 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:52:16 -0700 Subject: [PATCH 03/13] Fixed undefiend parameter issue with Delete verb. --- .../2015-05-01/examples/WorkbookDeleteLink.json | 14 ++++++++++++++ .../stable/2015-05-01/workbooks_API.json | 17 +++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json new file mode 100644 index 000000000000..d9b4bc1de5ea --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "resourceId": "Azure resource id", + "category": "workbook", + "location": "west us" + }, + "responses": { + "200": { + }, + "204": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index c2987ea71f1d..360fbfec01ea 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -371,14 +371,11 @@ } }, "delete": { - "description": "Delete a workbook.", + "description": "Delete a link between a source resource and workbook resource.", "operationId": "Workbooks_DeleteLink", "parameters": [ { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" + "$ref": "#/parameters/ResourceIdParameter" }, { "$ref": "#/parameters/CategoryParameter" @@ -403,7 +400,7 @@ }, "x-ms-examples": { "WorkbookList": { - "$ref": "./examples/WorkbookResponseOnly.json" + "$ref": "./examples/WorkbookDeleteLink.json" } } } @@ -671,6 +668,14 @@ "description": "Azure Resource Id that will fetch all linked workbooks.", "x-ms-parameter-location": "method" }, + "ResourceIdParameter": { + "name": "resourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id or any target workbook resource id.", + "x-ms-parameter-location": "method" + }, "CanFetchWorkbookContentParameter": { "name": "canFetchContent", "in": "query", From 667221564451572a6967ad8f15baf609a46ffe8a Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 30 Mar 2018 12:22:20 -0700 Subject: [PATCH 04/13] Update swagger to add subscriptionId --- .../examples/LinkedWorkbookResponseOnly.json | 3 +- .../2015-05-01/examples/WorkbookAddLink.json | 2 +- .../examples/WorkbookDeleteLink.json | 1 + .../stable/2015-05-01/workbooks_API.json | 65 +++++++++++++++++-- 4 files changed, 62 insertions(+), 9 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json index 7fe66f3c0846..4df7f492d046 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -1,5 +1,6 @@ { "parameters": { + "subscriptionId": "subid", "api-version": "2015-05-01", "linkProperties": { "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", @@ -8,6 +9,6 @@ }, "responses": { "200": { - } + } } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json index 12d17c0aee18..5b1a848b1072 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json @@ -6,7 +6,7 @@ "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" }, "responses": { - "200": { + "201": { }, "204": { } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json index d9b4bc1de5ea..92dcebcd3c89 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -1,5 +1,6 @@ { "parameters": { + "subscriptionId": "subid", "api-version": "2015-05-01", "resourceId": "Azure resource id", "category": "workbook", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 360fbfec01ea..0a72d85d0cc3 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -118,7 +118,7 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookDelete": { "$ref": "./examples/WorkbookDelete.json" } } @@ -210,7 +210,7 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookUpdate": { "$ref": "./examples/WorkbookUpdate.json" } } @@ -255,11 +255,14 @@ } } }, - "/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { "get": { "description": "Gets a list of workbooks.", "operationId": "Workbooks_ListBySourceId", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/SourceIdParameter" }, @@ -294,7 +297,7 @@ } }, "x-ms-examples": { - "WorkbooksList": { + "WorkbooksListLink": { "$ref": "./examples/WorkbooksListLink.json" } } @@ -303,6 +306,9 @@ "description": "Create a new workbook link.", "operationId": "Workbooks_CreateLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -337,6 +343,9 @@ "description": "Updates a workbook that has already been added.", "operationId": "Workbooks_UpdateLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -365,7 +374,7 @@ } }, "x-ms-examples": { - "WorkbookAdd": { + "WorkbookUpdateLink": { "$ref": "./examples/LinkedWorkbookResponseOnly.json" } } @@ -374,6 +383,9 @@ "description": "Delete a link between a source resource and workbook resource.", "operationId": "Workbooks_DeleteLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ResourceIdParameter" }, @@ -399,12 +411,51 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookDeleteLink": { "$ref": "./examples/WorkbookDeleteLink.json" } } } - } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { + "get": { + "description": "Gets a workbook link by a workbook resource name.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + } }, "definitions": { "Resource": { From 92ff8e941e2653e47b92665f1a30943ac968fe84 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 30 Mar 2018 12:52:34 -0700 Subject: [PATCH 05/13] Fixed duplicated operation id issue --- .../Microsoft.Insights/stable/2015-05-01/workbooks_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 0a72d85d0cc3..28e4b6584cf7 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -258,7 +258,7 @@ "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { "get": { "description": "Gets a list of workbooks.", - "operationId": "Workbooks_ListBySourceId", + "operationId": "Workbooks_List", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" From c245a85973ec62e036c09efc7375f77a5c4cf758 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 13:21:50 -0700 Subject: [PATCH 06/13] Removed links endpoint --- .../2015-05-01/examples/WorkbookAdd.json | 38 +-- .../2015-05-01/examples/WorkbookUpdate.json | 38 +-- .../2015-05-01/examples/WorkbooksList.json | 4 +- .../stable/2015-05-01/workbooks_API.json | 240 ++---------------- 4 files changed, 70 insertions(+), 250 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index 0e7c71f15345..e39be4602011 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -4,24 +4,28 @@ "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", - "workbookProperties": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null + "workbookPayload": { + "workbook": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "linkResource": { + } } }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index f135343b34df..bb9cd81cc240 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -4,24 +4,28 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null + "workbookPayload": { + "workbook": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + }, + "linkResource": { } -} + } }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index e762584335e6..48cd4fda78c8 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -2,9 +2,9 @@ "parameters": { "api-version": "2015-05-01", "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", "location": "west us", - "category": "workbook" + "category": "workbook", + "resourceId": "resource id" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 28e4b6584cf7..a62da0b59b55 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -34,17 +34,14 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { "get": { - "description": "Get all Workbooks defined within a specified resource group and category.", + "description": "Get all Workbooks defined within a specified subscriptionId. It will get a list of workbooks or linked workbooks based on $filter clause. If sourceId is specified, it will get a list of linked workbboks. If a targetId is specified, it will get a list of workboks. When a targetId is specified, a resourceName is not required. Even if it is provided, it will be ignored.", "operationId": "Workbooks_ListByResourceGroup", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, { "$ref": "#/parameters/LocationParameter" }, @@ -59,6 +56,9 @@ }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceIdParameter" } ], "responses": { @@ -140,12 +140,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", + "name": "workbookPayload", + "description": "Properties that need to be specified to create a new workbook or link.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookPayload" } } ], @@ -186,12 +186,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", + "name": "workbookPayload", + "description": "Properties that need to be specified to create a new workbook or link.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookPayload" } } ], @@ -254,208 +254,7 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { - "get": { - "description": "Gets a list of workbooks.", - "operationId": "Workbooks_List", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/TagsParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A list containing 0 or more workbook definitions.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Workbook" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListLink.json" - } - } - }, - "put": { - "description": "Create a new workbook link.", - "operationId": "Workbooks_CreateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The link has been created." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookAdd": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "patch": { - "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_UpdateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The workbook link updated.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookUpdateLink": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "delete": { - "description": "Delete a link between a source resource and workbook resource.", - "operationId": "Workbooks_DeleteLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The workbook link has been successfully deleted." - }, - "204": { - "description": "The resource doens't exisit." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookDeleteLink": { - "$ref": "./examples/WorkbookDeleteLink.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { - "get": { - "description": "Gets a workbook link by a workbook resource name.", - "operationId": "Workbooks_ListBySourceId", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - } + } }, "definitions": { "Resource": { @@ -532,6 +331,19 @@ } } }, + "WorkbookPayload": { + "description": "This wraps either Workbook definition or LinkReource properties.", + "properties": { + "workbook": { + "$ref": "#/definitions/Workbook", + "description": "Workbook properties. If provided, it will be used to create new workbook." + }, + "linkResource": { + "$ref": "#/definitions/LinkProperties", + "description": "LinkProperties. If provided, it will be used to create a link." + } + } + }, "LinkProperties": { "description": "Contains a sourceId and workbook resource id to link two resources.", "properties": { @@ -724,7 +536,7 @@ "in": "query", "required": true, "type": "string", - "description": "Azure Resource Id or any target workbook resource id.", + "description": "Azure Resource id or any target workbook resource id.", "x-ms-parameter-location": "method" }, "CanFetchWorkbookContentParameter": { From bed6bc30d4bc4bd5716fb9f907ac74f224b4b81d Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 13:24:00 -0700 Subject: [PATCH 07/13] Removed unused samples --- .../examples/LinkedWorkbookResponseOnly.json | 14 ----- .../examples/WorkbookDeleteLink.json | 15 ------ .../examples/WorkbookUpdateLink.json | 32 ------------ .../examples/WorkbooksListLink.json | 51 ------------------- 4 files changed, 112 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json deleted file mode 100644 index 4df7f492d046..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "linkProperties": { - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" - } - }, - "responses": { - "200": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json deleted file mode 100644 index 92dcebcd3c89..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "resourceId": "Azure resource id", - "category": "workbook", - "location": "west us" - }, - "responses": { - "200": { - }, - "204": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json deleted file mode 100644 index 79a275036eb1..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "timeModified": null, - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json deleted file mode 100644 index b0262789137d..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "category": "workbook", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "canFetchWorkbook": true, - "tags": [] - }, - "responses": { - "200": { - "body": [ - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [], - "properties": { - "name": "My Workbook 1", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - }, - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": ["SampleTag01", "SampleTag2"], - "properties": { - "name": "My Workbook 2", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - ] - } - } -} \ No newline at end of file From d3bac2038fc4f6b4d21f12c014d2b1007ec1c3e5 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 14:56:00 -0700 Subject: [PATCH 08/13] Revert "Removed unused samples" This reverts commit bed6bc30d4bc4bd5716fb9f907ac74f224b4b81d. --- .../examples/LinkedWorkbookResponseOnly.json | 14 +++++ .../examples/WorkbookDeleteLink.json | 15 ++++++ .../examples/WorkbookUpdateLink.json | 32 ++++++++++++ .../examples/WorkbooksListLink.json | 51 +++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json new file mode 100644 index 000000000000..4df7f492d046 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2015-05-01", + "linkProperties": { + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" + } + }, + "responses": { + "200": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json new file mode 100644 index 000000000000..92dcebcd3c89 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2015-05-01", + "resourceId": "Azure resource id", + "category": "workbook", + "location": "west us" + }, + "responses": { + "200": { + }, + "204": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json new file mode 100644 index 000000000000..79a275036eb1 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "timeModified": null, + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json new file mode 100644 index 000000000000..b0262789137d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "canFetchWorkbook": true, + "tags": [] + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file From 5259a41517efcef04f500f54564c0a695d69e4af Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 14:56:09 -0700 Subject: [PATCH 09/13] Revert "Removed links endpoint" This reverts commit c245a85973ec62e036c09efc7375f77a5c4cf758. --- .../2015-05-01/examples/WorkbookAdd.json | 38 ++- .../2015-05-01/examples/WorkbookUpdate.json | 38 ++- .../2015-05-01/examples/WorkbooksList.json | 4 +- .../stable/2015-05-01/workbooks_API.json | 240 ++++++++++++++++-- 4 files changed, 250 insertions(+), 70 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index e39be4602011..0e7c71f15345 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -4,28 +4,24 @@ "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", - "workbookPayload": { - "workbook": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null }, - "linkResource": { - } + "tags": [ + "TagSample01", + "TagSample02" + ] } }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index bb9cd81cc240..f135343b34df 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -4,28 +4,24 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookPayload": { - "workbook": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - }, - "linkResource": { + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null } - } +} }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index 48cd4fda78c8..e762584335e6 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -2,9 +2,9 @@ "parameters": { "api-version": "2015-05-01", "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", "location": "west us", - "category": "workbook", - "resourceId": "resource id" + "category": "workbook" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index a62da0b59b55..28e4b6584cf7 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -34,14 +34,17 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { "get": { - "description": "Get all Workbooks defined within a specified subscriptionId. It will get a list of workbooks or linked workbooks based on $filter clause. If sourceId is specified, it will get a list of linked workbboks. If a targetId is specified, it will get a list of workboks. When a targetId is specified, a resourceName is not required. Even if it is provided, it will be ignored.", + "description": "Get all Workbooks defined within a specified resource group and category.", "operationId": "Workbooks_ListByResourceGroup", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, { "$ref": "#/parameters/LocationParameter" }, @@ -56,9 +59,6 @@ }, { "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" } ], "responses": { @@ -140,12 +140,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookPayload", - "description": "Properties that need to be specified to create a new workbook or link.", + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkbookPayload" + "$ref": "#/definitions/Workbook" } } ], @@ -186,12 +186,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookPayload", - "description": "Properties that need to be specified to create a new workbook or link.", + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkbookPayload" + "$ref": "#/definitions/Workbook" } } ], @@ -254,7 +254,208 @@ } } } - } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { + "get": { + "description": "Gets a list of workbooks.", + "operationId": "Workbooks_List", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksListLink": { + "$ref": "./examples/WorkbooksListLink.json" + } + } + }, + "put": { + "description": "Create a new workbook link.", + "operationId": "Workbooks_CreateLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The link has been created." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_UpdateLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The workbook link updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookUpdateLink": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "delete": { + "description": "Delete a link between a source resource and workbook resource.", + "operationId": "Workbooks_DeleteLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook link has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookDeleteLink": { + "$ref": "./examples/WorkbookDeleteLink.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { + "get": { + "description": "Gets a workbook link by a workbook resource name.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + } }, "definitions": { "Resource": { @@ -331,19 +532,6 @@ } } }, - "WorkbookPayload": { - "description": "This wraps either Workbook definition or LinkReource properties.", - "properties": { - "workbook": { - "$ref": "#/definitions/Workbook", - "description": "Workbook properties. If provided, it will be used to create new workbook." - }, - "linkResource": { - "$ref": "#/definitions/LinkProperties", - "description": "LinkProperties. If provided, it will be used to create a link." - } - } - }, "LinkProperties": { "description": "Contains a sourceId and workbook resource id to link two resources.", "properties": { @@ -536,7 +724,7 @@ "in": "query", "required": true, "type": "string", - "description": "Azure Resource id or any target workbook resource id.", + "description": "Azure Resource Id or any target workbook resource id.", "x-ms-parameter-location": "method" }, "CanFetchWorkbookContentParameter": { From 4227f6c77925c789e94cfa8b5e2545594e21b323 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 4 Apr 2018 17:50:34 -0700 Subject: [PATCH 10/13] Removed link logic and added get by resourceid --- .../examples/LinkedWorkbookResponseOnly.json | 14 -- .../2015-05-01/examples/WorkbookAdd.json | 22 ++ .../2015-05-01/examples/WorkbookAddLink.json | 14 -- .../2015-05-01/examples/WorkbookDelete.json | 2 +- .../examples/WorkbookDeleteLink.json | 15 -- .../examples/WorkbookResponseOnly.json | 16 -- .../examples/WorkbookUpdateLink.json | 32 --- ...Link.json => WorkbooksListBySourceId.json} | 0 .../stable/2015-05-01/workbooks_API.json | 199 +++--------------- 9 files changed, 49 insertions(+), 265 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json rename specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/{WorkbooksListLink.json => WorkbooksListBySourceId.json} (100%) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json deleted file mode 100644 index 4df7f492d046..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "linkProperties": { - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" - } - }, - "responses": { - "200": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index 0e7c71f15345..6a4d5b893386 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -46,6 +46,28 @@ "TagSample02" ] } + }, + "201": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "Blah Blah Blah", + "userId": "userId", + "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", + "version": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json deleted file mode 100644 index 5b1a848b1072..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" - }, - "responses": { - "201": { - }, - "204": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json index 4b7ff91a4b45..55e211e37569 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json @@ -7,7 +7,7 @@ "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" }, "responses": { - "200": { + "201": { }, "204": { } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json deleted file mode 100644 index 92dcebcd3c89..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "resourceId": "Azure resource id", - "category": "workbook", - "location": "west us" - }, - "responses": { - "200": { - }, - "204": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json deleted file mode 100644 index 5abc43074990..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "sourceId": "azure source id", - "category": "workbook", - "location": "us west", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" - }, - "responses": { - "200": { - }, - "204": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json deleted file mode 100644 index 79a275036eb1..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "timeModified": null, - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "Blah Blah Blah", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json similarity index 100% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 28e4b6584cf7..3af806c42aad 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -65,13 +65,13 @@ "200": { "description": "A list containing 0 or more workbook definitions.", "schema": { - "$ref": "#/definitions/WorkbookListResult" + "$ref": "#/definitions/Workbooks" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -85,7 +85,7 @@ "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { "delete": { "description": "Delete a workbook.", - "operationId": "Workbooks_Delete", + "operationId": "Workbook_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -104,16 +104,16 @@ } ], "responses": { - "200": { + "201": { "description": "The workbook has been successfully deleted." }, "204": { - "description": "The resource doens't exisit." + "description": "The resource doens't exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -125,7 +125,7 @@ }, "put": { "description": "Create a new workbook.", - "operationId": "Workbooks_Create", + "operationId": "Workbook_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -156,10 +156,16 @@ "$ref": "#/definitions/Workbook" } }, + "201": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -171,7 +177,7 @@ }, "patch": { "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_Update", + "operationId": "Workbook_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -205,7 +211,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -219,7 +225,7 @@ "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { "get": { "description": "Get a single workbook by its resourceName.", - "operationId": "Workbooks_Get", + "operationId": "Workbook_Get", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -244,7 +250,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -255,10 +261,10 @@ } } }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { "get": { - "description": "Gets a list of workbooks.", - "operationId": "Workbooks_List", + "description": "Gets a list of workbooks by sourceId.", + "operationId": "Workbook_List", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -292,170 +298,17 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, "x-ms-examples": { "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListLink.json" - } - } - }, - "put": { - "description": "Create a new workbook link.", - "operationId": "Workbooks_CreateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The link has been created." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookAdd": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "patch": { - "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_UpdateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The workbook link updated.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookUpdateLink": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "delete": { - "description": "Delete a link between a source resource and workbook resource.", - "operationId": "Workbooks_DeleteLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The workbook link has been successfully deleted." - }, - "204": { - "description": "The resource doens't exisit." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookDeleteLink": { - "$ref": "./examples/WorkbookDeleteLink.json" + "$ref": "./examples/WorkbooksListBySourceId.json" } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { - "get": { - "description": "Gets a workbook link by a workbook resource name.", - "operationId": "Workbooks_ListBySourceId", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - } + } }, "definitions": { "Resource": { @@ -493,7 +346,7 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "WorkbookListResult": { + "Workbooks": { "properties": { "value": { "type": "array", @@ -633,7 +486,7 @@ }, "description": "Error Field contract." }, - "WorkbookErrorResponse": { + "WorkbookError": { "properties": { "code": { "type": "string", From 328b75c26fc80e1be1fa36a4e5684dc302886c53 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 4 Apr 2018 17:56:03 -0700 Subject: [PATCH 11/13] Applied PR comments --- .../stable/2015-05-01/examples/WorkbookGet.json | 4 ++-- .../stable/2015-05-01/examples/WorkbookUpdate.json | 2 +- .../stable/2015-05-01/examples/WorkbooksList.json | 2 +- .../stable/2015-05-01/examples/WorkbooksListBySourceId.json | 2 +- .../Microsoft.Insights/stable/2015-05-01/workbooks_API.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json index ceb4e88622bc..f291a5d5b94b 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "location": "west us", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" @@ -14,7 +14,7 @@ "type": "", "location": "westus", "properties": { - "name": "Blah Blah Blah", + "name": "My New Workbook", "userId": "userId", "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", "version": "ME", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index f135343b34df..472a88653122 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "workbookProperties": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index e762584335e6..c1b1214d103c 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "location": "west us", "category": "workbook" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json index b0262789137d..2482bbab334f 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "category": "workbook", "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 3af806c42aad..4ad3bd1f42cb 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -375,7 +375,7 @@ ], "x-ms-enum": { "name": "SharedTypeKind", - "modelAsString": false + "modelAsString": true } }, "properties": { @@ -440,7 +440,7 @@ ], "x-ms-enum": { "name": "SharedTypeKind", - "modelAsString": false + "modelAsString": true } }, "timeModified": { From b7421982ebcb992a114798cc036d56c029bde370 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 18 Apr 2018 10:20:00 -0700 Subject: [PATCH 12/13] Added Resource Group parameter for GET. Removed get by sourceId since we are not using sourceId anymore --- .../examples/WorkbooksListBySourceId.json | 51 ------- .../stable/2015-05-01/workbooks_API.json | 127 ++++++------------ 2 files changed, 40 insertions(+), 138 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json deleted file mode 100644 index 2482bbab334f..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", - "resourceGroupName": "my-resource-group", - "category": "workbook", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "canFetchWorkbook": true, - "tags": [] - }, - "responses": { - "200": { - "body": [ - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [], - "properties": { - "name": "My Workbook 1", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - }, - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": ["SampleTag01", "SampleTag2"], - "properties": { - "name": "My Workbook 2", - "userId": "userId", - "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - "version": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - ] - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 4ad3bd1f42cb..1ab651d0e7ff 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -83,6 +83,46 @@ } }, "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbook_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + }, "delete": { "description": "Delete a workbook.", "operationId": "Workbook_Delete", @@ -221,93 +261,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { - "get": { - "description": "Get a single workbook by its resourceName.", - "operationId": "Workbook_Get", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/LocationParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { - "get": { - "description": "Gets a list of workbooks by sourceId.", - "operationId": "Workbook_List", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/TagsParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A list containing 0 or more workbook definitions.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Workbook" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListBySourceId.json" - } - } - } } }, "definitions": { From 12a39625cc68eb8eb32d3f864fbc025629864998 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 18 Apr 2018 11:02:05 -0700 Subject: [PATCH 13/13] Resolved the merge conflicts with readme.md --- specification/applicationinsights/resource-manager/readme.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index a9ce231acdac..1367e03a92b5 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -254,10 +254,7 @@ input-file: - Microsoft.Insights/stable/2015-05-01/favorites_API.json - Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json - Microsoft.Insights/stable/2015-05-01/webTests_API.json -<<<<<<< HEAD -======= - microsoft.insights/stable/2015-05-01/analyticsItems_API.json ->>>>>>> upstream/master - Microsoft.Insights/stable/2015-05-01/workbooks_API.json ```