Unlock a Node

You can use this API request to unlock a previously locked node. After a node is unlocked, any user can edit it (if it's a wiki node).

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

You can use the following parameter in your unlock a node request:

Other options: wrap

🚧

Permissions & Notes:

  • You must have the Lock comments on posts permission under Moderation Roles in the Advanced Editor to unlock any node.

    • If the node you are trying to unlock is your own, you must have the Lock comments on own posts permission under Moderation Roles in the Advanced Editor.
  • We added this request in version 1.6.3.

Sample Request

A PUT unlock a node request to unlock a node (nodeId: 809) sent to https://apidocs.cloud.answerhub.com 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/809/unlock.json"

Expected Response

Successful Response:

  • HTTP Status 200 - OK
{
    "success": true,
    "result": {
        "unlockAction": {
            "id": 1068,
            "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 15:01:00.0",
            "canceled": true,
            "canceledByUser": {
                "id": 108,
                "username": "admin",
                "avatarUrl": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG"
            },
            "canceledDate": "Wed Feb 06 19:38:24 UTC 2019",
            "extra": "editing not allowed for anyone but author",
            "private": false,
            "verb": "locked",
            "node": {
                "id": 809,
                "type": "kbentry"
            }
        }
    }
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!