From 97c275d1f553fe5ddf5ee77e44d6f84a29b5635f Mon Sep 17 00:00:00 2001 From: Fabric-APIs-Publish-Specification-Pipeline Date: Tue, 22 Apr 2025 12:38:43 +0000 Subject: [PATCH] Updating swagger files. --- notebook/definitions.json | 135 ++++++ notebook/examples/CreateNotebook.json | 42 ++ .../CreateNotebookWithoutDefinition.json | 27 ++ notebook/examples/DeleteNotebook.json | 9 + notebook/examples/GetNotebook.json | 17 + notebook/examples/GetNotebookDefinition.json | 33 ++ .../examples/ListNotebooksInWorkspace.json | 20 + notebook/examples/UpdateNotebook.json | 21 + .../examples/UpdateNotebookDefinition.json | 34 ++ notebook/swagger.json | 456 ++++++++++++++++++ 10 files changed, 794 insertions(+) create mode 100644 notebook/definitions.json create mode 100644 notebook/examples/CreateNotebook.json create mode 100644 notebook/examples/CreateNotebookWithoutDefinition.json create mode 100644 notebook/examples/DeleteNotebook.json create mode 100644 notebook/examples/GetNotebook.json create mode 100644 notebook/examples/GetNotebookDefinition.json create mode 100644 notebook/examples/ListNotebooksInWorkspace.json create mode 100644 notebook/examples/UpdateNotebook.json create mode 100644 notebook/examples/UpdateNotebookDefinition.json create mode 100644 notebook/swagger.json diff --git a/notebook/definitions.json b/notebook/definitions.json new file mode 100644 index 0000000..9ee5d87 --- /dev/null +++ b/notebook/definitions.json @@ -0,0 +1,135 @@ +{ + "swagger": "2.0", + "info": { + "version": "v1", + "title": "Notebook data types" + }, + "paths": {}, + "definitions": { + "Notebooks": { + "description": "A list of notebooks.", + "required": ["value"], + "type": "object", + "properties": { + "value": { + "description": "A list of notebooks.", + "type": "array", + "items": { + "$ref": "#/definitions/Notebook" + } + } + }, + "allOf": [ + { + "$ref": "../common/definitions.json#/definitions/PaginatedResponse" + } + ] + }, + "Notebook": { + "description": "A notebook object.", + "type": "object", + "required": ["type"], + "allOf": [ + { + "$ref": "../common/definitions.json#/definitions/Item" + } + ] + }, + "CreateNotebookRequest": { + "description": "Create notebook request payload.", + "required": ["displayName"], + "properties": { + "displayName": { + "description": "The notebook display name. The display name must follow naming rules according to item type.", + "type": "string", + "readOnly": false + }, + "description": { + "description": "The notebook description. Maximum length is 256 characters.", + "type": "string", + "readOnly": false + }, + "definition": { + "description": "The notebook public definition.", + "$ref": "#/definitions/NotebookDefinition", + "readOnly": false + } + } + }, + "UpdateNotebookDefinitionRequest": { + "description": "Update notebook public definition request payload.", + "required": ["definition"], + "properties": { + "definition": { + "$ref": "#/definitions/NotebookDefinition" + } + } + }, + "NotebookDefinitionResponse": { + "description": "Notebook public definition response.", + "required": ["definition"], + "properties": { + "definition": { + "$ref": "#/definitions/NotebookDefinition", + "readOnly": true + } + } + }, + "NotebookDefinition" : { + "description": "Notebook public definition object. Refer to this [article](/rest/api/fabric/articles/item-management/definitions/notebook-definition) for more details on how to craft a notebook public definition.", + "type": "object", + "required": ["parts"], + "properties": { + "format": { + "description": "The format of the Notebook definition. Supported format: `ipynb`.", + "type": "string", + "readOnly": false + }, + "parts": { + "description": "A list of definition parts.", + "type": "array", + "items": { + "$ref": "#/definitions/NotebookDefinitionPart" + }, + "readOnly": false + } + } + }, + "NotebookDefinitionPart": { + "description": "Notebook definition part object.", + "type": "object", + "properties": { + "path": { + "description": "The notebook part path.", + "type": "string", + "readOnly": false + }, + "payload": { + "description": "The notebook part payload.", + "type": "string", + "readOnly": false + }, + "payloadType":{ + "description": "The payload type.", + "$ref": "../common/definitions.json#/definitions/PayloadType", + "readOnly": false + } + } + }, + "UpdateNotebookRequest": { + "description": "Update notebook request.", + "properties": { + "displayName": { + "description": "The notebook display name. The display name must follow naming rules according to item type.", + "type": "string", + "readOnly": false + }, + "description": { + "description": "The notebook description. Maximum length is 256 characters.", + "type": "string", + "readOnly": false + } + } + } + } +} diff --git a/notebook/examples/CreateNotebook.json b/notebook/examples/CreateNotebook.json new file mode 100644 index 0000000..428c1f0 --- /dev/null +++ b/notebook/examples/CreateNotebook.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "createNotebookRequest": { + "displayName": "Notebook 1", + "description": "A notebook description", + "definition": { + "format": "ipynb", + "parts": [ + { + "path": "notebook-content.py", + "payload": "eyJuYmZvcm1hdCI6N..5ndWUiOiJweXRob24ifX19", + "payloadType": "InlineBase64" + }, + { + "path": ".platform", + "payload": "ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc=", + "payloadType": "InlineBase64" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "displayName": "Notebook 1", + "description": "A notebook description", + "type": "Notebook", + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715" + } + }, + "202": { + "headers": { + "Location": "https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6", + "x-ms-operation-id": "0acd697c-1550-43cd-b998-91bfbfbd47c6", + "Retry-After": 30 + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/CreateNotebookWithoutDefinition.json b/notebook/examples/CreateNotebookWithoutDefinition.json new file mode 100644 index 0000000..cddcf42 --- /dev/null +++ b/notebook/examples/CreateNotebookWithoutDefinition.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "createNotebookRequest": { + "displayName": "Notebook 1", + "description": "A notebook description." + } + }, + "responses": { + "201": { + "body": { + "displayName": "Notebook 1", + "description": "A notebook description.", + "type": "Notebook", + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715" + } + }, + "202": { + "headers": { + "Location": "https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6", + "x-ms-operation-id": "0acd697c-1550-43cd-b998-91bfbfbd47c6", + "Retry-After": 30 + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/DeleteNotebook.json b/notebook/examples/DeleteNotebook.json new file mode 100644 index 0000000..8110160 --- /dev/null +++ b/notebook/examples/DeleteNotebook.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "notebookId": "5b218778-e7a5-4d73-8187-f10824047715" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/notebook/examples/GetNotebook.json b/notebook/examples/GetNotebook.json new file mode 100644 index 0000000..b8095e8 --- /dev/null +++ b/notebook/examples/GetNotebook.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "notebookId": "5b218778-e7a5-4d73-8187-f10824047715" + }, + "responses": { + "200": { + "body": { + "displayName": "Notebook 1", + "description": "A notebook description.", + "type": "Notebook", + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715" + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/GetNotebookDefinition.json b/notebook/examples/GetNotebookDefinition.json new file mode 100644 index 0000000..363577d --- /dev/null +++ b/notebook/examples/GetNotebookDefinition.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "workspaceId": "6e335e92-a2a2-4b5a-970a-bd6a89fbb765", + "notebookId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + }, + "responses": { + "200": { + "body": { + "definition": { + "parts": [ + { + "path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJv..5ndWUiOiJweXRob24ifX19", + "payloadType": "InlineBase64" + }, + { + "path": ".platform", + "payload": "ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc=", + "payloadType": "InlineBase64" + } + ] + } + } + }, + "202": { + "headers": { + "Location": "https://api.fabric.microsoft.com/v1/operations/431e8d7b-4a95-4c02-8ccd-6faef5ba1bd7", + "x-ms-operation-id": "431e8d7b-4a95-4c02-8ccd-6faef5ba1bd7", + "Retry-After": 30 + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/ListNotebooksInWorkspace.json b/notebook/examples/ListNotebooksInWorkspace.json new file mode 100644 index 0000000..c238148 --- /dev/null +++ b/notebook/examples/ListNotebooksInWorkspace.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "3546052c-ae64-4526-b1a8-52af7761426f", + "displayName": "Notebook Name 1", + "description": "A notebook description.", + "type": "Notebook", + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + } + ] + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/UpdateNotebook.json b/notebook/examples/UpdateNotebook.json new file mode 100644 index 0000000..76e7a98 --- /dev/null +++ b/notebook/examples/UpdateNotebook.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "notebookId": "5b218778-e7a5-4d73-8187-f10824047715", + "updateNotebookRequest": { + "displayName": "Notebook's New name", + "description": "A new description for notebook." + } + }, + "responses": { + "200": { + "body": { + "displayName": "Notebook's New name", + "description": "A new description for notebook.", + "type": "Notebook", + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715" + } + } + } +} \ No newline at end of file diff --git a/notebook/examples/UpdateNotebookDefinition.json b/notebook/examples/UpdateNotebookDefinition.json new file mode 100644 index 0000000..2e0207e --- /dev/null +++ b/notebook/examples/UpdateNotebookDefinition.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "notebookId": "5b218778-e7a5-4d73-8187-f10824047715", + "updateMetadata" : true, + "updateNotebookDefinitionRequest": { + "definition": { + "parts": [ + { + "path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJv...", + "payloadType": "InlineBase64" + }, + { + "path": ".platform", + "payload": "ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc=", + "payloadType": "InlineBase64" + } + ] + } + } + }, + "responses": { + "200": { + }, + "202": { + "headers": { + "Location": "https://api.fabric.microsoft.com/v1/operations/427f6c34-b64e-4ee4-8ea5-b533c0e203ef", + "x-ms-operation-id": "427f6c34-b64e-4ee4-8ea5-b533c0e203ef", + "Retry-After": 30 + } + } + } +} \ No newline at end of file diff --git a/notebook/swagger.json b/notebook/swagger.json new file mode 100644 index 0000000..0a9eec0 --- /dev/null +++ b/notebook/swagger.json @@ -0,0 +1,456 @@ +{ + "swagger": "2.0", + "info": { + "title": "Notebook REST APIs", + "version": "v1" + }, + "schemes": [ + "https" + ], + "host": "api.fabric.microsoft.com", + "basePath": "/v1", + "paths": { + "/workspaces/{workspaceId}/notebooks": { + "get": { + "summary": "Returns a list of notebooks from the specified workspace.", + "description": "This API supports [pagination](/rest/api/fabric/articles/pagination).\n\n## Permissions\n\n The caller must have *viewer* or higher workspace role. \n\n## Required Delegated Scopes \n\nWorkspace.Read.All or Workspace.ReadWrite.All\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_ListNotebooks", + "x-ms-pageable": { + "nextLinkName": "continuationUri" + }, + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "query", + "name": "continuationToken", + "description": "A token for retrieving the next page of results.", + "type": "string", + "required": false + } + ], + "responses": { + "200": { + "description": "Request completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/Notebooks" + } + }, + "default": { + "description": "Common error codes:\n\n* InvalidItemType - Invalid item type.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List notebooks in workspace example": { + "$ref": "./examples/ListNotebooksInWorkspace.json" + } + } + }, + "post": { + "summary": "Creates a notebook in the specified workspace.", + "description": "This API supports [long running operations (LRO)](/rest/api/fabric/articles/long-running-operation).\n\n To create notebook with definition, refer to [Notebook definition](/rest/api/fabric/articles/item-management/definitions/notebook-definition) article. \n\n ## Permissions \n The caller must have *contributor* or higher workspace role. \n\n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All \n\n## Limitations \n- To create a notebook the workspace must be on a supported Fabric capacity. For more information see: [Microsoft Fabric license types](/fabric/enterprise/licenses#microsoft-fabric-license-types).\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_CreateNotebook", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-fabric-sdk-long-running-operation": true, + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "body", + "name": "createNotebookRequest", + "description": "Create item request payload.", + "schema": { + "$ref": "./definitions.json#/definitions/CreateNotebookRequest" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Successfully created", + "schema": { + "$ref": "./definitions.json#/definitions/Notebook" + } + }, + "202": { + "description": "Request accepted, notebook provisioning in progress.", + "headers": { + "Location": { + "description": "The URL of the operation status, which can be used to track the operation state.", + "type": "string" + }, + "x-ms-operation-id": { + "description": "The operation ID which can be used with long running operations (LRO) APIs to track the operation state and get the result.", + "type": "string", + "format": "uuid" + }, + "Retry-After": { + "type": "integer", + "description": "The number of seconds to wait before retrying the request." + } + } + }, + "default": { + "description": "Common error codes:\n\n* InvalidItemType - Item type is invalid\n\n* ItemDisplayNameAlreadyInUse - Item display name is already used. \n\n* CorruptedPayload - The provided payload is corrupted. \n\n* WorkspaceItemsLimitExceeded - Workspace item limit exceeded.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create a notebook example": { + "$ref": "./examples/CreateNotebookWithoutDefinition.json" + }, + "Create a notebook with public definition example": { + "$ref": "./examples/CreateNotebook.json" + } + } + } + }, + "/workspaces/{workspaceId}/notebooks/{notebookId}": { + "get": { + "summary": "Returns properties of the specified notebook.", + "description": "## Permissions\n\n The caller must have *viewer* or higher workspace role. \n\n## Required Delegated Scopes \n\n Notebook.Read.All or Notebook.ReadWrite.All or Item.Read.All or Item.ReadWrite.All\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_GetNotebook", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "path", + "name": "notebookId", + "description": "The notebook ID.", + "type": "string", + "format": "uuid", + "required": true + } + ], + "responses": { + "200": { + "description": "Request completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/Notebook" + } + }, + "default": { + "description": "Common error codes:\n\n* ItemNotFound - The requested item was not found.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a notebook example": { + "$ref": "./examples/GetNotebook.json" + } + } + }, + "patch": { + "summary": "Updates the properties of the specified notebook.", + "description": "## Permissions\n\n The caller must have *contributor* or higher workspace role. \n\n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_UpdateNotebook", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "path", + "name": "notebookId", + "description": "The notebook ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "body", + "name": "updateNotebookRequest", + "description": "Update notebook request payload.", + "schema": { + "$ref": "./definitions.json#/definitions/UpdateNotebookRequest" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Request completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/Notebook" + } + }, + "default": { + "description": "Common error codes:\n\n* ItemNotFound - The requested item was not found. \n\n* InvalidRequest - Invalid update request", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Update a notebook example": { + "$ref": "./examples/UpdateNotebook.json" + } + } + }, + "delete": { + "summary": "Deletes the specified notebook.", + "description": "## Permissions\n\n The caller must have *contributor* or higher workspace role. \n\n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_DeleteNotebook", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "path", + "name": "notebookId", + "description": "The notebook ID.", + "type": "string", + "format": "uuid", + "required": true + } + ], + "responses": { + "200": { + "description": "Request completed successfully." + }, + "default": { + "description": "Common error codes:\n\n* ItemNotFound - The requested item was not found.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete a notebook example": { + "$ref": "./examples/DeleteNotebook.json" + } + } + } + }, + "/workspaces/{workspaceId}/notebooks/{notebookId}/getDefinition": { + "post": { + "summary": "Returns the specified notebook public definition.", + "description": "This API supports [long running operations (LRO)](/rest/api/fabric/articles/long-running-operation).\n\nWhen you get a notebook's public definition, the sensitivity label is not a part of the definition.\n\n## Permissions\n\n The caller must have *contributor* or higher workspace role. \n\n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All \n\n## Limitations\n\n This API is blocked for a notebook with an encrypted sensitivity label.\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_GetNotebookDefinition", + "produces": [ + "application/json" + ], + "x-ms-fabric-sdk-long-running-operation": true, + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "path", + "name": "notebookId", + "description": "The notebook ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "query", + "name": "format", + "description": "The format of the notebook public definition.", + "type": "string", + "required": false + } + ], + "responses": { + "200": { + "description": "Request completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/NotebookDefinitionResponse" + } + }, + "202": { + "description": "Request accepted. Retrieving the definition is in progress.", + "headers": { + "Location": { + "description": "The URL of the operation status, which can be used to track the operation state.", + "type": "string" + }, + "x-ms-operation-id": { + "description": "The operation ID which can be used with long running operations (LRO) APIs to track the operation state and get the result.", + "type": "string", + "format": "uuid" + }, + "Retry-After": { + "type": "integer", + "description": "The number of seconds to wait before retrying the request." + } + } + }, + "default": { + "description": "Common error codes:\n\n* OperationNotSupportedForItem - Operation not supported for requested item.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a notebook definition example": { + "$ref": "./examples/GetNotebookDefinition.json" + } + } + } + }, + "/workspaces/{workspaceId}/notebooks/{notebookId}/updateDefinition": { + "post": { + "summary": "Overrides the definition for the specified notebook.", + "description": "This API supports [long running operations (LRO)](/rest/api/fabric/articles/long-running-operation).\n\n \nUpdating the notebook's definition, does not affect its sensitivity label. \n\n## Permissions\n\n The API caller must have *contributor* or higher workspace role. \n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All\n\n## Microsoft Entra supported identities\n\nThis API supports the Microsoft [identities](/rest/api/fabric/articles/identity-support) listed in this section.\n\n| Identity | Support |\n|-|-|\n| User | Yes |\n| [Service principal](/entra/identity-platform/app-objects-and-service-principals#service-principal-object) and [Managed identities](/entra/identity/managed-identities-azure-resources/overview) | Yes |\n\n## Interface", + "tags": [ + "Items" + ], + "operationId": "Items_UpdateNotebookDefinition", + "produces": [ + "application/json" + ], + "x-ms-fabric-sdk-long-running-operation": true, + "parameters": [ + { + "in": "path", + "name": "workspaceId", + "description": "The workspace ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "path", + "name": "notebookId", + "description": "The notebook ID.", + "type": "string", + "format": "uuid", + "required": true + }, + { + "in": "query", + "name": "updateMetadata", + "description": "When set to true and the .platform file is provided as part of the definition, the item's metadata is updated using the metadata in the .platform file", + "type": "boolean", + "required": false + }, + { + "in": "body", + "name": "updateNotebookDefinitionRequest", + "description": "Update notebook definition request payload.", + "schema": { + "$ref": "./definitions.json#/definitions/UpdateNotebookDefinitionRequest" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Request completed successfully." + }, + "202": { + "description": "Request accepted. Update definition is in progress.", + "headers": { + "Location": { + "description": "The URL of the operation status, which can be used to track the operation state.", + "type": "string" + }, + "x-ms-operation-id": { + "description": "The operation ID which can be used with long running operations (LRO) APIs to track the operation state and get the result.", + "type": "string", + "format": "uuid" + }, + "Retry-After": { + "type": "integer", + "description": "The number of seconds to wait before retrying the request." + } + } + }, + "default": { + "description": "Common error codes:\n\n* OperationNotSupportedForItem - Operation not supported for requested item. \n\n* CorruptedPayload - The provided payload is corrupted.", + "schema": { + "$ref": "../common/definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Update a notebook definition example": { + "$ref": "./examples/UpdateNotebookDefinition.json" + } + } + } + } + }, + "responses": {}, + "security": [], + "tags": [] +} \ No newline at end of file