var client = new RestClient("https://kc.kobotoolbox.org/api/v1/forms/{pk}/csv_import"); client.Authenticator = new HttpBasicAuthenticator("user_name", "password"); client.AddDefaultUrlSegment("pk", "35545"); string file_path = Server.MapPath("~/form1.csv"); var request = new RestRequest(Method.POST); request.AddFile("csv_file", file_path); IRestResponse response = client.Execute(request);
var client = new RestClient("https://kc.kobotoolbox.org/api/v1/submissions");
client.Authenticator = new HttpBasicAuthenticator("user_name", "password");
var request = new RestRequest(Method.POST);
string file_path = Server.MapPath("~/form1.xml");
request.AddFile("xml_submission_file", targetPath);
IRestResponse response = client.Execute(request);
I want to achieve the same results but using JSON instead of CSV/XML.
Or if we have a good .NET converter that will convert my JSON file to XML/CSV in a format accepted by KOBO, that will be a solution too.
Thanks in advance.Jose--
You received this message because you are subscribed to the Google Groups "Kobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kobo-users.
For more options, visit https://groups.google.com/d/optout.