Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC Manufacturing Process Management Domain > Deleting Multiple MPMCompatibilityLinks for a Resource
  
Deleting Multiple MPMCompatibilityLinks for a Resource
To delete existing single or multiple associations between a resource (Process Material, Skill, Tooling, or Work Center) and its compatible resources, you must first check out the Resource object.
You can delete single or multiple associations between a resource and its compatible resources by specifying the parent Resource OID and the associated MPMCompatibilityLink OIDs in the request body.
The following example shows how to delete two MPMCompatibilityLink objects for a specific Process Material object. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/DeleteMPMCompatibleLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RoleAObject": {
"ID": "OR:com.ptc.windchill.mpml.resource.MPMProcessMaterial:284397"
},
"LinksOIDs": [
{
"ID": "OR:com.ptc.windchill.mpml.MPMCompatibilityLink:284445"
},
{
"ID": "OR:com.ptc.windchill.mpml.MPMCompatibilityLink:284446"
}
]
}
Example: Deleting MPMCompatibilityLink in Context of Change
This example shows you how to delete an MPMCompatibilityLink object 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/DeleteMPMCompatibleLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RoleAObject": {
"ID": "OR:com.ptc.windchill.mpml.resource.MPMProcessMaterial:285497"
},
"LinksOIDs": [
{
"ID": "OR:com.ptc.windchill.mpml.MPMCompatibilityLink:285645"
}
],
"ChangeOID": "VR:wt.change2.WTChangeActivity2:185344"
}
The request deletes the link and adds the modified parent resource (here, Process Material) object as a Resultant object to the specified Change object.