Ask Your Question

swift: search objects in container by name

asked 2014-05-13 08:02:15 -0500

Robin Winslow gravatar image

updated 2014-08-19 12:42:36 -0500

briancline gravatar image

Is there any way to filter objects returned when listing items in a swift container? As far as I can tell, the following will simply list all items in a container:

http GET

If there are potentially thousands of objects inside that container, it would be really useful to be able to filter by say a substring of their name - e.g.:

http GET # return gif files

Even more useful would be to be able to search objects by arbitrarily set meta data. But I can't find anything in the docs1 suggesting you can do either of these things.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-13 18:00:30 -0500

torgomatic gravatar image

You can search by prefix with the prefix query parameter; setting prefix=abc will retrieve only entries for objects starting with "abc".

edit flag offensive delete link more


Yeah I know about prefix, but it's useless for this task. What I really want is to find on a substring anywhere - e.g. unt would find ubuntu.jpg.

Robin Winslow gravatar imageRobin Winslow ( 2014-05-14 05:02:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-05-13 08:02:15 -0500

Seen: 827 times

Last updated: May 13 '14