PTC Annotations
The OData protocol supports specifying elements in EDM with custom annotations that provide additional information to the clients. The following annotations are available in Windchill REST Services:
Org.OData.Capabilities.V1.SortRestrictions
Core.Description
This annotation is available on all entity types. It describes the entity.
<Annotation Term="Core.Description">
<String>Some description</String>
</Annotation>
PTC.Operations
This annotation specifies the list of supported CRUD operations for entities. In the example below, the annotation is applied to the Part entity in the PTC Product Management domain:
<EntityType Name=”Part>
<Key>
<PropertyRef Name=”ID”/>
</Key>
<Property Name=”ID” Type=”EDM.String”>

<Annotation Term="PTC.Operations">
<String>READ, CREATE, UPDATE, DELETE</String>
</Annotation>
</EntityType>
The annotation indicates that the framework supports reading, creating, updating, and deleting parts.
PTC.MultiOperations
This annotation is available on an entity type. It specifies the list of CRUD operations for which actions are available for multiple objects. For example, if CREATE operation is listed in the annotation for a Part entity type, then a bound action CreateParts is available for the Part entity.
<Annotation Term="PTC.MultiOperations">
<String>CREATE,UPDATE,DELETE</String>
</Annotation>
PTC.ReadOnly
This annotation indicates entity properties that are read-only. In the example below, an annotation from the EDM of the PTC Product Management domain is shown:
<EntityType Name=”Part”>
<Key>
<PropertyRef Name=”ID”/>
</Key>
<Property Name=”ID” Type=”EDM.String”>

<Property Name=”State” Type=”PTC.EnumType”>
<Annotation Term="PTC.ReadOnly"/>
</Property>

</EntityType>
The annotation indicates that the property State on the Part entity is read-only.
PTC.SecurityLabel
This annotation indicates security labels. In the example below, an annotation from the EDM of the PTC Product Management domain is shown.
<EntityType Name="Part">
<Property Name="<Internal_name_for_Security_label>" Type="Edm.String">
<Annotation Term="PTC.SecurityLabel"/>
</Property> …

</EntityType>
PTC.MultiValueSecurityLabel
This annotation indicates the security label property that allows setting multiple values. In the example below, an annotation from the EDM of the PTC Product Management domain is shown.
<EntityType Name="Part">
<Property Name="<Internal_name_for_Security_label>" Type="Edm.String">
<Annotation Term="PTC.SecurityLabel"/>
<Annotation Term="PTC.MultiValueSecurityLabel"/>
</Property> …

</EntityType>
PTC.CustomSecurityLabel
This annotation indicates the security label property that is defined as custom security label. In the example below, an annotation from the EDM of the PTC Product Management domain is shown.
<EntityType Name="Part">
<Property Name="<Internal_name_for_Security_label>" Type="Edm.String">
<Annotation Term="PTC.SecurityLabel"/>
<Annotation Term="PTC.CustomSecurityLabel"/>
</Property> …

</EntityType>
PTC.UpdateableViaAction
This annotation indicates that you cannot update the property using a PATCH request. You can modify the property using the UpdateCommonProperties action. In the example below, an annotation from the EDM of the PTC Product Management domain is shown:
<EntityType Name=”Part”>
<Property Name="EndItem" Type="Edm.Boolean" Nullable="false">
<Annotation Term="PTC.UpdateableViaAction">
<String>Property is updateable via UpdateCommonProperties action</String>
</Annotation>
</Property>
<NavigationProperty Name="Organization" Type="PTC.PrincipalMgmt.Organization">
<Annotation Term="PTC.UpdateableViaAction">
<String>Property is updateable via UpdateCommonProperties action</String>
</Annotation>
</NavigationProperty>

</EntityType>
Org.OData.Capabilities.V1.SortRestrictions
This annotation is available on an entity set. It specifies the properties of an entity set that you cannot use for sorting the entity set.
<Annotation Term="Org.OData.Capabilities.V1.SortRestrictions">
<Record>
<PropertyValue Property="NonSortableProperties">
<Collection>
<String>Property Name 1</String>
<String>Property Name 2</String>

</Collection>
</ PropertyValue>
</Record>
</Annotation>
PTC.NonSortable
This annotation is deprecated. Use the annotation Org.OData.Capabilities.V1.SortRestrictions instead. The properties marked as nonsortable are shown in the Org.OData.Capabilities.V1.SortRestrictions annotation.
PTC.Capability
This annotation is available on an entity type. It designates an entity type that implements a specific capability. In the following example, the annotation shows the Notifiable capability, which indicates that you can subscribe to the entity type and the instances of the entity type using webhooks.
<Annotation Term="PTC.Capability">
<String>Notifiable</String>
</Annotation>
* 
PTC.Capability is deprecated in WRS 2.2. Use PTC.Capabilities instead.
PTC.Capabilities
This annotation is available on entity types that implement specific capabilities. This annotation can have multiple string values separated by commas. In the following example for the Change Management domain, the annotation indicates that the entity has the capabilities —Notifiable and Reservable. The Notifiable capability indicates that you can subscribe to the entity type and the instances of the entity type using webhooks. The Reservable capability denotes that the entity can be reserved while it is being accessed.
<Annotation Term="PTC.Capability">
<String>Notifiable,Reservable</String>
</Annotation>
PTC.ClassificationNameSpace
This annotation is available on a property of type PTC.ClassificationInfo. Clients can use the value from the annotation to specify the clfStructureNameSpace property while classifying a part.
<Annotation Term="PTC.ClassificationNameSpace">
<String>com.ptc.csm.default_clf_namespace</String>
</Annotation>
PTC.MultipleAliasAttributeValues
This instance annotation is only added for an alias attribute that resolves to multiple values and those multiple values are displayed as a value of the annotation. The value is displayed with the multiple values delimited by a configurable delimiter. The delimiter is set to pipe ( | ) by default. When the annotation is added, the value of the existing alias attribute is set to null.
* 
The annotation is not added for an alias attribute that resolves to a single value.
The multipleValuesInStringDelimiter property in the odata.properties file at codebase/com/ptc/odata/core sets the delimiter.
The example below shows the annotations for different types of alias attributes such as String, Boolean, Date, Integer, and Enum each resolving to multiple values. The value of the annotation added for each alias attribute is displayed with respective multiple values separated by the | delimiter and the value of the corresponding alias attribute is displayed as null.
The example also shows a String type alias attribute with a single value for which an annotation is not added. The value of the alias attribute remains unchanged.
{
"AliasAttribute": "testaliasattribute",
"AliasAttribute1": null,
"AliasAttribute1@PTC.MultipleAliasAttributeValues": "PTC Corporate Framework Criteria|Screenshot 2020-10-13 092049",
"AliasAttribute2": null,
"AliasAttribute2@PTC.MultipleAliasAttributeValues": "false|true",
"AliasAttribute3@odata.type": "#DateTimeOffset",
"AliasAttribute3": null,
"AliasAttribute3@PTC.MultipleAliasAttributeValues": "2020-10-20T13:33:07-05:00|2020-10-20T13:33:07-05:00|2020-10-20T13:36:26-05:00|2020-10-20T13:36:26-05:00",
"AliasAttribute4@odata.type": "#Int64",
"AliasAttribute4": null,
"AliasAttribute4@PTC.MultipleAliasAttributeValues": "1000|1000|400|400",
"AliasAttribute5": null,
"AliasAttribute5@PTC.MultipleAliasAttributeValues": "yes|no|na"
}