How to delete Query submitted data of a specific form

Hi all,

How can I delete form data sent to kobo using queries.

The code below is what I used to query submitted data of a specific form.

//Query submitted data of a specific form

var client2 = new RestClient(“{pk}?query=” + query_data + “”);

client2.Authenticator = new HttpBasicAuthenticator(username,password);

client2.AddDefaultUrlSegment(“pk”, form_id);

var request2 = new RestRequest(Method.GET);

IRestResponse response2 = client2.Execute(request2);

Using the response2 I was able to check if the data exists or not

Now I would like to delete this data if the query result turns out to be true(data exists).

Thanks in advance.