0

Query is something like .../_api/web/Lists/GetByTitle('Documents')/items?$select=File,File/ServerRelativeUrl,OData__UIVersion,owshiddenversion,FileRef

This worked in a SP Root site: OData__UIVersion was the exact number of versions.

But in a subsite (the same SP), for a file with just one version, OData__UIVersion is 512...

Next, I discovered the other field: owshiddenversion; This one seems to really return the correct value: the number of versions of a file.

Does anybody know what's the official definition of these 2 fields ? Is it safe to rely on owshiddenversion to determine how many versions a file has ?

Thank you.

2 Answers 2

0

According to https://docs.microsoft.com/openspecs/sharepoint_protocols/ms-listsws/65c0df83-47b8-4b0e-a195-2a6c22a4cfe8 , owshiddenversion is used for conflict detection, and according to https://learn.microsoft.com/da-dk/openspecs/sharepoint_protocols/ms-wssfo/20d052c8-4aa6-452d-bef4-2713578a74f2 , _UIVersion is the version number.

-1

You can find the official documentation at:

2.2.7.3 AllUserData Table

3.1.4.31.2.1 UpdateListItems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.