OData Filter by Custom Attribute
Version: Windchill 12.1
Use Case: I am attempting to do an OData call to retrieve parts filtered by a custom attribute on a part. How do I do a GET request with a $filter that allows me to filter a custom attribute?
Description:
Attempted URL:
- https://company.ptcmscloud.com/Windchill/oauth/servlet/odata/ProdMgmt/Parts?$filter=MY_ITEM_NUMBER eq '12345'
Error message:
{
"error": {
"code": null,
"message": "The property 'MY_ITEM_NUMBER', used in a query expression, is not defined in type 'PTC.ProdMgmt.Part'."
}
}
URL's I've tried that do not work:
Error message:
{
"error": {
"code": null,
"message": "The URI is malformed."
}
}
Other URLs:
I tried following the steps here without success: https://community.ptc.com/t5/Windchill/How-to-fetch-part-list-using-custom-attribute-via-Windchill/m-p/969188#M81973
Is this possible? Seems like it should be a common thing to do, but I haven't found much help online or in the KBs. Thanks for the help in advance!

