Act on a flagged community file comment 

To programmatically take action on a comment that has been flagged as inappropriate, 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 flagged comments.

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

To take action on a flagged comment...

  1. Retrieve the moderation service document. See Retrieve the Files moderation service document for more details.

  2. In the service document, locate the workspace with the <category term="comments-moderation" .../> child element, and then find the collection with the <atom:category term="review-action" .../> child element, and make a note of the web address in its href attribute.

  3. Find the entry representing the comment that you want to take action on by getting a list of flagged comments. See Getting a list of flagged community file comments for more details. Make a note of the value of the <td:uuid> element of 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:


        Dismissed the flag, but does not change the status of the comment.


        Removes the content from public view.


        Dismisses all flags and changes the status to active.

      Construct an <snx:in-ref-to> element that identifies the comment that you want to take action on using the following syntax:

      <snx:in-ref-to xmlns:snx="" 
         ref="<value_of_td:uuid>" >
      <snx:moderation action="dismiss" />

      where <value_of_td:uuid> is the value of the <td:uuid> element that you noted in Step 3.

      For example, to dismiss the flag on a comment, the Atom entry document might contain the following content:

      <?xml version="1.0"?>
      <name>ignored</name> <!-- taken from authenticated moderator user -->
      <snx:in-ref-to xmlns:snx="" 
      <snx:moderation action="dismiss" />
      <content>This content of this comment is not objectionable according to 
       company guidelines.</content>

  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.

Table 1. Atom API request details

Method Resource URI Input representation
POST Change comment review status collection Value of the href attribute of the <collection> element that has a <atom:category term="review-action" .../> child element in the moderation service document. moderation action


Provide a moderation action Atom entry document.  The content type of the Atom entry document must be application/atom+xml.



Returned HTTP headers

HTTP/1.1 204 No Content

Error codes



> POST files/basic/api/review/actions/comments HTTP/1.1
> Authorization: Basic xxx
> Host:
> Accept: */*
> Content-Type: application/atom+xml
> Content-Length: 509


< HTTP/1.1 204 No Content

Parent topic

Work with flagged community file comments

Related reference
Moderation action entry content