Retrieve Action List

You can use this API request to retrieve a paged list of the actions performed on your AnswerHub site.

📘

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.json

You can use the following parameters in your retrieve action list request:

Paging and Sorting: page, pageSize, sort
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.

  • By default, it returns the first page of 20 actions (starting from the most recent).

  • Keep in mind, if an action is made while you are retrieving many pages of actions, you may receive duplicate actions.

  • With the includeOnly parameter set to id and name (/services/v2/action.json?includeOnly=id,name) to the AnswerHub REST API.

Sample Request

A GET retrieve action list request 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.json?pageSize=2"

👍

Use of pageSize:

Note, we used the parameter pageSize=2 to decrease the length of the response. Without this parameter the response will list a page's worth of actions. To switch pages in this view add the page=n parameter at the end of the request with n being the desired page number.

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "actions": [
        {
            "id": 1144,
            "ip": "172.18.0.3",
            "user": {
                "id": 7,
                "username": "dzone",
                "avatarUrl": "https://secure.gravatar.com/avatar/2a2a535b3ad59753e63b75d9dddbfc56?d=identicon&r=PG"
            },
            "actionDate": "2019-02-18 19:12:12.0",
            "canceled": false,
            "extra": null,
            "private": false,
            "verb": "suggested",
            "node": {
                "id": 859,
                "type": "idea"
            }
        },
        {
            "id": 1143,
            "ip": "172.18.0.3",
            "user": {
                "id": 108,
                "username": "admin",
                "avatarUrl": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG"
            },
            "actionDate": "2019-02-18 19:07:47.0",
            "canceled": false,
            "extra": null,
            "private": false,
            "verb": "commented",
            "node": {
                "id": 858,
                "type": "ideacomment"
            }
        }
    ],
    "moreResults": 1550516867000
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!