Reputation: 1210
I am attempting to write an api that interacts with an OpenStack cluster for a suite of tools and am looking into bulk-delete so I can avoid thousands of requests to the server.
According to my interpretation of the OpenStack documentation for bulk-delete I am doing the following:
http://ipaddress/v1/files/container-name?bulk-delete=true
encoding my object names (which do exist):
dps/filename.txt
dps/filename1.txt
dps/filename2.txt
as
dps%2Ffilename.txt%0Adps%2Ffilename1.txt%0Adps%2Ffilename2.txt
and including them in the request body
content-type
to text/plain
in the headersAfter completing this request I get a 204 - No Content response which doesn't match the documentation for what response I should receive. Also, no files are deleted which is the real problem.
Any ideas for what I am doing wrong?
Upvotes: 1
Views: 2648
Reputation: 99949
The URI for sending the request should not include the name of the container.
Also, there are two problems with the request body you are sending.
/
character between the container name and the object name.The algorithm to produce the request body should actually go in this order:
container/object
using the encoded names from the previous steps.Upvotes: 2