problem with object listing using xml/json

Asked by Netmagic Solutions

Hi,

I have a container with many sub-directories and thousands of objects. The files and directories are visible from cyberduck, swift list command and gladinet desktop client. But, below curl command does not show many directories :

curl -i -H "X-Auth-Token: AUTH_tk466621c3e14440e1poq2c7be42111b2r" -X GET https://simplidrive.netmagicsolutions.com/v1/AUTH_29h480p9-2376-419b-bae3-47da1c5f8e79/Container?format=xml

But, below command show the folders when specified :

curl -i -H "X-Auth-Token: AUTH_tk466621c3e14440e1poq2c7be42111b2r" -X GET https://simplidrive.netmagicsolutions.com/v1/AUTH_29h480p9-2376-419b-bae3-47da1c5f8e79/Container?prefix=foldername/&format=json

We need the first command's output to make my web portal working. Why could it not be showing all the folders under the container?

Any suggessions ?

I have already tried setting limit and setting marker, but no lock with that.

Regards,

Viral

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Netmagic Solutions
Solved:
Last query:
Last reply:
Revision history for this message
John Dickinson (notmyname) said :
#1

Take a look at the docs on http://docs.openstack.org/api/openstack-object-storage/1.0/content/pseudo-hierarchical-folders-directories.html. Does that answer your question about how the listings work?

If not, can you add what you are seeing with each of those requests?

Revision history for this message
Netmagic Solutions (simplidrive) said :
#2

Hi,

the issue got resolved.

Instead of using this method which was not giving the complete output :

curl -i -H "X-Auth-Token: AUTH_tk466621c3e14440e1poq2c7be42111b2r" -X GET https://simplidrive.netmagicsolutions.com/v1/AUTH_29h480p9-2376-419b-bae3-47da1c5f8e79/Container?format=xml

we used below method :

curl -i -H "X-Auth-Token: AUTH_tk466621c3e14440e1poq2c7be42111b2r" -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET https://simplidrive.netmagicsolutions.com/v1/AUTH_29h480p9-2376-419b-bae3-47da1c5f8e79/Container?path=

above command gives us the list of objects from the root of the container. Then we just have to query each directory found under it by giving the directory name as "?path=directory-name" and so on.

Thanks & Regards,

Viral