Retrieve a List of Questions Posted by a User

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

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

You can use the following parameters in your retrieve a list of questions 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 permission under Anonymous Roles in the Advanced Editor.

  • With the includeOnly parameter set to id and name (/services/v2/question.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 questions posted by a user request for a user (userId: 11) 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/11/question.json"

Sample Response

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "list": [
        {
            "id": 806,
            "type": "question",
            "creationDate": 1547654401000,
            "creationDateFormatted": "01/16/2019 04:00 PM",
            "title": "Where do I go to learn more about AnswerHub as a Developer?",
            "body": "<div class=\"fr-view clearfix\"><p>I would like to know if there is a site I can go to if I am interested in learning about AnswerHub as a developer. </p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\">\n <p>I would like to know if there is a site I can go to if I am interested in learning about AnswerHub as a developer. </p>\n</div>",
            "author": {
                "id": 11,
                "username": "answerhub",
                "reputation": 2
            },
            "lastEditedAction": 926,
            "activeRevisionId": 806,
            "revisionIds": [
                806
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547663719000,
            "attachments": [],
            "childrenIds": [
                800
            ],
            "commentIds": [],
            "marked": true,
            "topics": [
                {
                    "id": 543,
                    "creationDate": 1547066694000,
                    "creationDateFormatted": "01/09/2019 08:44 PM",
                    "name": "answerhub",
                    "author": {
                        "id": 73,
                        "username": "jessed",
                        "reputation": 0
                    },
                    "usedCount": 3,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 805,
                    "creationDate": 1547654401000,
                    "creationDateFormatted": "01/16/2019 04:00 PM",
                    "name": "developer",
                    "author": {
                        "id": 11,
                        "username": "answerhub",
                        "reputation": 2
                    },
                    "usedCount": 1,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 127,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "technology",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 6,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "where-do-i-go-to-learn-more-about-answerhub-as-a-d",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 5,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": [],
            "answers": [
                800
            ],
            "answerCount": 1
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!