giovedì 9 febbraio 2012

Post to IBM Connections Blog using cUrl Command

to create a specific blog post of Connections, the outside, is enough to create an XML file that defines the specifications of the Post, as tags, categories etc etc ....


the command is:
 
curl -# -s -o ./<fileOutLog>.xml -v -X POST -H --post301 --post302 --header "Content-Type: application/atom+xml" --data "@<filePost>.xml" -k -L -v  "http://<fqdn>/blogs/<blogname>/api/entries"  -u <userName>:<password>

XML sample:
 
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Test HTML External Post</title>
    <category term="test" />
    <category term="External Post" />
 <content type="html"><![CDATA[

Body of post in HTML format, like <div>...<b etc etc...

]]>
 </content>

<category term="wiki" />
<category term="Connections" />
</entry>
 
your post is:
 
 

Nessun commento:

Posta un commento