Skip to main content
6-Contributor
July 28, 2025
Question

Is it possible to get content of folder and subfolder using REST without OData ?

  • July 28, 2025
  • 1 reply
  • 379 views

Version: Windchill 12.1

 

Use Case: I would like to list all items of a selected folder, then to extract all documents related to the selected item


Description:

I've found several solutions using Odata, but I don't succeed to rerpoduce the same requests. And I would prefer to use REST queries to get result formated in json. Does the REST API can give access to all data that are accessible from the user web interface ?
Thanks for any help.

Fred

 

Context: Although the product version is 12.1.2.0, the REST Services version is 2.3.

1 reply

6-Contributor
July 30, 2025

I get the content of folder with the OData request :

https://<url>/Windchill/servlet/odata/v5/DataAdmin/Containers('OR:wt.pdmlink.PDMLinkProduct:681234555')/Folders('OR:wt.folder.Cabinet:681234597')/Folders('OR:wt.folder.SubFolder:681267970')/Folders('OR:wt.folder.SubFolder:681267975')/FolderContents

and because of the error message : "The returned query result has exceeded the query limit, and only 50,000 result returned.I try to limit the number of results by using the 'top' filter :

https://<url>/Windchill/servlet/odata/v5/DataAdmin/Containers('OR:wt.pdmlink.PDMLinkProduct:681234555')/Folders('OR:wt.folder.Cabinet:681234597')/Folders('OR:wt.folder.SubFolder:681267970')/Folders('OR:wt.folder.SubFolder:681267975')/FolderContents?$top=10

but it doesn't work, the result is the same.
Does anyone knows if it is an issue due to the old version of the rest api that I use ?
Thanks for any help
Fred

HelesicPetr
22-Sapphire II
22-Sapphire II
August 6, 2025

Hi @FM_13835117 

I would suspect that the query result limit is a limit set for the database in general. 

You can try to change the limit, but it can case some performance issue if user starts a report without criteria or advance search with week criteria as last modified on by date with an ending actual day >D

it can case very huge database load and can case a crash of method server based on low memory. 

 

btw you can try to change the limit by following article CS26116 - The returned query result has exceeded the query limit

 

PetrH

PetrH