Skip to main content
1-Visitor
Dec 27, 2018 6:41 AM UTC
Question

How to get latest revision of a document using Rest API ?

Hello, 

I am using Windchill 11.1 M010.

I want to get latest revision of a document using Rest API.

 

I tried to use filter,

$filter : latestiteration eq '1',

 

but, this gives "Invalid expression".

 

Is there any way to get the latest revision of a document through Rest API?

 

 

15 replies

16-Pearl
Dec 27, 2018 10:28 AM UTC

I got this tip from one of my Windchill colleagues...

Can you try with

 

"Latest": true

 

instead of latestiteration : 1?

 

Translate
1-Visitor
Dec 27, 2018 11:59 AM UTC

Thanks,

but,

This also doesn't work. It says "Latest" is Invalid property

Translate
16-Pearl
Dec 27, 2018 3:22 PM UTC

Could you please post the complete request here?

Including any headers for Post, that contain any additional parameters.

 

This might help in seeing if there's anything off in the request itself.

Translate
12-Amethyst
Jun 7, 2019 9:59 AM UTC

This will give what you are looking for 

GET <windchill_server>:<port>/Windchill/servlet/odata/DocMgmt/Documents?$expand=Revisions
Translate
1-Visitor
Jun 17, 2019 5:41 AM UTC

hello Team,

Can you explain me how to use restful web service of windchill.

please let me know that initializing process to call restful web service of windchill.

Thank you in advance.

 

Translate
12-Amethyst
Jun 17, 2019 6:10 AM UTC

Try the REST Call/URL here in a browser or your favorite rest client like postman.

Translate