Associating Distribution Targets with Windchill Objects
You can associate existing single or multiple Distribution Targets with single or multiple Windchill objects or their subtypes. You can associate active Distribution Targets with the following Windchill objects or their subtypes: WTPart, Document, EPM Document, Option Set, Accountability Map, Process Plan, and so on.
* 
Product or Library managers are not permitted to assign Distribution Targets. Only the following users can assign Distribution Targets:
Site or Organization administrators.
Members of user groups specified by the ESI > Settings > Enable ability to associate and remove distribution targets preference.
Example: Associating a Distribution Target with a Part Object
This example shows you how to associate a Distribution Target with a part object specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:199883"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:wt.part.WTPart:110282"
}
]
}
Example: Associating Multiple Distribution Targets with Multiple Parts
This example shows you how to associate multiple Distribution Targets with each of the parts specified in the request body. In this example, the request associates two Distribution Targets with each of the two parts specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:199883"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:199884"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:wt.part.WTPart:110282"
},
{
"ID": "VR:wt.part.WTPart:110283"
}
]
}
Example: Associating Multiple Distribution Targets with Multiple Document Objects
This example shows you how to associate multiple Distribution Targets with each of the document objects specified in the request body. In this example, the request associates two Distribution Targets with each of the two documents specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:199690"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:199767"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:wt.doc.WTDocument:196168"
},
{
"ID": "VR:wt.doc.WTDocument:196636"
}
]
}
Example: Associating Multiple Distribution Targets with Multiple EPM Document Objects
This example shows you how to associate multiple Distribution Targets with each of the EPM document objects specified in the request body. In this example, the request associates two Distribution Targets with each of the two EPM documents specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:198230"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:176038"
}
],
"DistributionTargetAssignables": [
{
"ID": "OR:wt.epm.EPMDocument:196316"
},
{
"ID": "OR:wt.epm.EPMDocument:196353"
}
]
}
Example: Associating Multiple Distribution Targets with Multiple Option Set Objects
This example shows you how to associate multiple Distribution Targets with each of the option set objects specified in the request body. In this example, the request associates two Distribution Targets with each of the two option sets specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:198230"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:176038"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:com.ptc.windchill.option.model.OptionSet:200045"
},
{
"ID": "VR:com.ptc.windchill.option.model.OptionSet:200058"
}
]
}
Example: Associating Multiple Distribution Targets with Multiple Accountability Map Objects
This example shows you how to associate multiple Distribution Targets with each of the accountability map objects specified in the request body. In this example, the request associates two Distribution Targets with each of the two accountability maps specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:198230"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:176038"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:wt.associativity.accountability.AccountabilityMap:198658"
},
{
"ID": "VR:wt.associativity.accountability.AccountabilityMap:198659"
}
]
}
Example: Associating Multiple Distribution Targets with Different Types of Windchill Objects
This example shows you how to associate multiple Distribution Targets with each of the Windchill object types specified in the request body. In this example, the request associates two Distribution Targets with each of the Windchill objects such as part, document, EPM document, option set, and accountability map specified in the request body. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/AssociateDistributionTarget?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargets": [
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:198230"
},
{
"ID": "OR:com.ptc.windchill.esi.tgt.ESITarget:176038"
}
],
"DistributionTargetAssignables": [
{
"ID": "VR:wt.part.WTPart:110282"
},
{
"ID": "VR:wt.doc.WTDocument:196168"
},
{
"ID": "OR:wt.epm.EPMDocument:196316"
},
{
"ID": "VR:com.ptc.windchill.option.model.OptionSet:200045"
},
{
"ID": "VR:wt.associativity.accountability.AccountabilityMap:198658"
}
]
}
¿Fue esto útil?