Best Practices for Developing Solutions > Deprecating Entities, Properties, and Services
Deprecating Entities, Properties, and Services
Beginning with ThingWorx 9.5.0, you can deprecate entities and characteristics. You deprecate the entities, which can be removed over the next few releases. All the entities and their characteristics can be deprecated.
Deprecation of entities and characteristics can be done in three ways.
Deprecating an Entity and Characteristics
You can deprecate an item using one of these methods:
Selecting the Deprecated checkbox using the Composer.
By using a REST calls.
By XML or extension import.
By executing the SetDeprecated service under the EntityServices. This service can set deprecated attributes on multiple entities and characteristics in bulk.
* 
It is mandatory to add the version in major.minor.patch format. Optionally, a comment can also be added.
A deprecation indicator is displayed for the item, as seen in the image below. The deprecation indicator helps users identify items that may eventually be phased out and thus choose another item in its place.
Deprecation Indicator
Viewing a Deprecated Set on an Entity or Characteristics
By executing the GetAspects service under EntityServices resources, you can view the deprecated entity or characteristics.
Filtering Entities via Deprecated
Entities can be filtered based on Deprecated Objects by using in Composer. By default, the Show Deprecated Objects checkbox is not selected. Hence, select the checkbox to see the deprecated objects.
* 
On refreshing the browser, the Show Deprecated Objects checkbox is cleared.
Logging Deprecated
If a user creates, updates, or deletes a deprecated attribute on an entity or characteristics, then the logs are maintained in the Audit Log.
For more information, see Audit Subsystem.
* 
Modifications to an entity or characteristic by another entity, member, or service calls are not audited.
Deprecation Related Services 
The following services are available for the Deprecation feature.
Service
Resources
Description
SetDeprecated
EntityServices
This service sets the entity as deprecated. This service can be used to set deprecated attributes on multiple entities and characteristics in bulk.
The following are the input parameters for the service:
Entity Name
Entity Type
Characteristic Type and Name (Property, Service, ConfigurationTable) optional
Deprecated (Since and Comment in JSON)
ListDeprecatedUsage
This service lists all the uses of deprecated entities and characteristics within the current entity.
This service can be accessed from the Services tab of respective entities.
The following parameters are received after executing this service:
entityName
entityType
dependentEntityName
dependentEntityType
whereUsed
characteristicsType
characteristicsName
Was this helpful?