To programmatically take action on a comment that is waiting to be approved, send an Atom entry document that defines the action you want to take to the moderation action feed.
Only the moderator can take action on a comments awaiting approval.
See Authenticating requests
for information about how to authenticate the request.
To take action on a comment awaiting approval, complete the following steps:
Approves the comment and publishes it to the blog.
Rejects the request for publication and does not publish the comment to the blog.
Include a link element that identifies the comment you want to take action on. In the href attribute of the link element, include the web address from the history link that you made a note of in Step 3.
1. Retrieve the moderation service document. See Retrieving the Blogs moderation service document for more details.
2. In the service document, locate the workspace with the <atom:category term="comments-moderation" .../> child element, and then find the collection with the <atom:category term="approval-action" .../> element, and make a note of the web address in its href attribute.
3. Find the history link element of the comment that you want to take action on by getting a list of the comments awaiting approval. See Getting a list of comments that require action for more details. Make a note of the href attribute of the <link> with the rel="http://www.ibm.com/xmlns/prod/sn/history" attribute for the entry representing the comment.
4. Create an Atom entry document that defines the action you want to perform. In the <snx:moderation action="xxx" /> element, choose one of the following options:
5. Send a POST request to the web address that you noted in Step 2. Pass the Atom entry document that you created in the previous step as input on the request.
Provide a moderation action Atom entry document. The content type of the Atom entry document must be application/atom+xml.