Adding Multiple EPM Documents to a Resource
You can add single or multiple EPM Documents to single or multiple resources (Process Materials, Skills, Toolings, or Work Centers) by specifying the resource and EPMDocument OIDs in the request body.
Example: Adding Multiple EPM Documents to a Process Material Object
The following example shows how to add two EPM Documents to a Process Material object. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateResourcesAssociations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartDocAssociations": [
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMProcessMaterial:264649')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMProcessMaterial:264649')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
}
]
}
Example: Adding Multiple EPM Documents to a Skill Object
The following example shows how to add two EPM Documents to a Skill object. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateResourcesAssociations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartDocAssociations": [
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:264652')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:264652')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
}
]
}
Example: Adding Multiple EPM Documents to a Tooling Object
The following example shows how to add two EPM Documents to a Tooling object. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateResourcesAssociations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartDocAssociations": [
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMTooling:264650')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMTooling:264650')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
}
]
}
Example: Adding Multiple EPM Documents to a Work Center Object
The following example shows how to add two EPM Documents to a Work Center object. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateResourcesAssociations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartDocAssociations": [
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMWorkCenter:264651')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMWorkCenter:264651')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
}
]
}
Example: Adding EPM Documents to Each Resource
The following example shows how to add EPM Documents to a Process Material, Skill, Tooling, and Work Center object in a single call. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateResourcesAssociations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartDocAssociations": [
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMProcessMaterial:264649')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264449')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:264652')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMSkill:264652')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMTooling:264650')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMWorkCenter:264651')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264478')"
},
{
"AssociationType": {
"Value": "CONTENT"
},
"RelatedPart@odata.bind": "Resources('OR:com.ptc.windchill.mpml.resource.MPMWorkCenter:264651')",
"RelatedCADDoc@odata.bind": "CADDocuments('OR:wt.epm.EPMDocument:264505')"
}
]
}
Was this helpful?