OneLake Settings - Modify Diagnostics
Enables or disables workspace OneLake diagnostic settings.
This API supports long running operations (LRO).
Permissions
The caller must have an admin workspace role on the source workspace.
The caller must have contributor or above workspace role on the destination workspace.
Required Delegated Scopes
OneLake.ReadWrite.All
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
| Identity | Support |
|---|---|
| User | Yes |
| Service principal and Managed identities | Yes |
Interface
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/onelake/settings/modifyDiagnostics
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
workspace
|
path | True |
string (uuid) |
The workspace ID. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| status | True |
string |
The status of the diagnostics settings. |
| destination | OneLakeDiagnosticSettingsDestinationInfo: |
The destination where OneLake diagnostic logs are stored. If disabling, this is not required. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Request completed successfully. |
|
| 202 Accepted |
Request accepted. Modify diagnostic settings is in progress. Headers
|
|
| 429 Too Many Requests |
The service rate limit was exceeded. The server returns a Headers Retry-After: integer |
|
| Other Status Codes |
Common error codes:
|
Examples
Create OneLake Diagnostic Setting for Workspace example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff227/onelake/settings/modifyDiagnostics
{
"status": "Enabled",
"destination": {
"type": "Lakehouse",
"lakehouse": {
"referenceType": "ById",
"itemId": "eceb53c6-6227-41f1-a649-62ebe7ee9eb1",
"workspaceId": "85173301-af01-49c9-b667-03edc44517da"
}
}
}
Sample response
Disable OneLake Diagnostic Setting for Workspace example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff227/onelake/settings/modifyDiagnostics
{
"status": "Disabled"
}
Sample response
Remove OneLake Diagnostic Setting Destination for Workspace example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff227/onelake/settings/modifyDiagnostics
{
"status": "Disabled",
"destination": {
"type": "Lakehouse"
}
}
Sample response
Replace OneLake Diagnostic Setting Destination for Workspace example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff227/onelake/settings/modifyDiagnostics
{
"status": "Enabled",
"destination": {
"type": "Lakehouse",
"lakehouse": {
"referenceType": "ById",
"itemId": "83b128a3-f58f-4eee-ab0b-e7e25a748f54",
"workspaceId": "6eb233d7-b1c6-4248-9255-5a0d223f3456"
}
}
}
Sample response
Definitions
| Name | Description |
|---|---|
|
Error |
The error related resource details object. |
|
Error |
The error response. |
|
Error |
The error response details. |
|
Item |
An item reference by ID object. |
|
Item |
An item reference by variable. |
|
Item |
The item reference type. Additional |
|
Lakehouse |
Lakehouse destination for OneLake diagnostic logs. |
|
One |
OneLake diagnostic settings object. |
ErrorRelatedResource
The error related resource details object.
| Name | Type | Description |
|---|---|---|
| resourceId |
string |
The resource ID that's involved in the error. |
| resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| moreDetails |
List of additional error details. |
|
| relatedResource |
The error related resource details. |
|
| requestId |
string (uuid) |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| relatedResource |
The error related resource details. |
ItemReferenceById
An item reference by ID object.
| Name | Type | Description |
|---|---|---|
| itemId |
string (uuid) |
The ID of the item. |
| referenceType |
string:
By |
The item reference type. |
| workspaceId |
string (uuid) |
The workspace ID of the item. |
ItemReferenceByVariable
An item reference by variable.
| Name | Type | Description |
|---|---|---|
| referenceType |
string:
By |
The item reference type. |
| variableReference |
string |
A variable reference string that specifies the Variable Library and the variable name inside it. Format: |
ItemReferenceType
The item reference type. Additional ItemReferenceType types may be added over time.
| Value | Description |
|---|---|
| ById |
The item is referenced by its ID. |
| ByVariable |
The item is referenced by a variable. |
LakehouseOneLakeDiagnosticSettingsDestination
Lakehouse destination for OneLake diagnostic logs.
| Name | Type | Description |
|---|---|---|
| lakehouse | ItemReference: |
Reference to the destination lakehouse. |
| type |
string:
Lakehouse |
The item type of the destination. |
OneLakeDiagnosticSettings
OneLake diagnostic settings object.
| Name | Type | Description |
|---|---|---|
| destination | OneLakeDiagnosticSettingsDestinationInfo: |
The destination where OneLake diagnostic logs are stored. If disabling, this is not required. |
| status |
string |
The status of the diagnostics settings. |