<html><body>
<p><font size="2" face="sans-serif">Hi Wu Ke,</font><br>
<br>
<font size="2" face="sans-serif">It seems that there is no such kind of full filter feature in Swift API. You have to implement it as a seperate component by yourself. But you can look at Glance image API to see how to implement it since Glance are using Swift to store VM images with Registry and Query features. Specifically you can refer to </font><a href="http://docs.openstack.org/api/openstack-image-service/1.0/content/filtering-images-returned-via-get-images-and-get-imagesdetail.html"><font size="2" face="sans-serif">image-list API</font></a><font size="2" face="sans-serif">. Another suggestion, you need to think about indexing capability since the container will most likely contain millions of objects. If the filtering is based on the full set of objects, it is challenging for performance.</font><br>
<font size="2" face="sans-serif"><br>
</font><font size="1" face="serif"><b>Best Regards, </b></font><font size="1" face="serif"><br>
<br>
</font><hr width="100%" size="2" align="left">
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="298" valign="middle">
<ul style="padding-left: 0pt"><font size="1" face="serif"><b>Edward Zhang(张华)</b></font><font size="1" face="serif"><br>
Staff Software Engineer<br>
Travel&Transportation Standards<br>
Emerging Technology Institute(ETI)<br>
IBM China Software Development Lab<br>
e-mail: zhuadl@cn.ibm.com<br>
Notes ID: Hua ZZ Zhang/China/IBM<br>
Tel: 86-10-82450483</font></ul>
</td><td width="298" valign="middle">
<ul style="padding-left: 0pt"><font size="1" face="serif">地址:北京市海淀区东北旺西路8号 中关村软件园28号楼 环宇大厦3层 邮编:100193<br>
Address: 3F Ring, Building 28 Zhongguancun Software Park, 8 Dongbeiwang West Road, Haidian District, Beijing, P.R.C.100193</font></ul>
</td></tr>

<tr valign="top"><td width="298" valign="middle">
<ul style="padding-left: 0pt"><img src="cid:1__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" width="100" height="100"></ul>
</td><td width="298" valign="middle"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""></td></tr>

<tr valign="top"><td width="298" valign="middle">
<ul style="padding-left: 0pt"><font size="1" face="serif"><br>
</font></ul>
</td><td width="298" valign="middle"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""></td></tr>
</table>
<br>
<img width="16" height="16" src="cid:3__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt="Inactive hide details for Ke Wu ---2012-06-12 04:19:13---Hi everyone,"><font size="2" color="#424282" face="sans-serif">Ke Wu ---2012-06-12 04:19:13---Hi everyone,</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:4__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com); background-repeat: no-repeat; " width="40%">
<ul style="padding-left: 72pt"><font size="1" face="sans-serif"><b>Ke Wu <ke.wu@ibeca.me></b></font><font size="1" face="sans-serif"> </font><br>
<font size="1" face="sans-serif">Sent by: openstack-bounces+zhuadl=cn.ibm.com@lists.launchpad.net</font>
<p><font size="1" face="sans-serif">2012-06-12 04:18</font></ul>
</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 7pt"><font size="1" face="sans-serif">openstack@lists.launchpad.net</font></ul>
</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 7pt"><font size="1" face="sans-serif">[Openstack] [Horizon][Swift]Cloudfile API</font></ul>
</td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:2__=C7BBF088DFA30B6B8f9e8a93df938@cn.ibm.com" border="0" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt><font size="2">Hi everyone, <br>
<br>
I am currently working on the Horizon's Swift containers/objects dashboard. On the dashboard user could retrieve, upload and delete objects which are in a Swift container.<br>
<br>
I tried to use Cloud File's Python API to connect to a Swift container and retrieve the objects, it all worked well. However, when I headed to implement filtering object function, I couldn't found a "Filter API" provided natively. The get_objects function of the Container object in the API does have a "prefix" parameter to allow me do some basic filter, but it's far from enough for a full functional filter. <br>
<br>
So what I am doing now is to retrieve a list of objects by get_objects method and filter the objects by name. This method is a bad hack, would lead to many problems such as breaking pagination, or too much resource consuming if the objects list is long.<br>
<br>
Was I missing some APIs? Or is there any other way that I can do this? Any thoughts would be helpful.<br>
<br>
Please kindly spare any spelling/grammar errors :)<br>
<br>
Thanks a lot!<br>
-Ke Wu<br>
<br>
<br>
<br>
_______________________________________________<br>
Mailing list: </font></tt><tt><font size="2"><a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a></font></tt><tt><font size="2"><br>
Post to     : openstack@lists.launchpad.net<br>
Unsubscribe : </font></tt><tt><font size="2"><a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a></font></tt><tt><font size="2"><br>
More help   : </font></tt><tt><font size="2"><a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a></font></tt><tt><font size="2"><br>
<br>
</font></tt><br>
</body></html>