Retrieve All Active Experts

Use this endpoint to retrieve a list of all the active experts.

/user/retrieveAllExperts.json

- Query Params

  • page (int) optional
  • pageSize (int) optional
  • sort (string) optional

Note:

  • page default is 1,
  • pageSize default is the default system pageSize (configurable).
  • Sort default is default sort (configurable as well).
    • Sort must be a valid one among these:
      • reputation
      • username
      • realname
      • recent
      • oldest
      • default

- Data Params

  • No data params

🚧

Permissions & Notes:

  • You must have the USE API role granted and the View User's Profile permission under Anonymous Roles in the Advanced Editor.

Sample Request

curl 
-u "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json"  
-X GET "http://apidocs.cloud.answerhub.com/services/v2/user/retrieveAllExperts.json?page=1&pageSize=10&sort=reputation" -v

Expected Responses

- Successful Response:
HTTP Status Code: 200 - OK

- Error Response:
HTTP Status Code: 401 - Unauthorized

Sample Response

Successful Response Example

{
    "name": "",
    "sort": "reputation",
    "page": 1,
    "pageSize": 10,
    "pageCount": 1,
    "listCount": 3,
    "totalCount": 3,
    "list": [
        {
            "id": 21,
            "type": "user",
            "creationDate": 1545231735000,
            "creationDateFormatted": "12/19/2018 03:02 PM",
            "modificationDate": 1551105093000,
            "username": "einstein",
            "realname": "Albert Einstein",
            "slug": "einstein",
            "gold": 1,
            "silver": 0,
            "bronze": 1,
            "reputation": 107,
            "moderator": false,
            "superuser": false,
            "avatar": "http://apidocs.cloud.answerhub.com/users/21/photo/view.html",
            "postCount": 230,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "95",
                    "creationDate": 1547821117000,
                    "creationDateFormatted": "01/18/2019 02:18 PM",
                    "modificationDate": 1549299974000,
                    "name": "Test Group"
                },
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550610500000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 108,
            "type": "user",
            "creationDate": 1548263008000,
            "creationDateFormatted": "01/23/2019 05:03 PM",
            "modificationDate": 1550866403000,
            "username": "admin",
            "slug": "admin",
            "gold": 0,
            "silver": 0,
            "bronze": 7,
            "reputation": 91,
            "moderator": false,
            "superuser": true,
            "avatar": "http://apidocs.cloud.answerhub.com/users/108/photo/view.html",
            "postCount": 13,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "6",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550855153000,
                    "name": "Network Administrators"
                },
                {
                    "id": "5",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550610500000,
                    "name": "Super Users"
                },
                {
                    "id": "4",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550610500000,
                    "name": "Moderators"
                }
            ]
        },
        {
            "id": 7,
            "type": "user",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1551105093000,
            "username": "dzone",
            "slug": "dzone",
            "gold": 1,
            "silver": 0,
            "bronze": 5,
            "reputation": 75,
            "moderator": false,
            "superuser": true,
            "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
            "postCount": 15,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "5",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550610500000,
                    "name": "Super Users"
                },
                {
                    "id": "6",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1550855153000,
                    "name": "Network Administrators"
                }
            ]
        }
    ]
}

Error Response Example if you forget to provide and/or select Basic Authorization credentials.

{
    "errors": {
        "message": "You don't have permission to do this action.<br>Please login as another user"
    }
}

Error Response Example if you forget to provide and/or select Basic Authorization credentials.

<html>
    <head>
        <title>Apache Tomcat/7.0.81 - Error report</title>
        <style>
            <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
        </style>
    </head>
    <body>
        <h1>HTTP Status 401 - Bad credentials</h1>
        <HR size="1" noshade="noshade">
        <p>
            <b>type</b> Status report
        </p>
        <p>
            <b>message</b>
            <u>Bad credentials</u>
        </p>
        <p>
            <b>description</b>
            <u>This request requires HTTP authentication.</u>
        </p>
        <HR size="1" noshade="noshade">
        <h3>Apache Tomcat/7.0.81</h3>
    </body>
</html>
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!