Files
fabric-rest-api-specs/notebook/swagger.json
T

1014 lines
46 KiB
JSON

{
"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 a *viewer* 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": "recursive",
"description": "Lists items in a folder and its nested folders, or just a folder only. True - All items in the folder and its nested folders are listed, False - Only items in the folder are listed. The default value is true.",
"type": "boolean",
"required": false
},
{
"in": "query",
"name": "rootFolderId",
"description": "This parameter allows users to filter items based on a specific root folder. If not provided, the workspace is used as the root folder.",
"type": "string",
"format": "uuid",
"required": false
},
{
"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"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 a *contributor* 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."
}
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 in ipynb format example": {
"$ref": "./examples/CreateNotebookWithIpynb.json"
},
"Create a notebook with public definition in fabricGitSource format example": {
"$ref": "./examples/CreateNotebookWithFabricGitSource.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}": {
"get": {
"summary": "Returns properties of the specified notebook.",
"description": "## Permissions\n\n The caller must have *read* permissions for the notebook. \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"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 *read and write* permissions for the notebook. \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"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 *write* permissions for the notebook. \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
},
{
"in": "query",
"name": "hardDelete",
"description": "Specifies whether to perform a hard delete. When set to `true`, the item is permanently deleted and cannot be recovered. When set to `false` or not specified, the item is soft-deleted if the item type supports it.",
"type": "boolean",
"required": false
}
],
"responses": {
"200": {
"description": "Request completed successfully."
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* ItemNotFound - The requested item was not found.\n\n* InsufficientWorkspaceRole - User doesn't have sufficient workspace role.\n\n* FeatureNotAvailable - This could be due to the soft deletion feature not being available.\n\n* UnsupportedItemType - This could be due to the soft deletion feature not supported by the requested item type.\n\n* TenantSwitchDisabled - This could be due to the soft deletion feature being disabled by the tenant admin.\n\n* InvalidTargetItemStateForSoftDeletion - The item is in invalid states for soft deletion.\n\n* InvalidParentItemStateForSoftDeletion - The item's parent item is not in Active state.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Delete a notebook example": {
"$ref": "./examples/DeleteNotebook.json"
},
"Hard delete a notebook example": {
"$ref": "./examples/HardDeleteNotebook.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 *read and write* permissions for the notebook. \n\n## Required Delegated Scopes \n\n Notebook.ReadWrite.All or Item.ReadWrite.All \n\n## Limitations\n\nTo retrieve the definition of a notebook item protected by an encrypted sensitivity label, the caller must have sufficient [usage rights](/fabric/enterprise/powerbi/service-security-sensitivity-label-change-enforcement) to remove the label, as configured in [Microsoft Purview](/purview/purview).\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. Supported format: `ipynb` and `fabricGitSource`. If no format is provided, `fabricGitSource` is used.",
"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."
}
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 in fabricGitSource format example": {
"$ref": "./examples/GetNotebookDefinitionWithFabricGitSource.json"
},
"Get a notebook definition in ipynb format example": {
"$ref": "./examples/GetNotebookDefinitionWithIpynb.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 caller must have *read and write* permissions for the notebook. \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."
}
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"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 in fabricGitSource format example": {
"$ref": "./examples/UpdateNotebookDefinitionWithFabricGitSource.json"
},
"Update a notebook definition in ipynb format example": {
"$ref": "./examples/UpdateNotebookDefinitionWithIpynb.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}/livySessions": {
"get": {
"tags": [
"LivySessions"
],
"summary": "Returns a list of livy sessions from the specified item identifier.",
"description": "This API supports [pagination](/rest/api/fabric/articles/pagination).\n\n## Permissions\n\n The caller must have *read* permissions for the notebook. \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",
"operationId": "LivySessions_ListLivySessions",
"x-ms-pageable": {
"nextLinkName": "continuationUri"
},
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"description": "The workspace identifier.",
"required": true,
"type": "string",
"format": "uuid"
},
{
"in": "path",
"name": "notebookId",
"description": "The notebook ID.",
"type": "string",
"format": "uuid",
"required": true
},
{
"in": "query",
"name": "continuationToken",
"description": "Token to retrieve the next page of results, if available.",
"type": "string",
"required": false
}
],
"responses": {
"200": {
"description": "OK -- Returns a list of all livy sessions associated to an itemId.",
"schema": {
"$ref": "../common/spark_definitions.json#/definitions/LivySessions"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* SparkCoreItemNotFound - Notebook identifier does not exist\n\n* SparkCoreUnexpectedException - Unhandled exception ocurred.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"List all livy sessions example": {
"$ref": "./examples/ListSessionsInItemId.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}/livySessions?beta=true": {
"get": {
"tags": [
"LivySessions"
],
"summary": "Returns a list of livy sessions from the specified item identifier (beta).",
"description": "[!NOTE]\n> This API is part of a Beta release and is provided for evaluation and development purposes only. It may change based on feedback and is not recommended for production use.\n\n**When calling this API, callers must specify `true` as the value for the query parameter `beta`.**\n\n This API supports [pagination](/rest/api/fabric/articles/pagination).\n\n## Permissions\n\n The caller must have *read* permissions for the notebook. \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",
"operationId": "LivySessions_List_Livy_Sessions_(beta)",
"x-ms-pageable": {
"nextLinkName": "continuationUri"
},
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"description": "The workspace identifier.",
"format": "uuid",
"type": "string",
"required": true
},
{
"in": "path",
"name": "notebookId",
"description": "The notebook ID.",
"type": "string",
"format": "uuid",
"required": true
},
{
"in": "query",
"name": "beta",
"description": "This required parameter must be set to `true` to access this API, which is currently in beta.",
"type": "boolean",
"required": true
},
{
"in": "query",
"name": "submittedDateTime",
"description": "Submitted date time filter. Filter the sessions based on the submitted date time in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
"type": "string",
"format": "date-time",
"required": false
},
{
"in": "query",
"name": "endDateTime",
"description": "Ended date time filter. Filter the sessions based on the ended date time in UTC, using the YYYY-MM-DDTHH:mm:ssZ format.",
"type": "string",
"format": "date-time",
"required": false
},
{
"in": "query",
"name": "submitter.Id",
"description": "The GUID value of the user who submitted the session.",
"type": "string",
"format": "uuid",
"required": false
},
{
"in": "query",
"name": "state",
"description": "The state of the session. Possible values are: `NotStarted`, `InProgress`, `Cancelled`, `Failed`, `Succeeded`, `Unknown`. This value maps to the `state` field in the response.",
"type": "string",
"required": false
},
{
"in": "query",
"name": "continuationToken",
"description": "Token to retrieve the next page of results, if available.",
"type": "string",
"required": false
}
],
"responses": {
"200": {
"description": "OK -- Returns a list of all livy sessions associated to an itemId.",
"schema": {
"$ref": "../common/spark_definitions.json#/definitions/LivySessions"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* SparkCoreItemNotFound - Notebook identifier does not exist\n\n* SparkCoreUnexpectedException - Unhandled exception ocurred.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"List all livy sessions (Beta) example": {
"$ref": "./examples/ListSessionsInItemId_beta.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}/livySessions/{livyId}": {
"get": {
"tags": [
"LivySessions"
],
"operationId": "LivySessions_GetLivySession",
"summary": "Returns properties of the specified livy session.",
"description": "## Permissions\n\n The caller must have *read* permissions for the notebook. \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",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"description": "The workspace identifier.",
"type": "string",
"format": "uuid",
"required": true
},
{
"in": "path",
"name": "notebookId",
"description": "The notebook ID.",
"type": "string",
"format": "uuid",
"required": true
},
{
"in": "path",
"name": "livyId",
"description": "The session identifier.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK -- Returns a livy session by its id.",
"schema": {
"$ref": "../common/spark_definitions.json#/definitions/LivySession"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* SparkCoreSessionNotFound - Livy identifier does not exist\n\n* SparkCoreUnexpectedException - Unhandled exception ocurred.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Get a livy session example": {
"$ref": "./examples/GetSessionInItemId.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}/jobs/execute/instances?beta=false": {
"post": {
"summary": "Run on-demand notebook job instance.",
"description": "> [!NOTE]\n> This API is a release version of a beta version due to be deprecated on April 1, 2028.\n**When calling this API - callers must set the query parameter `beta` to the value `false`**.\n\n## Required Delegated Scopes\n\nNotebook.Execute.All or Item.Execute.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": [
"BackgroundJobs"
],
"operationId": "BackgroundJobs_RunOnDemandNotebook",
"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 item ID.",
"type": "string",
"format": "uuid",
"required": true
},
{
"name": "beta",
"in": "query",
"description": "This parameter specifies which version of the API to use. Set to `false` to use the release version.",
"required": true,
"type": "boolean",
"x-ms-deprecation": {
"defaultChangeDate": "2028-04-01",
"currentDefault": true,
"newDefault": false,
"description": "The default value will change from `true` to `false` on **April 1, 2028**."
}
},
{
"in": "body",
"name": "runNotebookRequest",
"description": "Run notebook request payload with parameters to use.",
"schema": {
"$ref": "./definitions.json#/definitions/RunNotebookRequest"
},
"required": false
}
],
"responses": {
"202": {
"description": "Request accepted, job execution is in progress.\n\n---\n**Headers:**\n\n**Location** `string` - The URL to the job instance resource.\n\n**Retry-After** `integer` - The number of seconds the client should wait before polling the job status for the first time. Clients must use this value to determine when to check the job status and should wait at least this many seconds before the first status poll."
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* MissingMinimalPermissions - The caller does not have sufficient permissions to run job instance. \n\n* InvalidJobType - The requested job type is invalid. \n\n* TooManyRequestsForJobs - The caller is making to many run on-demand job requests. \n\n* ItemNotFound - Requested item id not found. \n\n* ComputeTypeMismatch - The compute type provided in the request does not align with the compute type configured in the notebook content.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Run notebook with no request body.": {
"$ref": "./examples/RunNotebookWithNoRequestBody.json"
},
"Run notebook with parameters.": {
"$ref": "./examples/RunNotebookWithParameters.json"
},
"Run Spark notebook with request body.": {
"$ref": "./examples/RunSparkNotebookWithRequestBody.json"
},
"Run Jupyter notebook with request body.": {
"$ref": "./examples/RunJupyterNotebookWithRequestBody.json"
},
"Run Data Warehouse notebook with request body.": {
"$ref": "./examples/RunDataWarehouseNotebookWithRequestBody.json"
}
}
}
},
"/workspaces/{workspaceId}/notebooks/{notebookId}/jobs/execute/instances/{jobInstanceId}?beta=true": {
"get": {
"summary": "Get one notebook's job instance.",
"description": "> [!NOTE]\n> This API is part of a Beta release and is provided for evaluation and development purposes only. It may change based on feedback and is not recommended for production use.\n**When calling this API, callers must specify `true` as the value for the query parameter `beta`.**\n\n## Required Delegated Scopes\n\nNotebook.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": [
"BackgroundJobs"
],
"operationId": "BackgroundJobs_Get_Notebook_Job_Instance_(beta)",
"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": "path",
"name": "jobInstanceId",
"description": "The job instance ID.",
"type": "string",
"format": "uuid",
"required": true
},
{
"name": "beta",
"in": "query",
"description": "This required parameter must be set to `true` to access this API, which is currently in beta.",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Request completed successfully.\n\n---\n**Headers:**\n\n**Retry-After** `integer` - The number of seconds to wait before checking the status of the job instance.",
"schema": {
"$ref": "./definitions.json#/definitions/NotebookJobInstance"
}
},
"429": {
"description": "The service rate limit was exceeded. The server returns a `Retry-After` header indicating, in seconds, how long the client must wait before sending additional requests.",
"x-ms-error-response": true,
"headers": {
"Retry-After": {
"type": "integer",
"description": "The number of seconds to wait before retrying the request."
}
},
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Common error codes:\n\n* InsufficientPrivileges - The caller does not have sufficient permissions to access the item.\n\n* ItemNotFound - Requested item id not found.",
"schema": {
"$ref": "../common/definitions.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Get Spark notebook job instance example": {
"$ref": "./examples/GetSparkNotebookJobInstance.json"
},
"Get jupyter notebook job instance example": {
"$ref": "./examples/GetJupyterNotebookJobInstance.json"
},
"Get data warehouse notebook job instance example": {
"$ref": "./examples/GetDataWarehouseNotebookJobInstance.json"
}
}
}
}
},
"responses": {},
"security": [],
"tags": []
}