Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
In this example, customer wants to output ”Iteration“:1,
like the ”Revision“
But seems attribute "Iteration" is not in Parts.json, is it possible to output "Iteration"?
Thanks,
Eva
Solved! Go to Solution.
Hi @EvaPeng
Then you need to customize the RestAPI and add what you need if it can not be set OOTB.
PetrH
Hi @HelesicPetr
Thanks for your Reply~
Do you mean by modifying the Parts.js or Parts.json under Windchill\codebase\rest\ptc\domain\ProdMgmt\v6\entity?
Sorry I still don't know how to achieve it.
Could you please teach me more in details?
Thanks in advance,
Eva
Hi @EvaPeng
I don't know where you call the rest api but you can just change the result in your application so you read the version output and you just grab the value after dot in your target application. .
PetrH
Hi @HelesicPetr
I understand what you mean.
There seems to be no application involved, in this case customer run below URI on postman or other tools, and want to get one row that only output "Iteration".
<host>/Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:7078102')
Regards,
Eva
Hi @EvaPeng
Then you need to customize the RestAPI and add what you need if it can not be set OOTB.
PetrH
Hi @HelesicPetr
Sorry I'm asking this but could you please tell me specifically how to do customize the RestAPI to output "Iteration"?
Thanks,
Eva
Hi @EvaPeng
You can try to add an attribute to the json definition
...\Windchill\codebase\rest\ptc\domain\ProdMgmt\v5\entity\Parts.json
restapi knowledge hub
https://www.ptc.com/en/support/article/CS254366
Here are the sources that can help you to customize the restapi
https://www.ptc.com/en/support/article/CS183488
PetrH