Creating a community blog
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To create a community blog, provide an Atom entry document that contains the blog's definition entry as a POST request to the remote applications feed of the community to which you want to add the blog.
Tags: commapi

Before you begin

You cannot add a blog to a community programmatically until the Blog widget has been added to the community using the Customize menu option in the product user interface. It is not until the widget is explicitly added that the service document resource for the blog is available from the remote applications feed.

Input
Method URI Description
POST /blogs/homepage/api/blogs Value of the href attribute in the <link> element that has the rel="http://www.ibm.com/xmlns/prod/sn/remote-application/publish" attribute for the entry with the Blog category in the remote applications Atom document of the community to which you want to add the blog.
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>

<entry 

 xmlns="http://www.w3.org/2005/Atom" 

 xmlns:app="http://www.w3.org/2007/app" 

 xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

	<title type='text'>Original Title</title>

	<category term='existing-tag'/>

	<snx:timezone>America/New_York</snx:timezone>

	<snx:handle>homepage</snx:handle>

	</entry>
Output
Code Description
201
Created. Indicates that the blog was successfully created. If an error occurs, this header contains one of the error codes.
400
Bad Request.
401
Unauthorized.