Retrieve a List of Answers Posted by a User

You can use this API request to retrieve a list of answers posted by a user on your AnswerHub site.

/services/v2/user/[userId]/answer.json

You can use the following parameters in your retrieve a list of answers posted by a user request:

Paging and Sorting: page, pageSize, sort
Projection: include, exclude, includeOnly
Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the View the questions list and View answers in the question page permissions under Anonymous Roles in the Advanced Editor.

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

  • We added this request in version 1.6.3.

Sample Request

A GET retrieve a list of answers posted by a user request for a user (userId: 7) 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/user/7/answer.json"

Sample Response

{
    "name": "",
    "sort": "votes",
    "page": 1,
    "pageSize": 10,
    "pageCount": 1,
    "listCount": 4,
    "totalCount": 4,
    "list": [
        {
            "id": 800,
            "type": "answer",
            "creationDate": 1547663719000,
            "creationDateFormatted": "01/16/2019 06:35 PM",
            "title": "You can go to the following link: ht ...",
            "body": "<div class=\"fr-view clearfix\"><p>You can go to the following link: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/\" target=\"_blank\">https://api.dzonesoftware.com/</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>You can go to the following link: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/\" target=\"_blank\">https://api.dzonesoftware.com/</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 917,
            "activeRevisionId": 800,
            "revisionIds": [
                800
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547663719000,
            "originalParentId": 806,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": true,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 1,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 1,
            "downVoteCount": 0,
            "nodeStates": [
                "accepted"
            ]
        },
        {
            "id": 807,
            "type": "answer",
            "creationDate": 1547743768000,
            "creationDateFormatted": "01/17/2019 04:49 PM",
            "body": "<div class=\"fr-view clearfix\"><p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 943,
            "activeRevisionId": 807,
            "revisionIds": [
                807
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547743768000,
            "originalParentId": 544,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 812,
            "type": "answer",
            "creationDate": 1547744013000,
            "creationDateFormatted": "01/17/2019 04:53 PM",
            "body": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 935,
            "activeRevisionId": 812,
            "revisionIds": [
                812
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547744013000,
            "originalParentId": 520,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 811,
            "type": "answer",
            "creationDate": 1547743939000,
            "creationDateFormatted": "01/17/2019 04:52 PM",
            "body": "<div class=\"fr-view clearfix\"><p>Go to this page and navigate down to the GDPR category for those specific endpoints: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/v1.8/reference\" target=\"_blank\">https://api.dzonesoftware.com/v1.8/reference</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Go to this page and navigate down to the GDPR category for those specific endpoints: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/v1.8/reference\" target=\"_blank\">https://api.dzonesoftware.com/v1.8/reference</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 933,
            "activeRevisionId": 811,
            "revisionIds": [
                811
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547743939000,
            "originalParentId": 535,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!