Skip to content
Prev Previous commit
Next Next commit
fix workbook patch operation
  • Loading branch information
Aviram Leder committed Jul 3, 2018
commit d88a6c0dcaa870b5c315ce8eca79798363fb5361
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,15 @@
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"workbookProperties": {
"name": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"workbookUpdateParameters": {
"location": "west us",
"tags": [
"TagSample01",
"TagSample02"
],
"kind": "shared",
"tags": null,
"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": null
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"200": {
"description": "A list containing 0 or more workbook definitions.",
"schema": {
"$ref": "#/definitions/WorkbooksListResult"
"$ref": "#/definitions/Workbooks"
}
},
"default": {
Expand All @@ -72,9 +72,6 @@
}
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"x-ms-examples": {
"WorkbooksList": {
"$ref": "./examples/WorkbooksList.json"
Expand All @@ -85,7 +82,7 @@
"/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": {
"get": {
"description": "Get a single workbook by its resourceName.",
"operationId": "Workbooks_Get",
"operationId": "Workbook_Get",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
Expand Down Expand Up @@ -122,7 +119,7 @@
},
"delete": {
"description": "Delete a workbook.",
"operationId": "Workbooks_Delete",
"operationId": "Workbook_Delete",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
Expand Down Expand Up @@ -159,7 +156,7 @@
},
"put": {
"description": "Create a new workbook.",
"operationId": "Workbooks_CreateOrUpdate",
"operationId": "Workbook_CreateOrUpdate",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
Expand Down Expand Up @@ -211,7 +208,7 @@
},
"patch": {
"description": "Updates a workbook that has already been added.",
"operationId": "Workbooks_Update",
"operationId": "Workbook_Update",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
Expand All @@ -226,12 +223,12 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "workbookProperties",
"name": "workbookUpdateParameters",
"description": "Properties that need to be specified to create a new workbook.",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Workbook"
"$ref": "#/definitions/WorkbookUpdateParameters"
}
}
],
Expand All @@ -258,7 +255,7 @@
}
},
"definitions": {
"WorkbookResource": {
"Resource": {
"properties": {
"id": {
"type": "string",
Expand Down Expand Up @@ -296,11 +293,10 @@
"x-ms-azure-resource": true,
"description": "An azure resource object"
},
"WorkbooksListResult": {
"Workbooks": {
"properties": {
"value": {
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/Workbook"
},
Expand All @@ -313,7 +309,7 @@
"description": "An Application Insights workbook definition.",
"allOf": [
{
"$ref": "#/definitions/WorkbookResource"
"$ref": "#/definitions/Resource"
}
],
"properties": {
Expand Down Expand Up @@ -420,6 +416,67 @@
}
}
},
"WorkbookUpdateParameters": {
"properties": {
"kind": {
"type": "string",
"description": "The kind of workbook. Choices are user and shared.",
"enum": [
"user",
"shared"
],
"x-ms-enum": {
"name": "SharedTypeKind",
"modelAsString": true
}
},
"tags": {
"type": "array",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"location": {
"type": "string",
"description": "Resource location",
"x-ms-mutability": [
"create",
"read"
]
},
"properties": {
"x-ms-client-flatten": true,
"description": "Metadata describing a workbook for an Azure resource.",
"$ref": "#/definitions/WorkbookPropertiesUpdateParameters"
}
},
"description": "The parameters that can be provided when updating workbook properties properties."
},
"WorkbookPropertiesUpdateParameters": {
"description": "Properties that contain a workbook for PATCH operation.",
"properties": {
"name": {
"type": "string",
"description": "The user-defined name (display name) of the workbook."
},
"serializedData": {
"type": "string",
"description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON"
},
"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"
}
}
},
"ErrorFieldContract": {
"properties": {
"code": {
Expand Down