From dfaf222482d66a226e7762c37992cf0179b6b9c1 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 20 Apr 2018 11:28:11 -0700 Subject: [PATCH] Modify Workbook Resource Type to include RG and remove unused endpoint (#2898) * Adding Workbooks resource type. * Rename workbookDelete.json to WorkbookDelete.json * Fixed undefiend parameter issue with Delete verb. * Update swagger to add subscriptionId * Fixed duplicated operation id issue * Removed links endpoint * Removed unused samples * Revert "Removed unused samples" This reverts commit bed6bc30d4bc4bd5716fb9f907ac74f224b4b81d. * Revert "Removed links endpoint" This reverts commit c245a85973ec62e036c09efc7375f77a5c4cf758. * Removed link logic and added get by resourceid * Applied PR comments * Added Resource Group parameter for GET. Removed get by sourceId since we are not using sourceId anymore * Resolved the merge conflicts with readme.md --- .../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": {