cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Pull WT Part structure for different revision using SWAGGER API

Riz-4165786
11-Garnet

Pull WT Part structure for different revision using SWAGGER API

I am exploring SWAGGER Rest API. I am able to pull the part structure for latest revision using 

/structure/objects/{objectId}/descendants rest call. However, I would like to pull Part structure for previous revisions as well. I have checked parameters used in this API as well. But I don't see any exact parameter where we can pass the revision number and get the part structure. 

Does anybody has an idea idea what exactly we need to pass as a parameter to get the Part Structure for previous revision(s)?

 

Thank you in advance!

 

Thanks,

Rizvan

 

 

4 REPLIES 4

It's resolved now. we just need to pass versionIdentifier eq  "version number" as queryParams

Hello,

Can you help me to get latest revision of a part?

 

I tried,

$filter : "latestiteration eq '1'"

 

but it gives output as "Invalid expresion"

There is an issue with the swagger api and it's documentation. use this condition.

latestIteration eq ‘1’, but it never returns the latest Iteration, it returns all the iteration data.

 

@Riz-4165786 not exactly an answer to your swagger issue, but there is a whole set of new APIs in Windchill, which is based on OData standard.

For Your use case try below Windchill REST Services (WRS) API

POST /Windchill/servlet/odata/ProdMgmt/Parts('part_id')/PTC.ProdMgmt.GetBOM?$expand=Components($expand=Part($select=Name,Number),PartUse,Occurrences) 
CSRF_NONCE: <csrf_nonce>
Content-Type: application/json

Request body:
{
  
}

This will give you a much comprehensive data.

Top Tags