get https://apidocs.cloud.answerhub.com/services/v2///.json
Use this endpoint to retrieve the user's reputation.
/user/[user-id]/getReputation.json
- URL Params:
The user ID is part of the path.
- Query Params:
No query params
- 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/7/getReputation.json" -v
Expected Responses
- Successful Response:
HTTP Status Code: 200 - OK
- Error Response:
HTTP Status Code: 401 - Unauthorized
Sample Response
Successful Response Example
Click Here to see the Community User Interface Representation of the Reputation For User 7 (DZone)
{
"success": true,
"result": {
"realReputation": 75,
"reputation": 75
}
}
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>