Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello,
I am using REST to query WTParts. I currently filter for name, number and a specific type id.
I also need a filter to search for all iterations of all versions instead of only the latest one.
I tried providing a navigationCriteria but I actually do not know what to put in here.
Does anyone know how to filter for latestVersion?
Best regards
Solved! Go to Solution.
Sadly I'm not sure if the same can be achieved using the Swagger interface. To my knowledge it provides the lastest element if you don't specify the filter parameter for a specific iteration. (e.g. iterationIdentifier eq '5')
You could try and provide a navigationCriteriaID of a "Saved Filter" in Windchill that isn't using the "latest" type.
e.g. "Effectifity" but that would only work if all iterations would have the same effectivity
my recommendation would be to use the new ODATA WRS interface.
You can search for all "Revisions and Iterations" of a part by using the naviation called "Versions"
this example should show all avaialble information
https://<HOSTNAME>/Windchill/servlet/odata/ProdMgmt/Parts?%24filter=Number eq "<yourNo>"&ptc.search.latestiteration=false&$expand=Versions
Hello @ThorstenMueller ,
thank you for your reply. Unfortunately, we do not use the ODATA endpoints, our url looks like this https://<HOSTNAME>/Windchill/servlet/rest/search/objects......
I am using the Search (/search/objects) to filter for objects. With this parameter you can apparently filter for versions but I have not found out yet how to do this. Do you also have an idea how to do it using this endpoint?
There is also a $filter but I am not sure if this can help either.
Best regards
Sadly I'm not sure if the same can be achieved using the Swagger interface. To my knowledge it provides the lastest element if you don't specify the filter parameter for a specific iteration. (e.g. iterationIdentifier eq '5')
You could try and provide a navigationCriteriaID of a "Saved Filter" in Windchill that isn't using the "latest" type.
e.g. "Effectifity" but that would only work if all iterations would have the same effectivity
my recommendation would be to use the new ODATA WRS interface.