how ? :)
On 09/28/2011 01:23 PM, [email protected] wrote:
Please use the atompub module for this!
Best
Thomas
-----florent andré <[email protected]> schrieb: -----
An: lenya dev <[email protected]>
Von: florent andré <[email protected]>
Datum: 09/28/2011 01:00PM
Betreff: REST interface for creating a lenya document
It's a really first version (names will change).
The more simple usecase for creating one document with specific body
$ curl -X POST
"http://yourhost/lenya/publication-name/modules/lenyaDocWriting/create"
-F "[email protected]"
For Frieburg hackers :
$ curl -X POST
"http://193.196.240.56:8080/lenya/default/modules/lenyaDocWriting/create"
-F
"[email protected]"
content of the addxhtmlfile.xml file (save on you fs do $curl in the
same folder) :
=========
<?xml version="1.0" encoding="UTF-8"?>
<lenyadoc:lenyadoc xmlns:lenyadoc="http://4sengines/lenyadoc/0.1"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<lenyadoc:parameters>
<lenyadoc:resourcetype>xhtml</lenyadoc:resourcetype>
<lenyadoc:pubname>default</lenyadoc:pubname>
<lenyadoc:parentpath>/tutorial</lenyadoc:parentpath>
<lenyadoc:language>en</lenyadoc:language>
<lenyadoc:navtitle>Title of your new document</lenyadoc:navtitle>
</lenyadoc:parameters>
<!-- replace the body content of the default resource created -->
<lenyadoc:content>
<lenyadoc:contentpath>html</lenyadoc:contentpath>
<lenyadoc:replacepath>body</lenyadoc:replacepath>
<lenyadoc:fragment>
<xhtml:body>
<xhtml:p> here you have new content !! </xhtml:p>
</xhtml:body>
</lenyadoc:fragment>
</lenyadoc:content>
</lenyadoc:lenyadoc>
=========
end file content
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]