Flagging a blog post as inappropriate
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 flag a blog posting as inappropriate, send an Atom entry document containing the report to the Blogs content reporting mechanism.
To flag a blog post as inappropriate, complete the following steps:

<?xml version="1.0" encoding="utf-8" ?>

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

<id>ignored</id>

<title>ignored</title>

<author><name>ignored</name></author>

<category

scheme="http://www.ibm.com/xmlns/prod/sn/issue"

term="001"

label="Legal issue"/>

<link rel="related" href="self url from the subscription feed"/>

<content type="text">This post contains content that is against company policy</content>

</entry>

 

1. Find the self link of the blog post that you want to flag by retrieving a feed of blog posts. Make a note of the value of its href attribute. For example:
2. Create a report entry document in Atom format. In it, define the blog post that you want to flag by including a <link> element that specifies the web address you noted in the previous step in its href attribute. For example:
3. Pass the report entry document in with the POST request detailed in the table.

Input
Method URI Description
POST /blogs/{homepage}/api/reports/entries Inappropriate content reporting mechanism.
Note: {homepage} represents the blog handle of the blog configured to be the home page of the Blogs application. The handle is defined when the home page blog is created by the administrator.
Note: Starting with version 3, use this URI to flag a post.
POST /blogs/{homepage}/api/reports/entries/{entryId} Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/reports" attribute for each blog entry.
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="utf-8" ?>

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

<id>ignored</id>

<title>ignored</title>

<author><name>ignored</name></author>

<category 

 scheme="http://www.ibm.com/xmlns/prod/sn/issue" 

 term="001" 

 label="Legal issue"/>

<link rel="related" href="self url from the subscription feed"/>

<content type="text">This post contains content that is against company policy</content>

</entry>
Name Type Optional Description
homepage
string No {homepage} represents the blog handle of the blog configured to be the home page of the Blogs application. The handle is defined when the home page blog is created by the administrator.
entryId
string Yes Entry Id of the blog post
Output
Code Description
204
Indicates that the flag was accepted. If an error occurs, this header contains one of the error codes.
400
Bad Request. Returned when no matching user record can be found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
403
Forbidden. Can be returned when issue category support is enabled, but no category element was provided in the report entry or when flagging is disabled and you attempt to flag content.
404
Not Found. Can be returned when the content you are trying to flag is no longer available. It has been deleted, for example.
405
Method Not Allowed. Can be returned when flagging is disabled.