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

Pull WT Part structure for different revision using SWAGGER API

Highlighted
Gravel

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
Highlighted

Re: Pull WT Part structure for different revision using SWAGGER API

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

Highlighted

Re: Pull WT Part structure for different revision using SWAGGER API

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"

Highlighted

Re: Pull WT Part structure for different revision using SWAGGER API

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.

 

Highlighted

Re: Pull WT Part structure for different revision using SWAGGER API

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

Announcements