Retrieving Distribution Targets Associated with Windchill Objects
You can retrieve existing single or multiple Distribution Targets associated with single or multiple Windchill objects or their subtypes. You can retrieve all active or inactive Distribution Targets associated with the following Windchill objects or their subtypes: WTPart, Document, EPM Document, Option Set, Accountability Map, Process Plan, and so on.
Example: Retrieving Distribution Targets Associated with a Part
This example shows you how to retrieve Distribution Targets associated with a part specified in the request body. For example, if three Distribution Targets are associated with a part, then the request returns the attributes and metadata for the three Distribution Targets, respectively. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "VR:wt.part.WTPart:110282"
}
]
}
Example: Retrieving Distribution Targets Associated with Multiple Parts
This example shows you how to retrieve Distribution Targets associated with two parts specified in the request body. Consider an example where the first part has two Distribution Targets associated with it and the second part has three Distribution Targets associated with it. The request returns the respective attributes and metadata for the two Distribution Targets associated with the first part and the respective attributes and metadata for the three Distribution Targets associated with the second part. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "VR:wt.part.WTPart:110282"
},
{
"ID": "VR:wt.part.WTPart:110283"
}
]
}
Example: Retrieving Distribution Targets Associated with Different Types of Windchill Objects
This example shows you how to retrieve Distribution Targets associated with different types of Windchill objects specified in the request body. In this example, the request retrieves all the Distribution Targets associated 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/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"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"
}
]
}
Example: Retrieving Distribution Targets Associated with a Document
This example shows you how to retrieve Distribution Targets associated with a document specified in the request body. For example, if two Distribution Targets are associated with a document, then the request returns the attributes and metadata for the two Distribution Targets, respectively. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "VR:wt.doc.WTDocument:196168"
}
]
}
Example: Retrieving Distribution Targets Associated with an EPM Document
This example shows you how to retrieve Distribution Targets associated with an EPM document specified in the request body. For example, if two Distribution Targets are associated with an EPM document, then the request returns the attributes and metadata for the two Distribution Targets, respectively. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "OR:wt.epm.EPMDocument:196316"
}
]
}
Example: Retrieving Distribution Targets Associated with an Option Set
This example shows you how to retrieve Distribution Targets associated with an option set specified in the request body. For example, if two Distribution Targets are associated with an option set, then the request returns the attributes and metadata for the two Distribution Targets, respectively. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "VR:com.ptc.windchill.option.model.OptionSet:200045"
}
]
}
Example: Retrieving Distribution Targets Associated with an Accountability Map
This example shows you how to retrieve Distribution Targets associated with an accountability map specified in the request body. For example, if two Distribution Targets are associated with an accountability map, then the request returns the attributes and metadata for the two Distribution Targets, respectively. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DistributionTargetAssignables": [
{
"ID": "VR:wt.associativity.accountability.AccountabilityMap:198658"
}
]
}