Graduate or Ungraduate an idea
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.
See Authenticating requests for information about how to authenticate the request.

To update a blog post, complete the following steps:

1. Retrieve the Blogs service document. See Retrieving the Blogs service document.
2. In the service document, find the workspace for the blog from which you want to retrieve the post,and then retrieve the web address of the "weblog Entries" collection in that workspace.
3. Send a GET request to the weblog Entries collection.
4. In the returned feed, find the entry and note down the value of the href attribute of its <link rel="edit" type="application/atom+xml" ... > element.
5. Send a PUT request to the web address defined in the href attribute and pass in a new blog post entry document that includes your changes.
Owner can always edit the content regardless the status.
  • Allow community owners to graduate an idea

  • Owner can just resubmit the entry document with: <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="graduated" />
    When an idea is graduated, the entry document's category flag is changed to :
    <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="graduated" label="Idea has graduated" />
  • An option is provided to create an activity (use Activities's atompub API)

  • In order to create or link an activity, the idea must be in graduated state.
    User will need to pass in the URL parameter createActivity=true to ask Blogs to create the activity when graduate the idea.
    If the activity widget doesn't exist we will create it.
    There will also be an option to map the ideationblog to an existing activity, to do this
    use the rel="http://www.ibm.com/xmlns/prod/sn/related/activity"above without the createActivity=true parameter
    we will check to see if it has already mapped to the same activity, if it is not then update it or add it if new
  • An idea can be ungraduated

  • To ungraduate an idea, delete the term="graduated" category.
    Make sure when you resubmit the entry document to an UPDATE, DO NOT REMOVE THE graduated term catergory if you have one and not intended to ungraduate it.
    Ungraduate idea will not have an "ungraduated" indicator, if term="graduated" is not found, then assume it is an ungraduate idea.

Table 1. Atom API request details
Method
Resource
URI
Iutput representation
Put
Blog post
Value of the href attribute of the <link rel="edit"> element of each entry in the weblog entries feed.
Blog post


Iutput

Provide a blog post Atom entry document.
Note: The content type of the Atom entry document must be application/atom+xml.

Output

None.

Returned HTTP headers

HTTP/1.1 200 OK
Indicates that the blog post 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