Community articleManage Ideation Blog
Added by IBM contributorIBM on March 28, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.

To manage an ideation blog, send a replacement definition entry in Atom format to the blog's edit web address.

See Authenticating requests for information about how to authenticate the request.

 


To update a blog, complete the following steps

1. Retrieve the blog definition resource of the blog that you want to update.
Table 1. Atom API request details

Method
Resource
URI
Output representation
Get
Blog definition Feed
Value of the href attribute of the <link rel="edit"> element of each entry in the My Blogs feed.
Web address returned in the HTTP location header when the blog was created.
blog definition

2. Update the blog definition Atom document.

  • allow community owners to freeze/unfreeze blog. This option locks down the blog. No new entry can be created and no new comment on existing entries can be post.
    • <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="frozen" /> -- freeze blog
    • this action is used in blog level
    • client will use this element to set the idea blog status
  • allow community owners to stop/unstop adding new idea, this option only disable new entry allowance, but still allow comments on existing entries
    • <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="open" /> -- unstop, allow new ideas and comments
    • <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="closed" /> -- stop, no new ideas, but can comment on existing ideas
    • this element is used in blog level
    • client will use this to stop/unstop new idea and also implicitly set the idea blog status
    • open == set idea blog to active (if it is currently frozen) and allow new ideas
    • closed == set idea blog to active (if it is currently frozen) and disallow new ideas

3. Send the updated blog definition Atom entry document to the edit URL of the My Blogs feed.
The content type of the Atom entry document must be application/atom+xml.
Table 2. Atom API request details

Method
Resource
URI
Output representation
Put
Blog definition Feed
Value of the href attribute of the <link rel="edit"> element of each entry in the My Blogs feed.
Web address returned in the HTTP location header when the blog was created.
blog definition

Output


None.

Returned HTTP headers

HTTP/1.1 201 Created

Indicates that the blog was successfully updated. If an error occurs, this header contains one of the error codes.

Error codes


  • When an action is performed (freeze/active/open/close/graduate) and succeed, we will return 200 OK with the updated content
  • When an action is performed and failed due to unknown error, we will return 500 Internal Server Error with exception message if possible
  • When an action is performed but not allowed due to authorization reason, we will return 400 Unauthorized
  • When an action is performed but not allowed due to action not allowed, such as try to add new idea to an idea blog that disallow adding new idea, or try to comment on an idea in a frozen blog, we will return 403 Forbidden with a explanation, when an author trying edit his own entry but the entry is in graduated state, 403 will be returned
  • When graduating an idea and it failed at creating the activity we will still return 200 OK without the activity link element
  • When graduating an idea and it successfully created the activity we will return 200 OK with content update including the activity link element
     

Example


Input

PUT /blogs/homepage/api/blogs/W29542eac4d88_472b_8bd9_36c2fef3ce14 HTTP/1.1

	Authorization: Basic ...

	Host: blogs.enterprise.example.com 

	Content-type: application/atom+xml

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

	<entry xmlns:snx='http://www.ibm.com/xmlns/prod/sn'

	xmlns='http://www.w3.org/2005/Atom'>

	<category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="frozen" />

	</entry>




Related reference
Blogs definition content