Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC BOM Transformation Domain > Retrieving the Equivalence Network for Parts
  
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
You can retrieve the upstream or downstream Equivalence Links for an upstream part or a downstream part, respectively.
Use the navigation property DownstreamEquivalanceLinks to retrieve downstream Equivalence Links for an upstream part specified in the request URI. Use the following URI with the GET method:
URI
GET /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:224811')?$expand=DownstreamEquivalanceLinks
You can further expand DownstreamEquivalanceLinks to retrieve information for the specified upstream part and its downstream equivalent parts from the up-to-date links.
URI
GET /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:224811')?$expand=DownstreamEquivalanceLinks($expand=Downstream,Upstream)
Similarly, you can retrieve the upstream Equivalence Links for a downstream part specified in the request URI using the navigation property UpstreamEquivalanceLinks. Use the following URI with the GET method.
URI
GET /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:203503')?$expand=UpstreamEquivalanceLinks
You can further expand UpstreamEquivalanceLinks to retrieve information for the specified downstream part and its upstream equivalent parts from the up-to-date links.
URI
GET /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:203503')?$expand=UpstreamEquivalanceLinks($expand=Downstream,Upstream)