Undelete a Node

You can use this API request to undelete a previously deleted node.

/services/v2/node/[nodeId]/undelete.json

You can use the following parameters in your undelete a node request:

Other options: wrap

🚧

Permissions & Notes:

  • You must have the Delete any question or Delete any question/answer/comment permission in order to undelete any node.
    • If the node is your own, you must have the Delete own question or Delete own question/answer/comment permission.
  • The system does not actually remove deleted nodes from the database. The recovery of undeleted nodes is the equivalent of removing a node from the recycle bin or trash folder on your computer.
  • We added this request in version 1.6.3.

Sample Request

A PUT undelete a node request to undelete a node (nodeId: 832) sent to using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/node/832/undelete.json"

Expected Response

Successful Response:

  • HTTP Status 200 - OK
{
    "success": true,
    "result": {
        "deleteAction": {
            "id": 1073,
            "ip": "172.20.0.3",
            "user": {
                "id": 108,
                "username": "admin",
                "avatarUrl": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG"
            },
            "actionDate": "2019-02-06 19:59:47.0",
            "canceled": true,
            "canceledByUser": {
                "id": 108,
                "username": "admin",
                "avatarUrl": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG"
            },
            "canceledDate": "Wed Feb 06 20:48:39 UTC 2019",
            "extra": null,
            "private": false,
            "verb": "deleted",
            "node": {
                "id": 832,
                "type": "question"
            }
        }
    }
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!