Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive: properties[] list not present in Files resource?

The Google Drive SDK documentation says that a Files resource has a properties[] list of its Properties resources. When we actually perform files.list or files.get queries, however, no such list is returned in the Files resources. The only way we've been able to get Properties resources is to query for them directly (via properties.list) once for each file, which is a performance drain since a single files.list operation can return many files. Our application will store custom metadata with each file and needs to be able to retrieve it in a timely manner.

Is the documentation in error? If so, is this functionality going to appear anytime soon? If the documentation is correct, how can we get properties[] to be populated in Files resources? I searched for answers to this before posting, but all I see is that you can't filter search queries for properties. Thanks for your help!

EDIT: We can use files.update/patch to insert data into properties[], but that data only seems to be retrievable via properties.get/list. We expect to be able to get this data in files.get/list, as implied by the documentation, but this is not working. From the point of view of the Files API, properties[] seems to be write-only.

like image 754
jcalz Avatar asked Nov 01 '22 12:11

jcalz


1 Answers

It's a documentation problem, you can retrieve properties only by properties.list/get. Querying based on properties and population of properties field were planned for files resource but none of them are supported at the moment.

like image 98
Burcu Dogan Avatar answered Nov 13 '22 22:11

Burcu Dogan