Deleting Multiple References Document Links for a Resource
To delete existing single or multiple associations between a resource (Process Material, Skill, Tooling, or Work Center) and References Documents, you must first check out the resource object.
You can delete single or multiple associations between a resource and References Documents by specifying the associated WTPartReferenceLink OIDs in the request body.
The following example shows how to delete two WTPartReferenceLink objects for a Skill object specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:202907')/PTC.MfgProcMgmt.DeleteResourceReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"LinksOIDs": [
{
"ID": "OR:wt.part.WTPartReferenceLink:207651"
},
{
"ID": "OR:wt.part.WTPartReferenceLink:204541"
}
]
}
Example: Deleting WTPartReferenceLink in Context of Change
This example shows you how to delete a WTPartReferenceLink for a specific Skill in context of a Change object specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:202907')/PTC.MfgProcMgmt.DeleteResourceReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"LinksOIDs": [
{
"ID": "OR:wt.part.WTPartReferenceLink:204933"
}
],
"ChangeOID": "VR:wt.change2.WTChangeActivity2:204365"
}
The request deletes the link and adds the modified resource (here, Skill) as a Resultant object to the specified Change object.