<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How create Nuxeo document using csv file and java rest api in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-create-nuxeo-document-using-csv-file-and-java-rest-api/m-p/323528#M10529</link>
    <description>&lt;P&gt;Hi,
I am trying to develop a java program (java client + rest API) that allows to create nuxeo documents by using as input a csv file.&lt;BR /&gt; /&amp;gt;
I followed the tutorial of nuxeo "https://doc.nuxeo.com/nxdoc/java-client/#operation-api" and I created a document via the request put. this is my code :&lt;/P&gt;
&lt;P&gt;package up1.nuxeo.fileMaker;&lt;/P&gt;
&lt;P&gt;import org.nuxeo.client.NuxeoClient;&lt;/P&gt;
&lt;P&gt;import org.nuxeo.client.objects.Document;&lt;/P&gt;
&lt;P&gt;import okhttp3.Response;&lt;/P&gt;
&lt;P&gt;import static org.junit.Assert.assertEquals;&lt;/P&gt;
&lt;P&gt;import static org.junit.Assert.assertNotNull;&lt;/P&gt;
&lt;P&gt;import java.io.IOException;&lt;/P&gt;
&lt;P&gt;public class FileMakerTest {&lt;/P&gt;
&lt;P&gt;public static void main(String[] args) throws IOException {				
String url = "http://localhost:8080/nuxeo";
NuxeoClient nuxeoClient = new NuxeoClient.Builder()
.url(url)
.authentication("Administrator", "Administrator")
.connect();				
Document root = nuxeoClient.repository().fetchDocumentRoot();
System.out.println(root.getId());&lt;/P&gt;
&lt;P&gt;Response response = nuxeoClient.put("http://localhost:8080/nuxeo/api/v1/id/5fd2ab97-a8ae-4fb5-a67c-c4c13c0fb05a/",
"{"entity-type": "document","properties": {"dc:title": "new title test"}}");
assertEquals(true, response.isSuccessful());
String json = response.body().string();
Document document = (Document) nuxeoClient.getConverterFactory().readJSON(json, Document.class);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;someone tell me how to create multiple nuxeo documents with a single post request from a csv file ?&lt;/P&gt;
&lt;P&gt;best regards&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2018 14:44:58 GMT</pubDate>
    <dc:creator>Nuxeo_Dev</dc:creator>
    <dc:date>2018-02-27T14:44:58Z</dc:date>
    <item>
      <title>How create Nuxeo document using csv file and java rest api</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-create-nuxeo-document-using-csv-file-and-java-rest-api/m-p/323528#M10529</link>
      <description>&lt;P&gt;Hi,
I am trying to develop a java program (java client + rest API) that allows to create nuxeo documents by using as input a csv file.&lt;BR /&gt; /&amp;gt;
I followed the tutorial of nuxeo "https://doc.nuxeo.com/nxdoc/java-client/#operation-api" and I created a document via the request put. this is my code :&lt;/P&gt;
&lt;P&gt;package up1.nuxeo.fileMaker;&lt;/P&gt;
&lt;P&gt;import org.nuxeo.client.NuxeoClient;&lt;/P&gt;
&lt;P&gt;import org.nuxeo.client.objects.Document;&lt;/P&gt;
&lt;P&gt;import okhttp3.Response;&lt;/P&gt;
&lt;P&gt;import static org.junit.Assert.assertEquals;&lt;/P&gt;
&lt;P&gt;import static org.junit.Assert.assertNotNull;&lt;/P&gt;
&lt;P&gt;import java.io.IOException;&lt;/P&gt;
&lt;P&gt;public class FileMakerTest {&lt;/P&gt;
&lt;P&gt;public static void main(String[] args) throws IOException {				
String url = "http://localhost:8080/nuxeo";
NuxeoClient nuxeoClient = new NuxeoClient.Builder()
.url(url)
.authentication("Administrator", "Administrator")
.connect();				
Document root = nuxeoClient.repository().fetchDocumentRoot();
System.out.println(root.getId());&lt;/P&gt;
&lt;P&gt;Response response = nuxeoClient.put("http://localhost:8080/nuxeo/api/v1/id/5fd2ab97-a8ae-4fb5-a67c-c4c13c0fb05a/",
"{"entity-type": "document","properties": {"dc:title": "new title test"}}");
assertEquals(true, response.isSuccessful());
String json = response.body().string();
Document document = (Document) nuxeoClient.getConverterFactory().readJSON(json, Document.class);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;someone tell me how to create multiple nuxeo documents with a single post request from a csv file ?&lt;/P&gt;
&lt;P&gt;best regards&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 14:44:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-create-nuxeo-document-using-csv-file-and-java-rest-api/m-p/323528#M10529</guid>
      <dc:creator>Nuxeo_Dev</dc:creator>
      <dc:date>2018-02-27T14:44:58Z</dc:date>
    </item>
  </channel>
</rss>

