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:
▪ source – Windchill source expression that is a comma-separated list of oid names.
▪ target – Windchill target expression that is a comma-separated list of oid names.
▪ type – Windchill 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.
▪ securityContext –Windchill 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:
▪ source – Windchill source expression that is a comma-separated list of oid names.
▪ target – Windchill 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.
▪ securityContext –Windchill 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:
▪ source – Windchill source expression that is a comma-separated list of oid names.
▪ target – Windchill 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.
▪ securityContext –Windchill 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:
▪ id – Windchilll 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:
▪ id – Windchilll 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.