Data Management Capabilities > Managing Part Structures > Part Structure Browser > Part Structure Actions > REST APIs for Part Relationships
  
REST APIs for Part Relationships
Windchill provides REST APIs to access part relationships. The APIs expose read-only information to web services such as ThingWorx. They can be used by any client that is capable of making an HTTP request.
* 
Note the following:
A user interface for these APIs is not provided.
Windchill object identifier (oid) is used in many definitions.
/v1/partsrelations – Returns all supersession and alternate objects that match specified criteria.
Input:
sourceWindchill source expression that is a comma-separated list of oid names.
targetWindchill target expression that is a comma-separated list of oid names.
typeWindchill type expression that is a comma-separated list of type names.
select – OData select expression that is a comma-separated list of property names. A service may define a default list of attributes to return. If asterisk (*) is specified, then the return list includes all the attributes of the object as defined in the Windchill Type and Attribute Management utility.
securityContextWindchill oid of the security context or the security context name or JSON that can be parsed into a navigation criteria. If the searched object is not Iterated then it is not necessary to specify the security context. If not specified, then the latest version is chosen.
Output:
Either a list of parts or an error code and error message.
/v1/partsrelations/alternates – Returns all alternate objects that match specified criteria.
Input:
sourceWindchill source expression that is a comma-separated list of oid names.
targetWindchill target expression that is a comma-separated list of oid names.
select – OData select expression that is a comma-separated list of property names. A service may define a default list of attributes to return. If asterisk (*) is specified, then the return list includes all the attributes of the object as defined in the Windchill Type and Attribute Management utility.
securityContextWindchill oid of the security context or the security context name or JSON that can be parsed into a navigation criteria. If the searched object is not Iterated then it is not necessary to specify the security context. If not specified, then the latest version is chosen.
Output:
Either a list of parts or an error code and error message.
/v1/partsrelations/supersession – Returns all supersession objects that match specified criteria.
Input:
sourceWindchill source expression that is a comma-separated list of oid names.
targetWindchill target expression that is a comma-separated list of oid names.
select – OData select expression that is a comma-separated list of property names. A service may define a default list of attributes to return. If asterisk (*) is specified, then the return list includes all the attributes of the object as defined in the Windchill Type and Attribute Management utility.
securityContextWindchill oid of the security context or the security context name or JSON that can be parsed into a navigation criteria. If the searched object is not Iterated then it is not necessary to specify the security context. If not specified, then the latest version is chosen.
Output:
Either a list of parts or an error code and error message.
/v1/partsrelations/alternate/{id} – Returns the alternate object with a specified ID.
Input:
idWindchilll number portion of an OIR.
This parameter is required.
select – OData select expression that is a comma-separated list of property names. A service may define a default list of attributes to return. If asterisk (*) is specified, then the return list includes all the attributes of the object as defined in the Windchill Type and Attribute Management utility.
Output:
Either an alternate object or an error code and error message.
/v1/partsrelations/supersession/{id} – Returns the supersession object with the specified ID.
Input:
idWindchilll number portion of an OIR.
This parameter is required.
select – OData select expression that is a comma-separated list of property names. A service may define a default list of attributes to return. If asterisk (*) is specified, then the return list includes all the attributes of the object as defined in the Windchill Type and Attribute Management utility.
Output:
Either a supersession object or an error code and error message.