Windchill REST Services Framework Capabilities > Retrieving the Latest Version of an Entity
Retrieving the Latest Version of an Entity
You can retrieve the latest version of an entity using the custom query option ptc.search.latestversion. The option takes true or false as input value.
When you specify the query option as true, it limits the search results to retrieve only the latest version of the entity.
If the query option is specified as false, the search results retrieve the latest iteration of each revision for the entity.
For example, the following URL retrieves the latest version of the parts:
GET /Windchill/servlet/odata/ProdMgmt/Parts?$filter=startswith(Name,'Axle')&ptc.search.latestversion=true
The following rules apply to ptc.search.latestversion option:
The value specified for latest version in the query option gets precedence over the value set for Latest Version Search preference in Windchill.
If the query option is not specified in the request URL, the value specified for Latest Version Search preference in Windchill is used.
If the query option is not specified in the request URL and the Latest Version Search preference is not explicitly set in Windchill, the default value No is used to retrieve the entity versions.