4
votes

I am reading this article https://cloud.google.com/storage/docs/json_api/v1/objects/list, and I didn't find it.

I have a bucket with thousands of objects (files). I want to list only object that have specific metadata.

Do you know how to achieve that?

1

1 Answers

3
votes

There's no API support for server-side filter of listing results by metadata values. You would need to list all the objects and then filter at the client side. Another option, if it's possible to rename your objects, would be to construct your object names such that the metadata values on which you want to filter are built into the beginning of the object names. You could then use a prefix filter on the listing request.