<?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 to create/update a document in the API Playground using POST/PUT? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-update-a-document-in-the-api-playground-using-post/m-p/319215#M6216</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The question is in the title.&lt;/P&gt;
&lt;P&gt;I keep getting a 404 error whenever I try to POST a new dummy document. I even tried using a generated 'body' template of a document after doing a GET on a pre-generated document.&lt;/P&gt;
&lt;P&gt;Can someone share a working input for these operations??&lt;/P&gt;
&lt;P&gt;Here's my failed input on the API:&lt;/P&gt;
&lt;P&gt;repoID : default&lt;/P&gt;
&lt;P&gt;document : {
"entity-type": "document",
"repository": "default",
"uid": "cd3eb986-efd5-404f-ae21-8e9da89cda01",
"path": "/default-domain/UserWorkspaces/Administrator/Sputnik.txt",
"type": "Note",
"state": "project",
"parentRef": "49ef8d01-9eb6-46ea-b537-adfafac05a27",
"isCheckedOut": true,
"changeToken": "1428912399000",
"title": "Sputnik.txt",
"lastModified": "2015-04-13T08:06:39.00Z",
"properties": {
"note:note": "python sputnik.py --command "v8/shell.exe C:\Users\lboey\Downloads\edf-apt\charte-edf-10\scripts\collection2.js"",
"note:mime_type": "text/plain",
"uid:uid": null,
"uid:major_version": 0,
"uid:minor_version": 0,
"common:size": null,
"common:icon-expanded": null,
"common:icon": "/icons/note.gif",
"files:files": [],
"dc:description": null,
"dc:language": null,
"dc:coverage": null,
"dc:valid": null,
"dc:creator": "Administrator",
"dc:modified": "2015-04-13T08:06:39.00Z",
"dc:lastContributor": "Administrator",
"dc:format": null,
"dc:expired": null,
"dc:rights": null,
"dc:created": "2015-04-13T08:06:39.82Z",
"dc:title": "Sputnik.txt",
"dc:issued": null,
"dc:nature": null,
"dc:subjects": [],
"dc:contributors": [
"Administrator"
],
"dc:source": null,
"dc:publisher": null,
"relatedtext:relatedtextresources": []
},
"facets": [
"Versionable",
"Publishable",
"Commentable",
"HasRelatedText"
]
}&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2015 10:53:18 GMT</pubDate>
    <dc:creator>lionelboey_swor</dc:creator>
    <dc:date>2015-04-13T10:53:18Z</dc:date>
    <item>
      <title>How to create/update a document in the API Playground using POST/PUT?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-update-a-document-in-the-api-playground-using-post/m-p/319215#M6216</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The question is in the title.&lt;/P&gt;
&lt;P&gt;I keep getting a 404 error whenever I try to POST a new dummy document. I even tried using a generated 'body' template of a document after doing a GET on a pre-generated document.&lt;/P&gt;
&lt;P&gt;Can someone share a working input for these operations??&lt;/P&gt;
&lt;P&gt;Here's my failed input on the API:&lt;/P&gt;
&lt;P&gt;repoID : default&lt;/P&gt;
&lt;P&gt;document : {
"entity-type": "document",
"repository": "default",
"uid": "cd3eb986-efd5-404f-ae21-8e9da89cda01",
"path": "/default-domain/UserWorkspaces/Administrator/Sputnik.txt",
"type": "Note",
"state": "project",
"parentRef": "49ef8d01-9eb6-46ea-b537-adfafac05a27",
"isCheckedOut": true,
"changeToken": "1428912399000",
"title": "Sputnik.txt",
"lastModified": "2015-04-13T08:06:39.00Z",
"properties": {
"note:note": "python sputnik.py --command "v8/shell.exe C:\Users\lboey\Downloads\edf-apt\charte-edf-10\scripts\collection2.js"",
"note:mime_type": "text/plain",
"uid:uid": null,
"uid:major_version": 0,
"uid:minor_version": 0,
"common:size": null,
"common:icon-expanded": null,
"common:icon": "/icons/note.gif",
"files:files": [],
"dc:description": null,
"dc:language": null,
"dc:coverage": null,
"dc:valid": null,
"dc:creator": "Administrator",
"dc:modified": "2015-04-13T08:06:39.00Z",
"dc:lastContributor": "Administrator",
"dc:format": null,
"dc:expired": null,
"dc:rights": null,
"dc:created": "2015-04-13T08:06:39.82Z",
"dc:title": "Sputnik.txt",
"dc:issued": null,
"dc:nature": null,
"dc:subjects": [],
"dc:contributors": [
"Administrator"
],
"dc:source": null,
"dc:publisher": null,
"relatedtext:relatedtextresources": []
},
"facets": [
"Versionable",
"Publishable",
"Commentable",
"HasRelatedText"
]
}&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 10:53:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-update-a-document-in-the-api-playground-using-post/m-p/319215#M6216</guid>
      <dc:creator>lionelboey_swor</dc:creator>
      <dc:date>2015-04-13T10:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create/update a document in the API Playground using POST/PUT?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-update-a-document-in-the-api-playground-using-post/m-p/319216#M6217</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;POST your request as below.&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;**URL:** &lt;/CODE&gt; &lt;A href="http://{server}:{port}/nuxeo/site/api/v1/id/{workspaceID}``" target="test_blank"&gt;http://{server}:{port}/nuxeo/site/api/v1/id/{workspaceID}``&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;WorkspaceID is the ID of the folder or workspace where u can place the created file.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Body:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{
  "entity-type": "document",
  "type": "File",
  "name": "myDocumentName",
  "properties": {
    "dc:title": "My Document Title"
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps you. Go through &lt;A href="https://doc.nuxeo.com/display/NXDOC/REST+API+Entity+Types#document" target="test_blank"&gt;https://doc.nuxeo.com/display/NXDOC/REST+API+Entity+Types#document&lt;/A&gt; for more info.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 13:43:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-update-a-document-in-the-api-playground-using-post/m-p/319216#M6217</guid>
      <dc:creator>Pradeep_Bhat</dc:creator>
      <dc:date>2016-02-18T13:43:50Z</dc:date>
    </item>
  </channel>
</rss>

