Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi, My goal now is to create a EPMDocument in a Workspace with associated WTPart by REST APIs
What I plant to do:
Step1: Create a EPMDocument in Workspace
API: Windchill/servlet/rest/v1/wgm/workspaces/{workspaceId}/store
=> Done
Step2: Create a WTPart
API: Windchill/servlet/odata/ProdMgmt/Parts
=> Error here
My body:
Step3: Create Association
API: Windchill/servlet/rest/v1/wtparts/{WTPart}/associations/to/documents
Does anyone have faced with similar error in step2? Please help me to fix. Thank so much !
Would you test the steps in https://www.ptc.com/en/support/article/CS398513
My bad, indeed the article is PTC INTERNAL,.
The article suggest one of the below 2 options :
../Windchill/codebase/rest/ptc/domain/ProdMgmt/v5/entity/ElectricalParts.json ../Windchill/codebase/rest/ptc/domain/ProdMgmt/v4/entity/ElectricalParts.json ../Windchill/codebase/rest/ptc/domain/ProdMgmt/v3/entity/ElectricalParts.json ../Windchill/codebase/rest/ptc/domain/ProdMgmt/v2/entity/ElectricalParts.json ../Windchill/codebase/rest/ptc/domain/ProdMgmt/v1/entity/ElectricalParts.json
Hi @DB_11361720,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Your error message applies to step 2 only, so let's look at that and ignore your other steps for a moment.
Look in your 'Type and Attribute Management' under Site Utilities. Have you defined com.ptc.ElectricalPart? Are you able to create a part with this type by using the Windchill 'New Part' UI?
In the Windchill/servlet/odata/ProdMgmt/Parts API, can you do a GET and see the com.ptc.ElectricalPart that you created?