Retrieve Node Ghost Edits

Use this to retrieve ghost edits for ideas.

/node/{node_id}/revision.json

  • We added a new field called ghostEdit to the payload and added a query parameter called ghostEdit to the GET method:
    • If you do not specify the ghostEdit query parameter, the system will return all revisions.
    • If the ghostEdit query parameter is set to true, the system only returns ghost edit revisions.
    • If the ghostEdit query parameter is set to false, the system returns non-ghost edit revisions.
  • Example request with the query parameter:
    • /services/v2/question/{id}/revision.json?ghostEdit=true

🚧

Permissions & Notes:

  • You must have the new permission called Hide moderator edit under Moderation Roles in the Advanced Editor, to grant moderators the opportunity to see the checkbox to hide their edits in the community UI.

Sample Request

-u "answerhub:test123"
-H "Accept: application/json"
-H "Content-type: application/json"
-X GET "http://apidocs.cloud.answerhub.com/services/v2/node/973/revision.json?ghostEdit=true

Expected Responses

  • Successful Responses:
    HTTP Status Code: 200 - OK

  • Error Responses
    HTTP Status Code: 401 - Unauthorized

Sample Response

Successful Response

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "list": [
        {
            "id": 1008,
            "revision": 2,
            "node": {
                "id": 973
            },
            "title": "Creating a Test Idea for Ghost Edit",
            "body": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">Testing node ghost edit. Editing as a ghost edit.</p>",
            "bodyAsHTML": "<p style=\"background-color:rgba( 0 , 0 , 0 , 0 ) !important;background-color:rgba( 0 , 0 , 0 , 0 ) !important\">Testing node ghost edit. Editing as a ghost edit.</p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 77
            },
            "summary": "",
            "revisionDate": 1559936489000,
            "revisionDateFormatted": "6/7/19 7:41 PM",
            "topics": "ghost edit",
            "slug": "creating-a-test-idea-for-ghost-edit",
            "wiki": false,
            "ghostEdit": true
        }
    ]
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!