To programmatically take action on a community file 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 file awaiting approval.
See Authenticating requests
for information about how to authenticate the request.
To take action on a file awaiting approval, complete the following steps:
Retrieve the moderation service document. See Retrieving the Files moderation service document for more details.
In the service document, locate the workspace with the <category term="documents-moderation" .../> child element, and then find the collection with the <atom:category term="approval-action" .../> child element, and make a note of the web address in its href attribute.
Find the entry representing the file that you want to take action on by getting a list of the entries awaiting approval. See Getting a list of community files that require action for more details. Make a note of the value of the <td:uuid> element for the entry representing the file.
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:
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.