Creating Multiple MPMDocumentReferenceLinks
You can create MPMDocumentReferenceLinks between an Operation Holder (Process Plan, Standard Procedure, Operation, or Sequence) and single or multiple documents by specifying the document OIDs in the request body. To create MPMDocumentReferenceLinks, you must first check out the Operation Holder object.
* 
To create an MPMDocumentReferenceLink, you can specify the document object of type Reference Document only.
Example: Creating MPMDocumentReferenceLinks for a Specific Process Plan
This example shows you how to create two MPMDocumentReferenceLinks between a Process Plan specified in the request URI and two documents specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:193742')/PTC.MfgProcMgmt.CreateMPMDocumentReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DocumentReferenceLink": [
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:200685')"
},
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:203985')"
}
]
}
Example: Creating MPMDocumentReferenceLinks for a Specific Standard Procedure
This example shows you how to create two MPMDocumentReferenceLinks between a Standard Procedure specified in the request URI and two documents specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/StandardProcedures('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:193360')/PTC.MfgProcMgmt.CreateMPMDocumentReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DocumentReferenceLink": [
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:200685')"
},
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:203985')"
}
]
}
Example: Creating MPMDocumentReferenceLinks for a Specific Operation
This example shows you how to create two MPMDocumentReferenceLinks between an Operation specified in the request URI and two documents specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Operations('OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:366090')/PTC.MfgProcMgmt.CreateMPMDocumentReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DocumentReferenceLink": [
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:200685')"
},
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:203985')"
}
]
}
Example: Creating MPMDocumentReferenceLinks for a Specific Sequence
This example shows you how to create two MPMDocumentReferenceLinks between a Sequence specified in the request URI and two documents specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Sequences('OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:366130')/PTC.MfgProcMgmt.CreateMPMDocumentReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DocumentReferenceLink": [
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:200685')"
},
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:203985')"
}
]
}
Example: Creating MPMDocumentReferenceLinks for an Operation Holder
This example shows you how to create two MPMDocumentReferenceLinks between an Operation Holder such as a Process Plan specified in the request URI and two documents specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/OperationHolders('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:200061')/PTC.MfgProcMgmt.CreateMPMDocumentReferenceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DocumentReferenceLink": [
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:200685')"
},
{
"References@odata.bind": "Documents('OR:wt.doc.WTDocument:203985')"
}
]
}
Was this helpful?