Skip to main content
12-Amethyst
October 15, 2018
Question

Pull WT Part structure for different revision using SWAGGER API

  • October 15, 2018
  • 2 replies
  • 4218 views

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

 

 

2 replies

12-Amethyst
November 8, 2018

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

1-Visitor
December 27, 2018

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"

12-Amethyst
January 14, 2019

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.

 

12-Amethyst
June 6, 2019

@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.