How can i delete submission through API using AJAX. Is there any example of it, kindly share. Also when i was reading the article i found one thing where it was mention as
/api/v1/data/{pk}/{dataid}
What is {pk} and what is {dataid} here, kindly both the points.
@khasaab , this post discussed previously should be helpful to solve your issue:
Yes. You use the REST “DELETE” method against desired submission endpoint
AFAIK there is no exposed REST API to delete a one or more submissions based on a specific criteria, eg date.
Instead, what you have to do is identify the unique REST endpoint corresponding to the specific submission instance under its associated form instance. Typically, the process would be to enumerate your forms (if you didnt already know the form id), eg
HOST=https://kf.kobotoolbox.org
curl -v --header 'Accept: a…
Hi,
When i try to delete submission through ajax i get this error. And also to mention i am using the host as https://kc.kobotoolbox.org/api/v1/data/{formid}/{dataid}
“CSRF Failed: Referer checking failed - no Referer.”