Skip to content
Dark mode

Delete attributes

Deletes one or more asset attributes by ID, with an optional force delete for attributes linked to assets.

Prerequisites

  1. Authentication and setup: A valid access token.
  2. Create attributes: The attributes must exist.
DELETE /api/assethub/v2/attribute_categories/attributes

Base URL: the standard REST host for your region. See Base URLs.

Headers: Authorization: Bearer ACCESS_TOKEN, Content-Type: application/json.

Parameter Type Required Description
attribute_ids string[] Required List of attribute IDs to delete. Maximum 100 attributes per request. Must not contain duplicates.
force_delete boolean Optional Whether to remove attributes even if they are linked to assets. true deletes the attribute and removes it from all linked assets. false fails to delete an attribute that is linked to any asset. Default: false.
user_id string Required User ID of the user performing the operation, used as the authorizer.
{
"attribute_ids": ["123456789012345101", "123456789012345102", "123456789012345103"],
"force_delete": false,
"user_id": "123456789abcd104"
}
Field Type Description
request_id string Unique ID for the request.
deleted_attribute_ids string[] List of attribute IDs that were successfully deleted.
failed array List of attributes that could not be deleted. Each object contains attribute_id and reason.
{
"request_id": "req_101",
"deleted_attribute_ids": ["123456789012345101", "123456789012345103"],
"failed": [
{
"attribute_id": "123456789012345102",
"reason": "Attribute is currently linked with assets. Use force_delete=true to delete such attributes."
}
]
}
  • Limits: Maximum 100 attributes per request.
  • Partial success: The response is HTTP 200 even if some attributes fail to delete. Check the failed list in the response to identify any issues.
  • Validation: Duplicate entries in attribute_ids are handled by deleting the first occurrence. Subsequent duplicates are reported in the failed list.
  • Validation: If force_delete is false, attributes linked to assets fail with the reason “Attribute is currently linked with assets.”