Delete assets
Permanently deletes multiple Asset Hub assets by ID in a single request.
Prerequisites
- Authentication and setup: A valid access token.
- Create assets: The assets must exist.
Endpoint
Section titled “Endpoint”DELETE /api/assethub/v2/assetsBase URL: the standard REST host for your region. See Base URLs.
Headers: Authorization: Bearer ACCESS_TOKEN, Content-Type: application/json.
Request
Section titled “Request”| Parameter | Type | Required | Description |
|---|---|---|---|
asset_ids |
string[] | Required | List of reference asset IDs to delete. Maximum 50 assets per request. |
user_id |
string | Required | User ID of the user performing the operation. Used as the authorizer for the operation. |
Request example
Section titled “Request example”{ "asset_ids": ["123456789012345101", "123456789012345102", "123456789012345103"], "user_id": "123456789abcd104"}Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
request_id |
string | Unique ID for the request. |
deleted |
string[] | List of asset IDs that were successfully deleted. |
failed |
array | List of assets that could not be deleted. Each object contains asset_id and reason. |
Response example
Section titled “Response example”{ "request_id": "req_101", "deleted": ["123456789012345101", "123456789012345103"], "failed": [ { "asset_id": "123456789012345102", "reason": "Asset does not exist or has been deleted" } ]}- Limits: Maximum 50 assets per request.
- Partial success: The response is HTTP 200 even if some assets fail to delete. Check the
failedlist in the response to identify any issues. - Validation: If an
asset_idis empty or invalid, it appears in thefailedlist with a specific reason, such as “Asset ID cannot be empty”, rather than failing the entire request.