Item Lifecycle - On Delete Item
Called by Microsoft Fabric for deleting an existing item.
Upon item deletion Fabric performs basic validations and calls this API to notify the workload. The workload is expected to delete the item metadata and free resources.
The request includes a deleteType indicating whether the delete is Hard or Soft. A soft delete means the item may be restored later via the OnRestoreItem API, so the workload should retain sufficient metadata and resources to support restoration. A hard delete is permanent and the workload should fully clean up all associated data.
This API should accept SubjectAndApp authentication. However, the subject token may be unavailable in some cases.
Permissions
Permissions are checked by Microsoft Fabric.
POST https://be.myWorkload.contoso.com/workload-api-path-placeholder/workspaces/{workspaceId}/items/{itemType}/{itemId}/OnDeleteItem
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
item
|
path | True |
string (uuid) |
The item ID. |
|
item
|
path | True |
string |
The item type. |
|
workspace
|
path | True |
string (uuid) |
The workspace ID. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| ActivityId | True |
string (uuid) |
A unique ID for correlating the request with your system when a user interacts with your workload. |
| RequestId | True |
string (uuid) |
A globally unique ID that helps Fabric correlate your request with our logs. Provide this ID when reporting an issue. |
| Authorization | True |
string |
A dual token authorization header that allows the workload to validate the request origin, provide user context, and call other services. This header has the following format: |
| x-ms-client-tenant-id | True |
string (uuid) |
The tenant ID of the client making the request. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| deleteType | True |
The type of delete operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully deleted. |
|
| Other Status Codes |
For error conditions the workload should return an appropriate HTTP error status code (4xx, 5xx) with detailed error information in the response body. |
Examples
Delete item example
Sample request
POST https://be.myWorkload.contoso.com/workload-api-path-placeholder/workspaces/e5ef604d-e14f-4a59-9133-75d5a0cb9334/items/Contoso.FinanceAnalytics.Forecast/b14cb7e7-d346-4751-9cfd-8c2767d53111/OnDeleteItem
{
"deleteType": "Hard"
}
Sample response
Definitions
| Name | Description |
|---|---|
|
Delete |
The type of delete operation. |
|
Error |
The extended error information. |
|
Error |
The error response. |
|
Error |
The source of the error. |
|
Name |
A name-value pair. |
|
On |
Request body for deleting an item. |
DeleteType
The type of delete operation.
| Value | Description |
|---|---|
| Hard |
A hard delete operation. |
| Soft |
A soft delete operation. |
ErrorExtendedInformation
The extended error information.
| Name | Type | Description |
|---|---|---|
| additionalParameters |
A list of additional parameters specific to the error. |
|
| errorCode |
string |
The error code. |
| message |
string |
The error message. |
| messageParameters |
string[] |
A list of parameters for formatting a localized message. |
ErrorResponse
The error response.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
The error code. |
| isPermanent |
boolean |
Indicates whether the error is permanent or the operation can be retried. |
| message |
string |
The error message. |
| messageParameters |
string[] |
A list of parameters for formatting a localized message. |
| moreDetails |
A list of additional error details. |
|
| source |
The source of the error. |
ErrorSource
The source of the error.
| Value | Description |
|---|---|
| System |
The error originated from the system. |
| User |
The error originated from user input. |
| External |
The error originated from an external source. |
NameValuePair
A name-value pair.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name. |
| value |
string |
The value. |
OnDeleteItemRequest
Request body for deleting an item.
| Name | Type | Description |
|---|---|---|
| deleteType |
The type of delete operation. |