Rest API call dont update or document completely

I am using rest call to create document. The below are my parameters . The call create a document with name and title . But the other fields like created date or published date or state are not updated . WHY?

{

             "entity-type": "document",
             "name":"kk",
             "type": "File",
             "dc:description":"THis may work",
             "properties" : {
                                "dc:title":"lop",
                                "dc:issued":"2013-05-05T16:13:39.35Z",
                                "dc:created":"2013-03-05T16:13:39.35Z",
                                "dc:modified":"2013-03-05T16:13:39.35Z",
                                "dc:publisher":"Administrator"
                              },
                              "state" : "published"
            }
0 votes

1 answers

1403 views

ANSWER



Hello,

dc:created and dc:modified are updated automatically by the DublinCore Service server side. The REST API is only able to update the “properties” map.

To update the “state”, you have to make your document follow a transition.

1 votes



zod
i am actually doing an import process, create date and update date are past dates. i have to import a document in publish state or any state. can i do this by call rest api to create document. can you please explain "document follow a transition" ? any links will be helpful
05/02/2014

Actually you can change the creation date after its creation with a REST update call.
05/06/2014

Perhaps that for an import process, the rest API is not a good choice if you want to have fine grained control upon those properties. You should use nuxeo-platform-importer that is more suited for your needs.
05/06/2014

zod
i tried http://doc.nuxeo.com/display/USERDOC56/Bulk+document+importer but it behave like image upload. I tried to import a json file with document properties, what i thought was it will create a document reading that json file . but it just uploaded th json file as a File. is there any other way to import a document (Nuxeo Document) by passing the properties as json
05/06/2014