Retrieve Earned Experts

Use this endpoint to retrieve a list of users with earned expertise.

/user/retrieveEarnedExperts.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/retrieveEarnedExperts.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 Responses

Successful Response Example

{
    "name": "",
    "sort": "reputation",
    "page": 1,
    "pageSize": 10,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "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"
                }
            ]
        }
    ]
}

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
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!