0 Replies Latest reply on Jun 5, 2012 2:43 PM by BrettHazen

    Specify JCR Property Type with Sling REST API

    BrettHazen Level 1

      I'm doing a content migration and using the Sling REST API and cURL to created the content in CQ. 


      I've got a cURL command that looks like this:

      curl -D - -X POST -u admin:admin -F ":operation=import" -F ":contentType=jcr.xml"  -F ":nameHint=test_news_page" -F ":content=@testpage.xml" -F ":replace=true" http://localhost:4502/content/myapp/en/home/presscenter/articles/2011/08/29/


      And XML that looks like this:


      <?xml version="1.0" encoding="UTF-8"?>










                jcr:title="Test News Page"





















                                              text="&lt;p&gt;from the command line&lt;/p&gt;"


                                              title="News Test Page Test"
















      This all works fine and creates the node correctly.  However, in the article node in my XML, you'll noticed there's a property called "searchDate".  This gets added as a string in the JCR, but I need it to be of type date (client's code is dependent on this).  Is there a way to do this via the Sling REST API?


      If that's not possible, I'm open to suggestions on other ways to achieve the same goal.