As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I wonder if it's possible to delete several files in one step. The REST API shows an example to delete a file by _id, that is of course unique. In wonder if it is possible to delete more than one file in a single step by querying another column than _id? Example:
I have two files:
_id group ...
ABC AAA
DEF AAA
Is it possible to delete a file by the mentioned custom filed 'group'? Both files belong to that group, so both would then be deleted in one step. Or is the delete operation only possible by the _id of a file?
Regards
Best Answer
P
Pranav J
said
almost 5 years ago
Tayger,
Using this method, you can delete only one file at a time.
Please try making a DELETE request on "/appdata/<your kid>/_blob/?query={"group":"AAA"}". I think this should delete all the entities whose 'group" value is "AAA". Let me know if it works.
Using this method, you can delete only one file at a time.
Please try making a DELETE request on "/appdata/<your kid>/_blob/?query={"group":"AAA"}". I think this should delete all the entities whose 'group" value is "AAA". Let me know if it works.
Thanks,
Pranav
Kinvey
T
Tayger
said
almost 5 years ago
Hello Pranav
I'm using the DELETE operation on collections and it works with a QUERY (mutli-delete). Thats ok... But it doesn't seem to work on the files:
// curl_setopt ($ch, CURLOPT_URL, 'https://baas.kinvey.com/blob/kid_xxxxxxx/'. $filelist[$f] .'?tls=true'); // -> This one is working fine!
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, 'https://baas.kinvey.com/blob/kid_xxxxxxx?query={"gameid":"'.$publicid.'"}'); // Leads to error (see below)
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Authorization: Kinvey ".$authtoken, "X-Kinvey-API-Version: 3" ));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$return =json_encode( curl_exec ($ch), true);
print_r ($return);
curl_close ($ch);
DELETE by _ID works fine on files. As soon as I use the QUERY option on files I got this message:
"{\"error\":\"The request was not understood.\",\"request\":\"DELETE \/blob\/kid_SkYzM4SHM\/?query={\\\"gameid\\\":\\\"GN6XVRB\\\"}\"}""{\"error\":\"The request was not understood.\",\"request\":\"DELETE \/blob\/kid_SkYzM4SHM\/?query={\\\"gameid\\\":\\\"GN6XVRB\\\"}\"}
The code sample above is set to produce this error while there is a remarked line with which the DELETE (on _ID) works fine.
It's not a big issue to me since I can delete by _ID. I thought this might my a security issue by Kinvey not allowing Query-Delete.
Regards
T
Tayger
said
almost 5 years ago
Hello again
Sorry for my too quick answer! I was not aware of your different link! After re-reading I saw the difference! I have tried your path-link and the group deletion works as QUERY!
Tayger
Hello
I wonder if it's possible to delete several files in one step. The REST API shows an example to delete a file by _id, that is of course unique. In wonder if it is possible to delete more than one file in a single step by querying another column than _id? Example:
I have two files:
_id group ...
ABC AAA
DEF AAA
Is it possible to delete a file by the mentioned custom filed 'group'? Both files belong to that group, so both would then be deleted in one step. Or is the delete operation only possible by the _id of a file?
Regards
Tayger,
Using this method, you can delete only one file at a time.
Please try making a DELETE request on "/appdata/<your kid>/_blob/?query={"group":"AAA"}". I think this should delete all the entities whose 'group" value is "AAA". Let me know if it works.
Thanks,
Pranav
Kinvey
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstPranav J
Tayger,
Using this method, you can delete only one file at a time.
Please try making a DELETE request on "/appdata/<your kid>/_blob/?query={"group":"AAA"}". I think this should delete all the entities whose 'group" value is "AAA". Let me know if it works.
Thanks,
Pranav
Kinvey
Tayger
Hello Pranav
I'm using the DELETE operation on collections and it works with a QUERY (mutli-delete). Thats ok... But it doesn't seem to work on the files:
DELETE by _ID works fine on files. As soon as I use the QUERY option on files I got this message:
"{\"error\":\"The request was not understood.\",\"request\":\"DELETE \/blob\/kid_SkYzM4SHM\/?query={\\\"gameid\\\":\\\"GN6XVRB\\\"}\"}""{\"error\":\"The request was not understood.\",\"request\":\"DELETE \/blob\/kid_SkYzM4SHM\/?query={\\\"gameid\\\":\\\"GN6XVRB\\\"}\"}
The code sample above is set to produce this error while there is a remarked line with which the DELETE (on _ID) works fine.
It's not a big issue to me since I can delete by _ID. I thought this might my a security issue by Kinvey not allowing Query-Delete.
Regards
Tayger
Hello again
Sorry for my too quick answer! I was not aware of your different link! After re-reading I saw the difference! I have tried your path-link and the group deletion works as QUERY!
Excellent, thank you!
Regards
-
Why am I getting "SignatureDoesNotMatch" error when uploading a file?
-
Why am I getting an "IncompleteRequestBody" error when sending a DELETE request?
-
Is there a default sort order to collections fetched without an explicit sort query?
-
Is it possible to set ACLs on all users so that only administrators can query for users (without dis
-
Flex SDK
-
Query Bug in Backend?
-
Can analytics data be retrieved via Java SDK or REST?
-
Accesing REST API from a server without a user?
-
What json is required to assign a user group either read/write?
-
LDAP Authorization
See all 120 topics