Example: Retrieving the Equivalence Network for Parts
You can retrieve the equivalence network information for a set of parts, using the action GetEquivalenceNetworkForParts.
Consider a part in the manufacturing view that belongs to an equivalence network. The equivalence network for the part can be considered to be made up of two equivalence network paths, or branches as shown in the following figure:
Equivalence Network for a part that shows the two branches with upstream and downstream paths
To retrieve the equivalence network for the part you can use the following POST URI with the part OID in the request body. Use the expansion $expand=AllParts in order to get all the upstream and downstream paths in the equivalence network.
URI
POST Windchill/servlet/odata/BomTransformation/GetEquivalenceNetworkForParts/?$expand=EquivalenceNetwork($expand=AllParts)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"parts": "OR:wt.part:264357"
}
The response returned is the EquivalenceNetwork collection that represents the different branches or paths in the equivalence network for the part. Adding the additional expansion $expand=EquivalenceLink will additionally return the equivalence links between each element in the equivalence paths or branches. The following is the request:
POST Windchill/servlet/odata/BomTransformation/GetEquivalenceNetworkForParts/?$expand=EquivalenceNetwork($expand=AllParts)($select=PartIdentity;$expand=EquivalenceLink)
Retrieving Upstream and Downstream Equivalence Links for a Part
For the same example above you can also retrieve the upstream and downstream Equivalence Links for the part. Use the navigation property DownstreamEquivalanceLinks to retrieve downstream Equivalence Links for a part. Use the following URI with the GET method:
URI
GET /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:224811')?$expand=DownstreamEquivalanceLinks
Similarly you can retrieve the upstream Equivalence Links using the navigation property UpstreamEquivalanceLinks. Use the following URI with the GET method.
URI
/Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:224811')?$expand=UpstreamEquivalanceLinks