ProjectWise Web Services Gateway - Missing results in document query?

Hi I am using the following query to retrieve documents from a folder:

https://{server}/ws/v2.5/repositories/Bentley.PW--{server}/PW_WSG/Document?api.ancestor=PW_WSG.Project-f546613b-b078-40bb-b966-ff65b4e1ade8&$select=Name,FileName&$filter=IsLatest+eq+true

Unfortunately there are a number of results that are missing from the list - even if I remove the filter they still do not appear. Does anyone have any idea why the query would ignore documents listed in that specific folder? If I login to ProjectWise Explorer using the same credentials I can clearly see the "missing" documents. Very strange!

Thanks,

Ed

  • Found a solution to the issue through the support team:

    "WSG support polymorphism: Document is the base class, and LogicalSet and FlatSet are Document class child (derived) classes. All requests in WSG is not polymorphic – except if you use !poly keyword. The URL (PW_WSG/Document?api.ancestor=PW_WSG.Project-f546613b-b078-40bb-b966-ff65b4e1ade8&$select=Name,FileName,Description,Version,UpdateTime,FileUpdateTime&$filter=IsLatest+eq+true) you are using, queries for Document class – documents that are not Logical or Flat set. In order to get documents, including logical/flat sets, you should query documents polymorphically - PW_WSG/Document!poly?api.ancestor=PW_WSG.Project-f546613b-b078-40bb-b966-ff65b4e1ade8&$select=Name,FileName,Description,Version,UpdateTime,FileUpdateTime&$filter=IsLatest+eq+true. This request would search within all types (Documents, Documents having references and also Flat sets) of documents that matches the filter conditions."


    So any documents with references are not returned without explicilty adding the !poly keyword into the query, hence the hit & miss with certain documents

    Answer Verified By: Edward Ashbolt 

  • I have the same problem and i have used !poly. I am not able to see work in progress files but only other states.

    Thanks