The Import/Export round-trip is something that's critical once projects start to migrate or backup content, so I'm working on introducing a mechanism for importing content on the sling level. Script import/export is available using the webdav interface and doesn't need any special support, and we already have a suitable content export model - JSON. A suggestion from Felix was to introduce a :import post parameter which would take the JSON file as a direct input. The filename itself is irrelevant, and it's content should always be JSON.
The import assumes create and overwrite but not delete so the following would recreate the contents of /content, leaving nodes not in the file untouched. curl -F":[EMAIL PROTECTED]" http://admin:[EMAIL PROTECTED]:8888/content I've written the import method to be performed last in the stack of operations - the post method allows us to send multiple operations, so the following would delete the existing content and then import the content from the file. curl -F":delete=/content" -F":[EMAIL PROTECTED]" http://admin:[EMAIL PROTECTED]:8888/content In addition to your thoughts on the above, I would like suggestions on the simplest method for only importing new/deleted nodes - does it really require an additional flag/operation? WDYT on introducing the new operation to the sling client library? Would we want to introduce a content import form to allow a GUI approach to Import/Export? Probably through the creation of a simple admin bundle? The work seems most likely be contained entirely within the SlingPostProcessor and SlingPostServlet objects, and am working on it at the moment. Cheers, Paul Noden
