Retrieve Action Information

You can use this API request to retrieve detailed information about an action.

📘

Cannot Test This Endpoint!

Due to the type of permission required, this endpoint is not testable in the API Explorer. However, you can see the actual response you would have received in the Sample Response below. A user must be part of the Super Users group; the test user, answerhub, is not part of that group.

/services/v2/action/[actionId].json

You can use the following parameters in your action information request:

Projection: include, exclude, includeOnly
Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the View analytics permission under Site Administration Roles in the Advanced Editor and be part of the "Super Users" group.

  • To discover your actionId, you need to first perform the GET request, "Retrieve Action List."

    • The URI/URL parameter actionId is a placeholder for the actual identifier of the action.
    • You should format it as a valid integer (digit characters only).
  • With the includeOnly parameter set to id and name (/services/v2/action/[actionID].json?includeOnly=id,name) to the AnswerHub REST API.

Sample Request

A GET action information request for the the action (actionId: 1143) 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 GET "https://apidocs.cloud.answerhub.com/services/v2/action/1143.json"

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "id": 1143,
    "ip": "172.18.0.3",
    "user": {
        "id": 108,
        "username": "admin",
        "reputation": 91
    },
    "actionDate": 1550516867000,
    "canceled": false,
    "privateAction": false,
    "verb": "commented",
    "node": {
        "id": 858,
        "type": "idea-comment",
        "creationDate": 1550516867000,
        "creationDateFormatted": "02/18/2019 07:07 PM",
        "body": "<div class=\"fr-view clearfix\">Body of your comment as a response to an idea</div>",
        "bodyAsHTML": "<div class=\"fr-view clearfix\">Body of your comment as a response to an idea</div>",
        "author": {
            "id": 108,
            "username": "admin",
            "reputation": 91
        },
        "lastEditedAction": 1143,
        "activeRevisionId": 870,
        "revisionIds": [
            870
        ],
        "lastActiveUserId": 108,
        "lastActiveDate": 1550516867000,
        "originalParentId": 857,
        "attachments": [],
        "childrenIds": [],
        "commentIds": [],
        "marked": false,
        "topics": [],
        "containerIds": [],
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 0,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": []
    },
    "rootNode": {
        "id": 857,
        "type": "idea",
        "creationDate": 1550516642000,
        "creationDateFormatted": "02/18/2019 07:04 PM",
        "title": "Post a Reply to an Idea Test",
        "body": "<div class=\"fr-view clearfix\"><p>Idea to have a reply posted to it through the API. </p></div>",
        "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Idea to have a reply posted to it through the API. </p></div>",
        "author": {
            "id": 7,
            "username": "dzone",
            "reputation": 54
        },
        "lastEditedAction": 1142,
        "activeRevisionId": 869,
        "revisionIds": [
            869
        ],
        "lastActiveUserId": 108,
        "lastActiveDate": 1550516867000,
        "attachments": [],
        "childrenIds": [
            858
        ],
        "commentIds": [],
        "marked": false,
        "topics": [
            {
                "id": 854,
                "creationDate": 1550516642000,
                "creationDateFormatted": "02/18/2019 07:04 PM",
                "name": "idea",
                "author": {
                    "id": 7,
                    "username": "dzone",
                    "reputation": 54
                },
                "usedCount": 2,
                "getImmediateChildren": [],
                "getParents": []
            },
            {
                "id": 630,
                "creationDate": 1547066772000,
                "creationDateFormatted": "01/09/2019 08:46 PM",
                "name": "testing",
                "author": {
                    "id": 43,
                    "username": "Tom.Pryce",
                    "reputation": 0
                },
                "usedCount": 9,
                "getImmediateChildren": [],
                "getParents": []
            },
            {
                "id": 855,
                "creationDate": 1550516642000,
                "creationDateFormatted": "02/18/2019 07:04 PM",
                "name": "reply",
                "author": {
                    "id": 7,
                    "username": "dzone",
                    "reputation": 54
                },
                "usedCount": 1,
                "getImmediateChildren": [],
                "getParents": []
            },
            {
                "id": 856,
                "creationDate": 1550516642000,
                "creationDateFormatted": "02/18/2019 07:04 PM",
                "name": "comment",
                "author": {
                    "id": 7,
                    "username": "dzone",
                    "reputation": 54
                },
                "usedCount": 1,
                "getImmediateChildren": [],
                "getParents": []
            }
        ],
        "primaryContainerId": 11,
        "containerIds": [
            7,
            11
        ],
        "slug": "post-a-reply-to-an-idea-test",
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 2,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": []
    },
    "topics": [
        {
            "id": 854,
            "creationDate": 1550516642000,
            "creationDateFormatted": "02/18/2019 07:04 PM",
            "name": "idea",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "usedCount": 2,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 630,
            "creationDate": 1547066772000,
            "creationDateFormatted": "01/09/2019 08:46 PM",
            "name": "testing",
            "author": {
                "id": 43,
                "username": "Tom.Pryce",
                "reputation": 0
            },
            "usedCount": 9,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 855,
            "creationDate": 1550516642000,
            "creationDateFormatted": "02/18/2019 07:04 PM",
            "name": "reply",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "usedCount": 1,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 856,
            "creationDate": 1550516642000,
            "creationDateFormatted": "02/18/2019 07:04 PM",
            "name": "comment",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "usedCount": 1,
            "getImmediateChildren": [],
            "getParents": []
        }
    ]
}

Community User Interface Result

You will see the comment (ideaCommentId:858) that user, admin (userId:108) posted to the idea (ideaId:857)

Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!