get https://apidocs.cloud.answerhub.com/services/v2/.json
You can use this API request to retrieve a paged list of the users that have been created on your AnswerHub site.
/services/v2/user.json
You can use the following parameters in your retrieve user list request:
Paging and Sorting: page, pageSize, sort
Search: q, type, lang
Projection: include, exclude, includeOnly
Other options: wrap, v1
Permissions & Notes:
- You must have the View users list permission under Anonymous Roles in the Advanced Editor.
- You can use the request parameter sort to specify which of the sorting and ordering criteria you want to use.
- An invalid sorting name will cause the request to reset to the default criteria.
- With the includeOnly parameter set to id and name (/services/v2/user.json?includeOnly=id,name) to the AnswerHub REST API.
- We added this request in version 1.6.3.
Sample Request
A GET retrieve user list request 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.json"
Sample Response
Successful Response:
- HTTP Status 200 - OK
{
"name": "",
"sort": "reputation",
"page": 1,
"pageSize": 35,
"pageCount": 3,
"listCount": 35,
"totalCount": 88,
"list": [
{
"id": 108,
"type": "user",
"creationDate": 1548263008000,
"creationDateFormatted": "01/23/2019 05:03 PM",
"modificationDate": 1548971898000,
"username": "admin",
"slug": "admin",
"gold": 0,
"silver": 0,
"bronze": 0,
"reputation": 61,
"moderator": false,
"superuser": true,
"avatar": "http://apidocs.cloud.answerhub.com/users/108/photo/view.html",
"postCount": 5,
"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": 1547066174000,
"name": "Network Administrators"
},
{
"id": "5",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066163000,
"name": "Super Users"
},
{
"id": "4",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1542778947000,
"name": "Moderators"
}
]
},
{
"id": 21,
"type": "user",
"creationDate": 1545231735000,
"creationDateFormatted": "12/19/2018 03:02 PM",
"modificationDate": 1548254413000,
"username": "einstein",
"realname": "Albert Einstein",
"slug": "einstein",
"gold": 0,
"silver": 0,
"bronze": 1,
"reputation": 47,
"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": 1548971848000,
"name": "Test Group"
},
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 7,
"type": "user",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1548971891000,
"username": "dzone",
"slug": "dzone",
"gold": 0,
"silver": 0,
"bronze": 2,
"reputation": 36,
"moderator": false,
"superuser": true,
"avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
"postCount": 10,
"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": 1547066163000,
"name": "Super Users"
},
{
"id": "6",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066174000,
"name": "Network Administrators"
}
]
},
{
"id": 11,
"type": "user",
"creationDate": 1545231253000,
"creationDateFormatted": "12/19/2018 02:54 PM",
"modificationDate": 1548972014000,
"username": "answerhub",
"slug": "answerhub",
"gold": 0,
"silver": 0,
"bronze": 3,
"reputation": 2,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/11/photo/view.html",
"postCount": 3,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 109,
"type": "user",
"creationDate": 1548344650000,
"creationDateFormatted": "01/24/2019 03:44 PM",
"modificationDate": 1548346503000,
"username": "demo4",
"slug": "demo4",
"gold": 0,
"silver": 0,
"bronze": 1,
"reputation": 1,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/109/photo/view.html",
"postCount": 0,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 97,
"type": "user",
"creationDate": 1548344611000,
"creationDateFormatted": "01/24/2019 03:43 PM",
"modificationDate": 1548346440000,
"username": "demo3",
"slug": "demo3",
"gold": 0,
"silver": 0,
"bronze": 1,
"reputation": 1,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/97/photo/view.html",
"postCount": 0,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 96,
"type": "user",
"creationDate": 1548344519000,
"creationDateFormatted": "01/24/2019 03:41 PM",
"modificationDate": 1548346411000,
"username": "demo2",
"slug": "demo2",
"gold": 0,
"silver": 0,
"bronze": 1,
"reputation": 1,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/96/photo/view.html",
"postCount": 0,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 31,
"type": "user",
"creationDate": 1547066128000,
"creationDateFormatted": "01/09/2019 08:35 PM",
"modificationDate": 1548346523000,
"username": "demo",
"slug": "demo",
"gold": 0,
"silver": 0,
"bronze": 1,
"reputation": 1,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/31/photo/view.html",
"postCount": 0,
"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": 1548971848000,
"name": "Test Group"
},
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 110,
"type": "user",
"creationDate": 1549031543000,
"creationDateFormatted": "02/01/2019 02:32 PM",
"modificationDate": 1549031544000,
"username": "JonS",
"slug": "jons",
"gold": 0,
"silver": 0,
"bronze": 0,
"reputation": 0,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/110/photo/view.html",
"postCount": 0,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
},
{
"id": 76,
"type": "user",
"creationDate": 1547066827000,
"creationDateFormatted": "01/09/2019 08:47 PM",
"modificationDate": 1547066827000,
"username": "EricOdell",
"slug": "ericodell",
"gold": 0,
"silver": 0,
"bronze": 0,
"reputation": 0,
"moderator": false,
"superuser": false,
"avatar": "http://apidocs.cloud.answerhub.com/users/76/photo/view.html",
"postCount": 1,
"followerCount": 0,
"followCount": 0,
"userFollowCount": 0,
"active": true,
"suspended": false,
"deactivated": false,
"groups": [
{
"id": "3",
"creationDate": 1542778947000,
"creationDateFormatted": "11/21/2018 05:42 AM",
"modificationDate": 1547066915000,
"name": "Users"
}
]
}
]
}