/services/v2/node/{node}/cancelRejectAsSpam
The purpose of this API is to cancel the rejection of content marked as SPAM from the SPAM queue, publishing it and communicating the false positive information to Akismet so that the Akismet service learns to more accurately recognize SPAM posts and automatically intercept them.
Permissions & Notes:
- You must have the permission called View Nodes in Moderation under Moderation Roles and the appropriate publish permission for the type of content you wish to publish from the SPAM queue as part of canceling the rejection. These could include: Publish other's question, Publish other's Answer, Publish other's Comments, Publish any Idea, Publish any Article. The Akismet plugin must be enabled and correctly configured.
This functionality was added in the 2.19.0 Release
Sample Request
https://apidocs.cloud.answerhub.com/services/v2/node/55/cancelRejectAsSpam
Here the nodeID (55) to cancel the reject as space action is indicated. The result will be that the node will be republished.
-u answerhub:test123
-H "Accept: application/json"
-H "Content-type: application/json"
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/node/55/cancelRejectAsSpam"
Sample Response
HTTP Error Response codes:
Success Response:
- 200: Message: Node: {0} has been successfully cancelled reject as spam.
Error Responses:
- 403: role issue - “View Nodes in Moderation” revoked role.
Message: We're sorry, but you are not allowed to view posts in moderation.
- 403: permission issue - Node not being in review or not being reported, and not being marked as spam, and haven’t granted publish acl permissions (PUBLISH, PUBLISH_OTHERS)
Message: We're sorry, but you are not allowed to cancel the spam node for publishing it.
- 404: node not found.
Message: Node not found.
400: Akismet plugin disabled
Message: Spam Akismet Plugin disabled.
400: Node not marked as spam.
Message: Node not marked as spam.