Customize Your Expert Knowledge Sharing Platform with AnswerHub

Welcome to our documentation site where you can learn how to import/export data, integrate with third party applications, and write custom AnswerHub user interfaces.

Get Started
Suggest Edits

Create a User

You can use this API request to create a new user as if they had explicitly registered into the system through the GUI.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://apidocs.cloud.answerhub.com/services/v2/user.json
curl --request POST \
  --url https://apidocs.cloud.answerhub.com/services/v2/user.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://apidocs.cloud.answerhub.com/services/v2/user.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user.json"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

/services/v2/user.json

The following parameters can be used in your create a user request:

Body: any field of the body parameter can be used.
Other options: wrap

Notes:

  • You must have the Create user permission.
  • The data describing the user to be posted can be specified both in the body of the request, or as a request parameter with the same names as the fields in the body.

    • When data is sent in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If data values for the same field are specified both on the request body and as request or query parameters, the value of the parameters takes precedence over the value in the body.
  • Notice: The UserRequest data model includes a field for the user password, using a secure connection to post this request is considered a best practice. In this case, the request URL uses protocol prefix https, which indicates that a secured connection using a protocol such as SSL/TLS (based on an asymmetric-key cryptography) will be used to make the request.

  • This request was added in version 1.6.3.

Sample Request

A POST create a user request sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub:test123) for a user named ("JonS") with a real name of ("Jon Smith"), a password (123454321), and an email (jonsmith@answerhub.com) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{ "username":"JonS","realName":"Jon Smith","password":"123454321","email":"jonsmith@answerhub.com"}' "https://apidocs.cloud.answerhub.com/services/v2/user.json" -v
Suggest Edits

Retrieve User Information

You can use this API request to retrieve detailed information about a user.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/7.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used in your retrieve user information request:

Projection: include, exclude, includeOnly
Other options: wrap, v1

Required Permission & Notes:

  • You must have the View user's profile permission.
  • The URI/URL parameter userId is a placeholder for the actual identifier of the topic.
    • It should be formatted as a valid integer (digit characters only).
  • With the includeOnly parameter set to id and name (/services/v2/user.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve user information request to retrieve information for a user (userId: 7) sent to our 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/7.json"

Sample Response

{
  "id": 2531,
  "type": "user",
  "creationDate": 1465833814000,
  "creationDateFormatted": "06/13/2016 04:03 PM",
  "modificationDate": 1473441130000,
  "username": "testUser",
  "slug": "testuser",
  "gold": 0,
  "silver": 5,
  "bronze": 8,
  "reputation": 195,
  "moderator": false,
  "superuser": true,
  "emailHash": "emailHash",
  "avatar": "avatarURL",
  "postCount": 93,
  "followerCount": 0,
  "followCount": 1,
  "userFollowCount": 1,
  "active": true,
  "suspended": false,
  "deactivated": false,
  "groups": [
    {
      "id": "6",
      "creationDate": 1433384477000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1471355247000,
      "name": "Group 1"
    },
    {
      "id": "3",
      "creationDate": 1433384476000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1471615337000,
      "name": "Group 2"
    },
    {
      "id": "4",
      "creationDate": 1433384476000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1470919052000,
      "name": "Group 3"
    },
    {
      "id": "5",
      "creationDate": 1433384477000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1472671521000,
      "name": "Group 4"
    }
  ],
  "extraData": {}
}
{"id":2531,"type":"user","creationDate":1465833814000,"creationDateFormatted":"06/13/2016 04:03 PM","modificationDate":1473441130000,"username":"testUser","slug":"testuser","gold":0,"silver":5,"bronze":8,"reputation":195,"moderator":false,"superuser":true,"emailHash":"emailHash","avatar":"avatarURL","postCount":93,"followerCount":0,"followCount":1,"userFollowCount":1,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"6","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471355247000,"name":"Group 1"},{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Group 2"},{"id":"4","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1470919052000,"name":"Group 3"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Group 4"}],"extraData":{}}
Suggest Edits

Retrieve User List

You can use this API request to retrieve a paged list of the users that have been created on your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

/services/v2/user.json

The following parameters can be used in your retrieve user list request:

Paging and Sorting: page, pageSize, sort
Search: q, type, lang
Projection: include, exclude, includeOnly
Other options: wrap, v1

Required Permission & Notes:

  • You must have the View users list permission.
  • The request parameter sort can be used to specify which of the sorting and ordering criteria should be used.
    • 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.
  • This request was added 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

{
  "name": "",
  "sort": "newest",
  "page": 3,
  "pageSize": 2,
  "pageCount": 1052,
  "listCount": 2,
  "totalCount": 2104,
  "list": [
    {
      "id": 2193,
      "type": "user",
      "creationDate": 1445243755000,
      "creationDateFormatted": "10/19/2015 08:35 AM",
      "modificationDate": 1467130785000,
      "username": "test1",
      "slug": "test1",
      "gold": 0,
      "silver": 0,
      "bronze": 3,
      "reputation": 127,
      "moderator": false,
      "superuser": true,
      "emailHash": "emailHash",
      "avatar": "avatarURL",
      "postCount": 17,
      "followerCount": 0,
      "followCount": 2,
      "userFollowCount": 2,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "3",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471615337000,
          "name": "Group 2"
        },
        {
          "id": "4",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1470919052000,
          "name": "Group 3"
        },
        {
          "id": "5",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1472671521000,
          "name": "Group 4"
        }
      ]
    },
    {
      "id": 2351,
      "type": "user",
      "creationDate": 1456782186000,
      "creationDateFormatted": "02/29/2016 09:43 PM",
      "modificationDate": 1473091277000,
      "username": "testUser2",
      "realname": "",
      "slug": "testUser2",
      "gold": 0,
      "silver": 3,
      "bronze": 6,
      "reputation": 121,
      "moderator": false,
      "superuser": true,
      "emailHash": "emailHash",
      "avatar": "avatarURL",
      "company": "",
      "website": "",
      "location": "",
      "postCount": 69,
      "followerCount": 0,
      "followCount": 3,
      "userFollowCount": 3,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "6",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471355247000,
          "name": "Group 2"
        },
        {
          "id": "4",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1470919052000,
          "name": "Group 3"
        },
        {
          "id": "5",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1472671521000,
          "name": "Group 4"
        }
      ]
    }
  ]
}
{"name":"","sort":"newest","page":3,"pageSize":2,"pageCount":1052,"listCount":2,"totalCount":2104,"list":[{"id":2193,"type":"user","creationDate":1445243755000,"creationDateFormatted":"10/19/2015 08:35 AM","modificationDate":1467130785000,"username":"test1","slug":"test1","gold":0,"silver":0,"bronze":3,"reputation":127,"moderator":false,"superuser":true,"emailHash":"emailHash","avatar":"avatarURL","postCount":17,"followerCount":0,"followCount":2,"userFollowCount":2,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Group 2"},{"id":"4","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1470919052000,"name":"Group 3"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Group 4"}]},{"id":2351,"type":"user","creationDate":1456782186000,"creationDateFormatted":"02/29/2016 09:43 PM","modificationDate":1473091277000,"username":"testUser2","realname":"","slug":"testUser2","gold":0,"silver":3,"bronze":6,"reputation":121,"moderator":false,"superuser":true,"emailHash":"emailHash","avatar":"avatarURL","company":"","website":"","location":"","postCount":69,"followerCount":0,"followCount":3,"userFollowCount":3,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"6","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471355247000,"name":"Group 2"},{"id":"4","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1470919052000,"name":"Group 3"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Group 4"}]}]}
Suggest Edits

Update a User

You can use this API request to update or edit a user that has already been created on your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/user_id.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/user_id.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/user_id.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/user_id.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/user_id.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

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

The following parameters can be used in your update a user request:

Other options: wrap.

Permissions & Notes:

  • You must have the Edit any profile permission to update any user.
    • If the user account is your own, you must have the Edit own profile permission.
  • You must have the Edit any profile details (name, location, password, etc.) permission
    • If the user account is your own, you must have the Edit own profile details (name, location, password, etc.).
    • Be very careful with this permission. Anyone with the Edit any profile details (name, location, password, etc.) can do exactly as the permissions states—edit anyone's password. Only give this permission to trusted people.
  • The data describing what user information should be edited or updated can be specified both in the body of the request, or as a request parameter with the same names as the fields in the body.

    • When data is sent in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If data values for the same field are specified both on the request body and as a request or query parameters, the value of the parameters takes precedence over the value in the body.
  • Notice: The UserRequest data model includes a field for the user password, using a secure connection to post this request is considered a best practice. In this case, the request URL uses protocol prefix HTTPs, which indicates that a secured connection using a protocol such as SSL/TLS (based on a asymmetric-key cryptography) will be used to make the request.

  • This request was added in version 1.6.3.

Sample Requests

A PUT update a user request to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub:test123) that updates a user (userId: 11) to have a real name of "Jon Smith" would look like this:

curl 
-u "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"realName":"Jon Smith"}' "https://apidocs.cloud.answerhub.com/services/v2/user/11.json" -v

Example including a key for updating the Avatar in the user profile.

curl 
-u "answerhub:answerhub" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"userName":"jons","realName":"Jon Smith", "about":"some data about Jon", "location":"NC", "birthday":"mm/dd/yyyy","profilePictureUrl":"base64 image encoder url"}' "https://apidocs.cloud.answerhub.com/services/v2/user/11.json" -v

Sample Response

Example of a user profile if you use /services/v2/user/[user-id].json at the end of your instance URL.

{
   "id":348,
   "type":"user",
   "creationDate":1416933266000,
   "creationDateFormatted":"11/25/2014 04:34 PM",
   "modificationDate":1539282920000,
   "username":"janed",
   "realname":"Jane Doe",
   "slug":"janed",
   "gold":3,
   "silver":5,
   "bronze":11,
   "reputation":898,
   "moderator":false,
   "superuser":true,
   "emailHash":"c05a5e879fa3df4665958903c6a5b46fbf386392814a2c3d9aa22a2d7348df2d",
   "avatar":"https://ah-test.cloud.answerhub.com/users/348/photo/view.html",
   "company":"",
   "website":"",
   "location":"",
   "postCount":103,
   "followerCount":2,
   "followCount":0,
   "userFollowCount":0,
   "about":"<p>ESFJ-A. </p>",
   "active":true,
   "suspended":false,
   "deactivated":false,
   "groups":[
      {
         "id":"6",
         "creationDate":1329386975000,
         "creationDateFormatted":"02/16/2012 10:09 AM",
         "modificationDate":1537449718000,
         "name":"Network Administrators"
      },
      {
         "id":"406",
         "creationDate":1437068639000,
         "creationDateFormatted":"07/16/2015 05:43 PM",
         "modificationDate":1524656785000,
         "name":"Developers"
      },
      {
         "id":"5",
         "creationDate":1329386975000,
         "creationDateFormatted":"02/16/2012 10:09 AM",
         "modificationDate":1538423035000,
         "name":"Super Users"
      },
      {
         "id":"4",
         "creationDate":1329386975000,
         "creationDateFormatted":"02/16/2012 10:09 AM",
         "modificationDate":1538423034000,
         "name":"Moderators"
      }
   ],
   "extraData":{
      "FavoriteMovie":null
   }
}
Suggest Edits

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.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/question.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/55/question.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/55/question.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/55/question.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/55/question.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/55/question.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used 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

Permission & Notes:

  • You must have the View the questions list permission.
  • With the includeOnly parameter set to id and name (/services/v2/question.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a list of questions posted by a user request for a user (userId: 7) 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/7/question.json"
{
  "name": "",
  "sort": "active",
  "page": 1,
  "pageSize": 15,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 4589,
      "type": "question",
      "creationDate": 1473442825000,
      "creationDateFormatted": "09/09/2016 05:40 PM",
      "title": "API Documentation Test Question",
      "body": "This is a test question for API Documentation\n",
      "bodyAsHTML": "<p>This is a test question for API Documentation<br></p>\n",
      "author": {
        "id": 2702,
        "username": "testUser3",
        "reputation": 1
      },
      "lastEditedAction": 23794,
      "activeRevisionId": 5995,
      "revisionIds": [
        5995
      ],
      "lastActiveUserId": 2702,
      "lastActiveDate": 1473442825000,
      "attachments": [],
      "childrenIds": [],
      "commentIds": [],
      "marked": false,
      "topics": [
        {
          "id": 1175,
          "creationDate": 1444378043000,
          "creationDateFormatted": "10/09/2015 08:07 AM",
          "name": "api",
          "author": {
            "id": 12,
            "username": "qa-testlab",
            "realname": "",
            "reputation": 1210
          },
          "usedCount": 5
        }
      ],
      "primaryContainerId": 8,
      "containerIds": [
        7,
        8
      ],
      "slug": "api-documentation-test-question",
      "wiki": false,
      "score": 0,
      "depth": 0,
      "viewCount": 1,
      "upVoteCount": 0,
      "downVoteCount": 0,
      "nodeStates": [],
      "answers": [],
      "answerCount": 0
    }
  ]
}
{"name":"","sort":"active","page":1,"pageSize":15,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":4589,"type":"question","creationDate":1473442825000,"creationDateFormatted":"09/09/2016 05:40 PM","title":"API Documentation Test Question","body":"This is a test question for API Documentation\n","bodyAsHTML":"<p>This is a test question for API Documentation<br></p>\n","author":{"id":2702,"username":"testUser3","reputation":1},"lastEditedAction":23794,"activeRevisionId":5995,"revisionIds":[5995],"lastActiveUserId":2702,"lastActiveDate":1473442825000,"attachments":[],"childrenIds":[],"commentIds":[],"marked":false,"topics":[{"id":1175,"creationDate":1444378043000,"creationDateFormatted":"10/09/2015 08:07 AM","name":"api","author":{"id":12,"username":"qa-testlab","realname":"","reputation":1210},"usedCount":5}],"primaryContainerId":8,"containerIds":[7,8],"slug":"api-documentation-test-question","wiki":false,"score":0,"depth":0,"viewCount":1,"upVoteCount":0,"downVoteCount":0,"nodeStates":[],"answers":[],"answerCount":0}]}
Suggest Edits

Retrieve a List of Answers Posted by a User

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

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/answer.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/answer.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/answer.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/answer.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/7/answer.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/answer.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used in your retrieve a list of answers 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 and View answers in the question page permissions.
  • With the includeOnly parameter set to id and name (/services/v2/answer.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a list of answers posted by a user request for a user (userId: 7) 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/7/answer.json"

Sample Response

{
  "name": "",
  "sort": "votes",
  "page": 1,
  "pageSize": 5,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 4590,
      "type": "answer",
      "creationDate": 1473442922000,
      "creationDateFormatted": "09/09/2016 05:42 PM",
      "body": "This is an answer for the API Documentation!\n",
      "bodyAsHTML": "<p>This is an answer for the API Documentation!<br></p>\n",
      "author": {
        "id": 2702,
        "username": "testUser3",
        "reputation": 1
      },
      "lastEditedAction": 23797,
      "activeRevisionId": 5996,
      "revisionIds": [
        5996
      ],
      "lastActiveUserId": 2702,
      "lastActiveDate": 1473442922000,
      "originalParentId": 4589,
      "attachments": [],
      "childrenIds": [],
      "commentIds": [],
      "marked": false,
      "topics": [],
      "containerIds": [],
      "wiki": false,
      "score": 0,
      "depth": 0,
      "viewCount": 0,
      "upVoteCount": 0,
      "downVoteCount": 0,
      "nodeStates": []
    }
  ]
}
{"name":"","sort":"votes","page":1,"pageSize":5,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":4590,"type":"answer","creationDate":1473442922000,"creationDateFormatted":"09/09/2016 05:42 PM","body":"This is an answer for the API Documentation!\n","bodyAsHTML":"<p>This is an answer for the API Documentation!<br></p>\n","author":{"id":2702,"username":"testUser3","reputation":1},"lastEditedAction":23797,"activeRevisionId":5996,"revisionIds":[5996],"lastActiveUserId":2702,"lastActiveDate":1473442922000,"originalParentId":4589,"attachments":[],"childrenIds":[],"commentIds":[],"marked":false,"topics":[],"containerIds":[],"wiki":false,"score":0,"depth":0,"viewCount":0,"upVoteCount":0,"downVoteCount":0,"nodeStates":[]}]}
Suggest Edits

Retrieve a List of Actions Performed by a User

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

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/action.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/action.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/action.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/action.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/7/action.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/action.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used in your retrieve a list of actions performed 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 user's profile and View analytics permissions.
  • With the includeOnly parameter set to id and name (/services/v2/action.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a list of actions performed by a user request for a user (userId: 7) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/answerhub) 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/7/action.json"

Sample Response

{
  "name": "",
  "sort": "actionDate",
  "page": 1,
  "pageSize": 10,
  "pageCount": 1,
  "listCount": 4,
  "totalCount": 6,
  "list": [
    {
      "id": 23797,
      "ip": "ipAdress",
      "user": {
        "id": 2702,
        "username": "testUser3",
        "reputation": 1
      },
      "actionDate": 1473442922000,
      "canceled": false,
      "privateAction": false,
      "verb": "answered",
      "node": {
        "id": 4590,
        "type": "answer",
        "creationDate": 1473442922000,
        "creationDateFormatted": "09/09/2016 05:42 PM",
        "body": "This is an answer for the API Documentation!\n",
        "bodyAsHTML": "<p>This is an answer for the API Documentation!<br></p>\n",
        "author": {
          "id": 2702,
          "username": "testUser3",
          "reputation": 1
        },
        "lastEditedAction": 23797,
        "activeRevisionId": 5996,
        "revisionIds": [
          5996
        ],
        "lastActiveUserId": 2702,
        "lastActiveDate": 1473442922000,
        "originalParentId": 4589,
        "attachments": [],
        "childrenIds": [],
        "commentIds": [],
        "marked": false,
        "topics": [],
        "containerIds": [],
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 0,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": []
      },
      "rootNode": {
        "id": 4589,
        "type": "question",
        "creationDate": 1473442825000,
        "creationDateFormatted": "09/09/2016 05:40 PM",
        "title": "API Documentation Test Question",
        "body": "This is a test question for API Documentation\n",
        "bodyAsHTML": "<p>This is a test question for API Documentation<br></p>\n",
        "author": {
          "id": 2702,
          "username": "testUser3",
          "reputation": 1
        },
        "lastEditedAction": 23794,
        "activeRevisionId": 5995,
        "revisionIds": [
          5995
        ],
        "lastActiveUserId": 2702,
        "lastActiveDate": 1473442922000,
        "attachments": [],
        "childrenIds": [
          4590
        ],
        "commentIds": [],
        "marked": false,
        "topics": [
          {
            "id": 1175,
            "creationDate": 1444378043000,
            "creationDateFormatted": "10/09/2015 08:07 AM",
            "name": "api",
            "author": {
              "id": 12,
              "username": "qa-testlab",
              "realname": "",
              "reputation": 1210
            },
            "usedCount": 5
          }
        ],
        "primaryContainerId": 8,
        "containerIds": [
          7,
          8
        ],
        "slug": "api-documentation-test-question",
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 1,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": []
      },
      "topics": [
        {
          "id": 1175,
          "creationDate": 1444378043000,
          "creationDateFormatted": "10/09/2015 08:07 AM",
          "name": "api",
          "author": {
            "id": 12,
            "username": "qa-testlab",
            "realname": "",
            "reputation": 1210
          },
          "usedCount": 5
        }
      ]
    }
{"name":"","sort":"actionDate","page":1,"pageSize":10,"pageCount":1,"listCount":4,"totalCount":6,"list":[{"id":23797,"ip":"ipAdress","user":{"id":2702,"username":"testUser3","reputation":1},"actionDate":1473442922000,"canceled":false,"privateAction":false,"verb":"answered","node":{"id":4590,"type":"answer","creationDate":1473442922000,"creationDateFormatted":"09/09/2016 05:42 PM","body":"This is an answer for the API Documentation!\n","bodyAsHTML":"<p>This is an answer for the API Documentation!<br></p>\n","author":{"id":2702,"username":"testUser3","reputation":1},"lastEditedAction":23797,"activeRevisionId":5996,"revisionIds":[5996],"lastActiveUserId":2702,"lastActiveDate":1473442922000,"originalParentId":4589,"attachments":[],"childrenIds":[],"commentIds":[],"marked":false,"topics":[],"containerIds":[],"wiki":false,"score":0,"depth":0,"viewCount":0,"upVoteCount":0,"downVoteCount":0,"nodeStates":[]},"rootNode":{"id":4589,"type":"question","creationDate":1473442825000,"creationDateFormatted":"09/09/2016 05:40 PM","title":"API Documentation Test Question","body":"This is a test question for API Documentation\n","bodyAsHTML":"<p>This is a test question for API Documentation<br></p>\n","author":{"id":2702,"username":"testUser3","reputation":1},"lastEditedAction":23794,"activeRevisionId":5995,"revisionIds":[5995],"lastActiveUserId":2702,"lastActiveDate":1473442922000,"attachments":[],"childrenIds":[4590],"commentIds":[],"marked":false,"topics":[{"id":1175,"creationDate":1444378043000,"creationDateFormatted":"10/09/2015 08:07 AM","name":"api","author":{"id":12,"username":"qa-testlab","realname":"","reputation":1210},"usedCount":5}],"primaryContainerId":8,"containerIds":[7,8],"slug":"api-documentation-test-question","wiki":false,"score":0,"depth":0,"viewCount":1,"upVoteCount":0,"downVoteCount":0,"nodeStates":[]},"topics":[{"id":1175,"creationDate":1444378043000,"creationDateFormatted":"10/09/2015 08:07 AM","name":"api","author":{"id":12,"username":"qa-testlab","realname":"","reputation":1210},"usedCount":5}]}
Suggest Edits

Retrieve a List of Awards Held by a User

You can use this API request to retrieve a list of UserAward describing the count and AwardType held by a user on your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/award.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/award.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/award.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/award.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/7/award.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/award.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used in your retrieve a list of awards held 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 user profile permission.
  • With the includeOnly parameter set to id and name (/services/v2/award.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a list of awards held by a user request for a user (userId: 9) 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/9/award.json" -v

Award Type

The Award listed in the JSON Response below is the award called "Citizen Patrol" and is awarded for reporting a post.

Sample Response

{
  "name": "",
  "sort": "newest",
  "page": 1,
  "pageSize": 6,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 347,
      "name": "awards.flagcount.bronze.name",
      "description": "awards.flagcount.bronze.description",
      "count": 1,
      "level": "bronze",
      "imageUrl": "imageURL",
      "creationDate": 1473443378000
    }
  ]
}
{"name":"","sort":"newest","page":1,"pageSize":6,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":347,"name":"awards.flagcount.bronze.name","description":"awards.flagcount.bronze.description","count":1,"level":"bronze","imageUrl":"imageURL","creationDate":1473443378000}]}
Suggest Edits

Make a User Follow Another User

You can use this API request to make a user start following a specific user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/follow.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/follow.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/follow.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/follow.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/7/follow.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/follow.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required
 

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

The following parameters can be used in your make a user follow another user request:

Specific: follower
Other options: wrap

Permissions & Notes:

  • You must have the Follow questions, users, topics, and categories permission.
  • You must have the Edit users and groups permission to use the follower parameter for another user.
  • The optional follower parameter specifies the user that will become a follower of the specified user.
    • The follower parameter, if used, will be the user's userId.
    • The follower parameter, if used, should go in the query string of the url.
    • If the follower parameter is not used, the user whose credentials are included in the request is made the space follower.
  • This request was added in version 1.6.3.

Sample Request

A PUT make a user follow another user request to make the API authenticated user a follower of another user (userId: 21) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/21/follow.json?follower=8" -v
Suggest Edits

Make a User Unfollow Another User

You can use this API request to make a user stop following another user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/unfollow.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/unfollow.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/unfollow.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/unfollow.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/7/unfollow.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/unfollow.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required
 

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

The following parameters can be used in your make a user unfollow another user request:

Specific: follower
Other options: wrap

Permissions & Notes:

  • You must have the Follow questions, users, topics, and categories permission.
  • You must have the Edit users and groups permission to use the follower parameter for another user.
  • The optional follower parameter specifies the user that will become a follower of the other user.
    • The follower parameter, if used, will be the user's userId.
  • If the follower parameter is not used, the user whose credentials are included in the request is made the node follower.
  • This request was added in version 1.6.3.

Sample Request

A PUT make a user unfollow another user request to make the API authenticated user unfollow another user (userId: 21) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/21/unfollow.json" -v
Suggest Edits

Suspend a User

You can use this API request to suspend a user from accessing or interacting with your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/suspendUser.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/suspendUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/suspendUser.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/suspendUser.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/7/suspendUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/suspendUser.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required
 

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

The following parameters can be used in your suspend a user request:

Specific: reason
Paging and Sorting: page, pageSize, sort
Projection: include, exclude
Other options: wrap

Permissions & Notes:

  • You must have the Suspend user permission.
  • According to site-specific policies, a user who violates the terms & agreements of that site may be banned temporarily, or permanently, by another user that has sufficient permissions.
  • This request was added in version 1.6.3.

Sample Request

A PUT suspend a user request to suspend a user (userId:8) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/8/suspendUser.json" -v
Suggest Edits

Unsuspend a User

You can use this request to unsuspend a user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/user_id/unsuspendUser.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

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

The following parameters can be used in your unsuspend a user request:

Specific options: reason

Permissions & Notes:

  • You must have the Suspend User permission.
  • This request was added in version 1.6.3.

Sample Request

A PUT unsuspend a user request to unsuspend a user (userId: 8) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/8/unsuspendUser.json" -v
Suggest Edits

Deactivate User

You can use this API request to deactivate and suspend a user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/deactivateUser.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/7/deactivateUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/deactivateUser.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/7/deactivateUser.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/7/deactivateUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/deactivateUser.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required
 

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

The following parameters can be used in your deactivate user request:

Specific options: reason

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • This request was added in version 1.6.3.

Sample Request

A PUT deactivate user request to deactivate a user (userId: 8) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/8/deactivateUser.json" -v
Suggest Edits

Reactivate User

You can use this API request to reactivate and unsuspend a user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user_id/reactivateUser.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/8/reactivateUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/8/reactivateUser.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/8/reactivateUser.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/8/reactivateUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/8/reactivateUser.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required
 

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

The following parameters can be used in your reactivate a user request:

Other options: wrap, v1

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • This request was added in version 1.6.3.

Sample Request

A PUT reactivate a user request to reactivate a user (userId: 8) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/answerhub) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/user/8/reactivateUser.json" -v
Suggest Edits

Retrieve User by Username

You can use this API request to return a user node by their username.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/getByUsername.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

username
string

required field

 

/services/v2/user/getByUsername.json?username=[data]

The following parameters can be used in your Get User by Username request:

Specific: username

Permissions & Notes:

  • You must have the View user's profile permission.
  • Do not place quotes around the username.
  • This request was added in version 1.6.3.

Sample Request

A GET get user by username request to get a user (username: dzone) 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/getByUsername.json?username=dzone" -v

Sample Response

{
  "id": 2702,
  "type": "user",
  "creationDate": 1473442611000,
  "creationDateFormatted": "09/09/2016 05:36 PM",
  "modificationDate": 1473443378000,
  "username": "testUser3",
  "slug": "testuser3",
  "gold": 0,
  "silver": 0,
  "bronze": 1,
  "reputation": 21,
  "moderator": false,
  "superuser": true,
  "emailHash": "emailHash",
  "avatar": "avatarURL",
  "postCount": 2,
  "followerCount": 0,
  "followCount": 0,
  "userFollowCount": 0,
  "active": true,
  "suspended": false,
  "deactivated": false,
  "groups": [
    {
      "id": "3",
      "creationDate": 1433384476000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1471615337000,
      "name": "Group 1"
    },
    {
      "id": "5",
      "creationDate": 1433384477000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1472671521000,
      "name": "Group 2"
    }
  ]
}
{"id":2702,"type":"user","creationDate":1473442611000,"creationDateFormatted":"09/09/2016 05:36 PM","modificationDate":1473443378000,"username":"testUser3","slug":"testuser3","gold":0,"silver":0,"bronze":1,"reputation":21,"moderator":false,"superuser":true,"emailHash":"emailHash","avatar":"avatarURL","postCount":2,"followerCount":0,"followCount":0,"userFollowCount":0,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Group 1"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Group 2"}]}
Suggest Edits

Retrieve Topics of Expertise

You can use this API request to return a list of topics that a user has expertise in.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/user/user_id/expertise.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/21/expertise.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/21/expertise.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/21/expertise.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/user/21/expertise.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/21/expertise.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user_id
int32
required

required field

 

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

The following parameters can be used in your get topics of expertise request:

Other options: wrap, v1

Permissions & Notes:

  • You must have the View user's profile permission.
  • This request was added in version 1.6.3.

Sample Request

A GET get topics of expertise request from a specific user (userId: 21) 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/21/expertise.json" -v

Sample Response

  • When you get the response back, to find the topics of expertise, look for the "name" fields within the "list" array.
  • The items in the "list" array are related to the questions that were answered by the user who's user id you entered into your request.
  • The username within the "list" array is the name of a user who asked the questions related to that topic, not the name of the user who is the expert in the topic.
  • The "usedCount" key provides the value relating to the number of times that specific topic was tagged in a question.
{
  "name": "",
  "sort": "newest",
  "page": 1,
  "pageSize": 6,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 4475,
      "creationDate": 1472847972000,
      "creationDateFormatted": "09/02/2016 08:26 PM",
      "name": "this_is_a_very_unique_topic_for_api_docs",
      "author": {
        "id": 2531,
        "username": "testUser",
        "reputation": 195
      },
      "usedCount": 8
    }
  ]
}
{"name":"","sort":"newest","page":1,"pageSize":6,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":4475,"creationDate":1472847972000,"creationDateFormatted":"09/02/2016 08:26 PM","name":"this_is_a_very_unique_topic_for_api_docs","author":{"id":2531,"username":"testUser","reputation":195},"usedCount":8}]}
Suggest Edits

Award Reputation

You can use this API request to award a given amount of reputation points to a user.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json?points=[data]
curl --request PUT \
  --url 'https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json?points=%5Bdata%5D'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json',
  qs: { points: '[data]' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json?points=%5Bdata%5D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json?points=%5Bdata%5D");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

points
int32
reason
string
 

/services/v2/user/[userId]/awardReputation.json?points=[data]

The following parameters can be used in your award reputation request:

Specific: points, reason

Permissions & Notes:

  • You must have the Award bonus reputation permission.
  • The reason parameter gets placed in action logs.
  • The points parameter is required.
  • You may supply a negative number for the number of points to remove points from a user.

Sample Request

A PUT award reputation to a user (userId: 7) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/user/7/awardReputation.json?points=9&reason=a%20good%20one" -v
Suggest Edits

Create a Group

You can use this API request to create a new group.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://apidocs.cloud.answerhub.com/services/v2/group.json
curl --request POST \
  --url https://apidocs.cloud.answerhub.com/services/v2/group.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://apidocs.cloud.answerhub.com/services/v2/group.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group.json"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

name
string
description
string
 

/services/v2/group.json

The following parameters can be used in your create a group request:

Body: any field of the body parameter can be used.
Other options: wrap

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • The location response header will contain the URL for the newly created group.
  • The data describing the group to be posted can be specified both in the body of the request, or as a request parameter with the same names as the fields in the body.
    • When data is sent in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If data values for the same field are specified both on the request body and as a request or query parameters, the value of the parameters takes precedence over the value in the body.
  • This request was added in version 1.6.3.

Sample Request

A POST create a group request to create a group ("Marketing") with a description ("Marketing Dept.") to https://apidocs.cloud.answerhub.com using a base64 encoded authorization would look like this:

curl 
-H "Authorization: Basic YW5zd2VyaHViOmFuc3dlcmh1Yg==" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{"name":"Marketing","description":"Marketing Dept."}' "https://apidocs.cloud.answerhub.com/services/v2/group.json" -v
Suggest Edits

Retrieve Group Information

You can use this API request to retrieve detailed information about a group.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/group/group_id.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/group/3.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/3.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group/3.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/group/3.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/3.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

group_id
int32
required

required field

 

/services/v2/group/[groupId].json

The following parameters can be used in your retrieve group information request:

Projection: include, exclude, includeOnly
Other options: wrap, v1

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • With the includeOnly parameter set to id and name (/services/v2/group.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve group information request to retrieve information for a group (groupId: 3) 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/group/3.json"

Sample Response

{
  "id": 2703,
  "type": "group",
  "creationDate": 1473444320000,
  "creationDateFormatted": "09/09/2016 06:05 PM",
  "modificationDate": 1473444332000,
  "name": "Test Group 1",
  "description": ""
}
{"id":2703,"type":"group","creationDate":1473444320000,"creationDateFormatted":"09/09/2016 06:05 PM","modificationDate":1473444332000,"name":"Test Group 1","description":""}
Suggest Edits

Retrieve Group List

You can use this API request to retrieve a paged list of the groups that have been created on your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/group.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/group.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/group.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

/services/v2/group.json

The following parameters can be used in your retrieve group list request:

Paging and Sorting: page, pageSize, sort
projection: include, exclude, includeOnly
Other options: wrap, v1

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • The sort parameter can be used to specify which of the sorting and ordering criteria should be used.
    • 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/group.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve group 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/group.json"

Sample Response

{
  "name": "",
  "sort": "",
  "page": 4,
  "pageSize": 2,
  "pageCount": 6,
  "listCount": 2,
  "totalCount": 12,
  "list": [
    {
      "id": 6,
      "type": "group",
      "creationDate": 1433384477000,
      "creationDateFormatted": "06/04/2015 02:21 AM",
      "modificationDate": 1471355247000,
      "name": "Network Administrators"
    },
    {
      "id": 2502,
      "type": "group",
      "creationDate": 1464958779000,
      "creationDateFormatted": "06/03/2016 12:59 PM",
      "modificationDate": 1464959944000,
      "name": "weight 1001",
      "description": "testing group"
    }
  ]
}
{"name":"","sort":"","page":4,"pageSize":2,"pageCount":6,"listCount":2,"totalCount":12,"list":[{"id":6,"type":"group","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471355247000,"name":"Network Administrators"},{"id":2502,"type":"group","creationDate":1464958779000,"creationDateFormatted":"06/03/2016 12:59 PM","modificationDate":1464959944000,"name":"weight 1001","description":"testing group"}]}
Suggest Edits

Update a Group

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/group/group_id.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/group/95.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/95.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group/95.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/group/95.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/95.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

group_id
int32
required

Query Params

description
string
 

/services/v2/group/[groupId].json

The following parameters can be used in your update a group request:

projection: include, exclude, includeOnly
Other options: wrap.

Permissions & Notes:

  • You must have the Edit user and groups permission.
  • The data describing what fields of group should be edited or updated can be specified both in the body of the request, or as request parameter with the same names as the fields in the body.
    • When data is sent in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If data values for the same field are specified both on the request body and as request or query parameters, the value of the parameters takes precedence over the value in the body.
  • This request was added in version 1.6.3.

Sample Request

A PUT update a group request to https://apidocs.cloud.answerhub.com using a base64 encoded authorization that updates a group (groupId: 95) to have a description ("Standard Users.") would look like this:

curl 
-H "Authorization: Basic YW5zd2VyaHViOmFuc3dlcmh1Yg==" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"description":"Standard Users."}' "https://apidocs.cloud.answerhub.com/services/v2/group/95.json" -v
Suggest Edits

Add User(s) to a Group

You can use this API request to add a user or users to a group.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/group/group_id/add.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

group_id
int32
required

Query Params

users
int32
 

/services/v2/group/[groupId]/add.json?users=[userId]

The following parameters can be used in your add user(s) to a group request:

specific: users
Other options: wrap

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • The mandatory users parameter specifies, in a comma separated format, the identifiers of the users to add to the group.
  • This request was added in version 1.6.3.

Sample Request

A PUT add user(s) to a group request to https://apidocs.cloud.answerhub.com using a base64 encoded authorization to add users (userId: 22, 23, and 24) to a group (groupId: 95), would look like this:

curl 
-H "Authorization: Basic YW5zd2VyaHViOmFuc3dlcmh1Yg==" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/group/95/add.json?users=22,23,24" -v
Suggest Edits

Remove User(s) From a Group

You can use this API request to remove a user or users from a group.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/group/group_id/remove.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

group_id
int32
required

Query Params

users
int32
 

/services/v2/group/[groupId]/remove.json?users=[userId]

The following parameters can be used in your remove user(s) from a group request:

Specific: users
Other options: wrap

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • The mandatory users parameter specifies, in a comma separated format, the identifiers of the users to add to the group.
  • This request was added in version 1.6.3.

Sample Request

A PUT remove user(s) from a group request tohttps://apidocs.cloud.answerhub.com using a base64 encoded authorization to remove a user (userId: 9) from a group (groupId: 31), would look like this:

curl 
-H "Authorization: Basic YW5zd2VyaHViOmFuc3dlcmh1Yg==" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/group/95/remove.json?users=22,23,24" -v
Suggest Edits

Retrieve a List of Users in a Group

You can use this API request to retrieve a paged list of the users that belong to a group on your AnswerHub site.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/group/group_id/user.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/group/95/user.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/95/user.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/group/95/user.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/group/95/user.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/95/user.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

group_id
int32
required

required field

 

/services/v2/group/[groupId]/user.json

The following parameters can be used in your retrieve a list of users in a group request:

Paging and Sorting: page, pageSize, sort
Projection: include, exclude, includeOnly
Other options: wrap, v1

Permissions & Notes:

  • You must have the Edit users and groups permission.
  • The sort parameter can be used to specify which of the sorting and ordering criteria should be used.
    • 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/topic.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a list of users in a group request to retrieve a list of users in a group (groupId: 95) 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/group/95/user.json" -v

Sample Response

{
  "name": "",
  "sort": "newest",
  "page": 1,
  "pageSize": 6,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 2702,
      "type": "user",
      "creationDate": 1473442611000,
      "creationDateFormatted": "09/09/2016 05:36 PM",
      "modificationDate": 1473444332000,
      "username": "testUser3",
      "slug": "testuser3",
      "gold": 0,
      "silver": 0,
      "bronze": 1,
      "reputation": 21,
      "moderator": false,
      "superuser": true,
      "emailHash": "emailHash",
      "avatar": "avatarURL",
      "postCount": 9,
      "followerCount": 0,
      "followCount": 0,
      "userFollowCount": 0,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "3",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471615337000,
          "name": "Group 1"
        },
        {
          "id": "2703",
          "creationDate": 1473444320000,
          "creationDateFormatted": "09/09/2016 06:05 PM",
          "modificationDate": 1473444332000,
          "name": "Test Group 1"
        },
        {
          "id": "5",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1472671521000,
          "name": "Group 4"
        }
      ]
    }
  ]
}
{"name":"","sort":"newest","page":1,"pageSize":6,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":2702,"type":"user","creationDate":1473442611000,"creationDateFormatted":"09/09/2016 05:36 PM","modificationDate":1473444332000,"username":"testUser3","slug":"testuser3","gold":0,"silver":0,"bronze":1,"reputation":21,"moderator":false,"superuser":true,"emailHash":"emailHash","avatar":"avatarURL","postCount":9,"followerCount":0,"followCount":0,"userFollowCount":0,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Group 2"},{"id":"2703","creationDate":1473444320000,"creationDateFormatted":"09/09/2016 06:05 PM","modificationDate":1473444332000,"name":"Test Group 1"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Group 4"}]}]}
Suggest Edits

Search for Content Using a Query

You can use this request to search for and return a paged list of nodes based on your query criteria.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/node.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/node.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/node.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

q
string

required

sort
string
 

/services/v2/node.json?q=[SearchTerm]

Permissions & Notes:

  • The q parameter is required.
  • With the includeOnly parameter set to id and name (/services/v2/node.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

The following parameters can be used in your search for content using a query request:

Paging and Sorting: page, pageSize, sort
Search: q, type, lang
Projection: include, exclude, includeOnly
Other options: wrap, v1

The following sorting criteria are supported in a node query request:

Criteria Name
Field
Order
Description

votes

score, extra.score

descending

This parameter sorts search results from the highest to the lowest vote count.

viewCount

extra.viewCount

descending

This parameter sorts search results from the highest to the lowest view count.

usedCount

extra.usedCount

descending

This parameter sorts search results from the highest to the lowest used count. (The used count is the number of actions performed on a specific node.)

reportCount

extra.reportCount

descending

This parameter sorts search results from the highest to the lowest report count. (The report count is the number of times a node has been reported.)

newest

creationDate

descending

This parameter sorts search results from the most recently to the least recently created.

hottest

(computed property)

descending

This parameter sorts search results from the most to least hot. (Hot is a computed property based on user activity, score, child count, etc.)

favoriteCount

extra.favoriteCount

descending

This parameter sorts search results from the highest to the lowest favorite count. (The favorite count is the number of times a node has been made a favorite by a user.)

default

descending

The default sorting is the same as active.

commentCount

extra.commentCount

descending

This parameter sorts search results from the highest to the lowest comment count.

answerCountDesc

extra.answerCount

descending

This parameter sorts search results from the highest to the lowest answer count.

answerCount

extra.answerCount

ascending

This parameter sorts search results from the lowest to the highest answer count.

Sample Requests

A GET search for content using a query request for "test" with results sorted by relevance sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

Note: In the query search example above, the sort will default to sort=relevance. If you try to do a query search and a sort in the same request, the sort will automatically default to relevance. The different query params should be used in separate requests.

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X GET "https://apidocs.cloud.answerhub.com/services/v2/node.json?q=test"
curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X GET "https://apidocs.cloud.answerhub.com/services/v2/node.json?sort=commentCount"

Use of pageSize

Note that the parameter pageSize = 1 was used to decrease the length of the JSON Response shown below. Without this parameter the response will display a full page worth of response. To change pages simply add the page=[pageNumber] parameter in your query.

Sample Responses

Response for query search, q="test"

{
   "name":"",
   "sort":"relevance",
   "page":1,
   "pageSize":15,
   "pageCount":34,
   "listCount":15,
   "totalCount":509,
   "sorts":[
      "active",
      "newest",
      "hottest",
      "votes",
      "viewCount",
      "usedCount",
      "answerCount",
      "answerCountAsc",
      "commentCount",
      "favoriteCount",
      "followers",
      "reportCount"
   ],
   "list":[
      {
         "id":957,
         "type":"question",
         "creationDate":1429286163000,
         "creationDateFormatted":"04/17/2015 03:56 PM",
         "title":"test question ok",
         "body":"hey here's a test question\n\n - test\n - test\n     - test\n - test\n - test\n\ntest\n\n 1. test\n 2. test\n 3. test\n 4. test\n   5. test\n\n\n",
         "bodyAsHTML":"hey here's a test question\n\n - test\n - test\n     - test\n - test\n - test\n\ntest\n\n 1. test\n 2. test\n 3. test\n 4. test\n   5. test\n\n\n",
         "author":{
            "id":153,
            "username":"testlab",
            "realname":"testlab",
            "reputation":469
         },
         "lastEditedAction":3646,
         "activeRevisionId":1410,
         "revisionIds":[
            1410
         ],
         "lastActiveUserId":7,
         "lastActiveDate":1432201997000,
         "attachments":[

         ],
         "childrenIds":[
            958,
            1052,
            1055
         ],
         "commentIds":[

         ],
         "marked":true,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            }
         ],
         "primaryContainerId":41,
         "containerIds":[
            41,
            7
         ],
         "slug":"test-question-ok",
         "wiki":false,
         "score":1,
         "depth":0,
         "viewCount":18,
         "upVoteCount":1,
         "downVoteCount":0,
         "nodeStates":[

         ],
         "answers":[
            1052,
            1055,
            958
         ],
         "answerCount":3
      },
      {
         "id":2487,
         "type":"question",
         "creationDate":1469819422000,
         "creationDateFormatted":"07/29/2016 07:10 PM",
         "title":"test question",
         "body":"<p>this is a link test for <a target=\"_blank\" href=\"http://www.google.com/\">google page</a></p><p>just a simple test</p>",
         "bodyAsHTML":"<p>this is a link test for <a href=\"http://www.google.com/\" target=\"_blank\">google page</a></p><p>just a simple test</p>",
         "author":{
            "id":81,
            "username":"ruit",
            "realname":"Rui Taveira",
            "reputation":32
         },
         "lastEditedAction":8963,
         "activeRevisionId":3339,
         "revisionIds":[
            3339,
            3338,
            3337
         ],
         "lastActiveUserId":81,
         "lastActiveDate":1469819771000,
         "attachments":[

         ],
         "childrenIds":[

         ],
         "commentIds":[

         ],
         "marked":false,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            }
         ],
         "primaryContainerId":41,
         "containerIds":[
            41,
            7
         ],
         "slug":"test-question-6",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":3,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ],
         "answers":[

         ],
         "answerCount":0
      },
      {
         "id":3778,
         "type":"question",
         "creationDate":1508401255000,
         "creationDateFormatted":"10/19/2017 08:20 AM",
         "title":"one more test question",
         "body":"<p>one more test question</p>",
         "bodyAsHTML":"<p>one more test question</p>",
         "author":{
            "id":531,
            "username":"agtestqa",
            "realname":"",
            "reputation":10
         },
         "lastEditedAction":13745,
         "activeRevisionId":4971,
         "revisionIds":[
            4971
         ],
         "lastActiveUserId":531,
         "lastActiveDate":1508401255000,
         "attachments":[

         ],
         "childrenIds":[

         ],
         "commentIds":[

         ],
         "marked":false,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            }
         ],
         "primaryContainerId":8,
         "containerIds":[
            8,
            7
         ],
         "slug":"one-more-test-question",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":2,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[
            "in review"
         ],
         "answers":[

         ],
         "answerCount":0
      }   
   ]
}

   
  
{"name":"","sort":"relevance","page":1,"pageSize":1,"pageCount":163,"listCount":1,"totalCount":163,"sorts":["active","newest","hottest","votes","viewCount","usedCount","answerCount","answerCountAsc","commentCount","favoriteCount","followers","reportCount"],"list":[{"id":4206,"type":"question","creationDate":1471344431000,"creationDateFormatted":"08/16/2016 10:47 AM","title":"Ask a Question -Ask a Question - Ask a Question","body":"Ask a QuestionAsk a Question\nAsk a QuestionAsk a Question\nAsk a QuestionAsk a Question\n","bodyAsHTML":"<p>Ask a QuestionAsk a Question<br>Ask a QuestionAsk a Question<br>Ask a QuestionAsk a Question<br></p>\n","author":{"id":2601,"username":"testUser","realname":"Real_Name","reputation":72},"lastEditedAction":22755,"activeRevisionId":5568,"revisionIds":[5568],"lastActiveUserId":75,"lastActiveDate":1471348773000,"attachments":[],"childrenIds":[4207,4208],"commentIds":[],"marked":false,"topics":[{"id":3011,"creationDate":1459845924000,"creationDateFormatted":"04/05/2016 08:45 AM","name":"question","author":{"id":12,"username":"testUser","realname":"","reputation":1195},"usedCount":35}],"primaryContainerId":8,"containerIds":[7,8],"slug":"ask-a-question-ask-a-question-ask-a-question","wiki":false,"score":0,"depth":0,"viewCount":6,"upVoteCount":0,"downVoteCount":0,"nodeStates":[],"answers":[4207,4208],"answerCount":1}]}

Response for sort="viewCount"

{
   "name":"",
   "sort":"viewCount",
   "page":1,
   "pageSize":15,
   "pageCount":11,
   "listCount":15,
   "totalCount":162,
   "sorts":[
      "active",
      "newest",
      "hottest",
      "votes",
      "viewCount",
      "usedCount",
      "answerCount",
      "answerCountAsc",
      "commentCount",
      "favoriteCount",
      "followers",
      "reportCount"
   ],
   "list":[
      {
         "id":5070,
         "type":"kbentry",
         "creationDate":1537865447000,
         "creationDateFormatted":"09/25/2018 08:50 AM",
         "title":"Lorem Ipsum",
         "body":"<h1>Lorem Ipsum</h1>\n<h2>test</h2>\n<h3>test</h3>\n<p>\n\ttest\ntest\n</p>\n<p>\n\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque magna urna, feugiat at ante eu, volutpat dapibus odio. Maecenas tincidunt dolor tincidunt velit porta gravida. Sed convallis ornare arcu eu pretium. In placerat tincidunt gravida. Aenean dui odio, lobortis vel nulla id, lobortis euismod nunc. In elementum, leo molestie faucibus vestibulum, dolor lectus pellentesque mauris, ut aliquam dolor est eu lacus. Maecenas mattis, ligula eget consectetur sagittis, velit purus condimentum turpis, a varius turpis libero ut quam. Pellentesque consequat arcu nulla, in imperdiet lacus blandit commodo.\n</p>\n<blockquote>\n\t<b>Praesent molestie mi lorem, in imperdiet ante vestibulum et. Cras posuere, orci ut lobortis dapibus, libero metus commodo nibh, ac egestas nulla justo non leo. Donec eu suscipit nulla, sed ultrices enim. Integer tristique arcu nisi, non pretium metus suscipit in. Nulla volutpat dapibus euismod. In arcu turpis, porttitor nec tempor sit amet, accumsan in neque. Nulla condimentum quis velit vel egestas.</b>\n</blockquote>\n<p>\n\t\tPraesent rhoncus metus vitae cursus aliquam. Quisque nec massa tristique sapien facilisis porta vestibulum non dolor. Duis vehicula lectus ex, viverra ultricies nisi sagittis eget. Nulla facilisi. Donec blandit elementum sem, ut placerat ipsum tempor vitae. Pellentesque a rhoncus ante. Etiam vel nunc eget mi faucibus placerat nec et eros. Praesent mi turpis, sollicitudin ac erat et, suscipit viverra mi. In hendrerit turpis eu posuere auctor. Maecenas iaculis facilisis nisl quis condimentum. Cras commodo magna in vulputate accumsan. Sed eget risus sapien. \n\tnot yet available!Nullam sed ante sollicitudin, egestas arcu et, porttitor lorem. Vivamus a tempus magna, sit amet condimentum nisi. Fusce ac dictum erat.\n</p>\n<p>\n\tNullam purus libero, elementum scelerisque est nec, vestibulum congue purus. Mauris quis tortor in neque scelerisque facilisis vitae at dui. Morbi mi justo, pellentesque sed hendrerit nec, porttitor in mi. Vestibulum vehicula dolor ut est commodo eleifend. Vivamus suscipit, mi quis consequat placerat, felis lectus accumsan augue, et faucibus augue massa eu mi. Nullam faucibus maximus placerat. Cras et lectus urna. In posuere ultricies orci, in hendrerit tellus elementum id.\n</p>\n<table>\n<tbody>\n<tr>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n</tr>\n<tr>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n</tr>\n</tbody>\n</table>\n<p>\n\tInteger tempus libero et urna interdum, non porta velit euismod. Praesent eu imperdiet nibh, ut rutrum justo. Quisque quis ante elit. Ut posuere finibus magna, id dignissim purus euismod vitae. Suspendisse id libero mi. Cras nunc justo, pellentesque id fermentum eget, gravida ut nisl. Nam magna elit, auctor vel lorem quis, malesuada porta eros. Nulla facilisi. Proin ac tempus metus.\n</p>\n<p>\n\t<img src=\"/storage/attachments/1055-getlorem-library-to-generate-lorem-ipsum-text.png\">\n</p>",
         "bodyAsHTML":"<h1>Lorem Ipsum</h1>\n<h2>test</h2>\n<h3>test</h3>\n<p>\n\ttest\ntest\n</p>\n<p>\n\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque magna urna, feugiat at ante eu, volutpat dapibus odio. Maecenas tincidunt dolor tincidunt velit porta gravida. Sed convallis ornare arcu eu pretium. In placerat tincidunt gravida. Aenean dui odio, lobortis vel nulla id, lobortis euismod nunc. In elementum, leo molestie faucibus vestibulum, dolor lectus pellentesque mauris, ut aliquam dolor est eu lacus. Maecenas mattis, ligula eget consectetur sagittis, velit purus condimentum turpis, a varius turpis libero ut quam. Pellentesque consequat arcu nulla, in imperdiet lacus blandit commodo.\n</p>\n<blockquote>\n\t<b>Praesent molestie mi lorem, in imperdiet ante vestibulum et. Cras posuere, orci ut lobortis dapibus, libero metus commodo nibh, ac egestas nulla justo non leo. Donec eu suscipit nulla, sed ultrices enim. Integer tristique arcu nisi, non pretium metus suscipit in. Nulla volutpat dapibus euismod. In arcu turpis, porttitor nec tempor sit amet, accumsan in neque. Nulla condimentum quis velit vel egestas.</b>\n</blockquote>\n<p>\n\t\tPraesent rhoncus metus vitae cursus aliquam. Quisque nec massa tristique sapien facilisis porta vestibulum non dolor. Duis vehicula lectus ex, viverra ultricies nisi sagittis eget. Nulla facilisi. Donec blandit elementum sem, ut placerat ipsum tempor vitae. Pellentesque a rhoncus ante. Etiam vel nunc eget mi faucibus placerat nec et eros. Praesent mi turpis, sollicitudin ac erat et, suscipit viverra mi. In hendrerit turpis eu posuere auctor. Maecenas iaculis facilisis nisl quis condimentum. Cras commodo magna in vulputate accumsan. Sed eget risus sapien. \n\tnot yet available!Nullam sed ante sollicitudin, egestas arcu et, porttitor lorem. Vivamus a tempus magna, sit amet condimentum nisi. Fusce ac dictum erat.\n</p>\n<p>\n\tNullam purus libero, elementum scelerisque est nec, vestibulum congue purus. Mauris quis tortor in neque scelerisque facilisis vitae at dui. Morbi mi justo, pellentesque sed hendrerit nec, porttitor in mi. Vestibulum vehicula dolor ut est commodo eleifend. Vivamus suscipit, mi quis consequat placerat, felis lectus accumsan augue, et faucibus augue massa eu mi. Nullam faucibus maximus placerat. Cras et lectus urna. In posuere ultricies orci, in hendrerit tellus elementum id.\n</p>\n<table>\n<tbody>\n<tr>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n</tr>\n<tr>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n\t<td>\n\t\tLorem ipsum\n\t</td>\n</tr>\n</tbody>\n</table>\n<p>\n\tInteger tempus libero et urna interdum, non porta velit euismod. Praesent eu imperdiet nibh, ut rutrum justo. Quisque quis ante elit. Ut posuere finibus magna, id dignissim purus euismod vitae. Suspendisse id libero mi. Cras nunc justo, pellentesque id fermentum eget, gravida ut nisl. Nam magna elit, auctor vel lorem quis, malesuada porta eros. Nulla facilisi. Proin ac tempus metus.\n</p>\n<p>\n\t<img src=\"/storage/attachments/1055-getlorem-library-to-generate-lorem-ipsum-text.png\">\n</p>",
         "author":{
            "id":443,
            "username":"julz_qa",
            "realname":"Yulia ",
            "reputation":92
         },
         "lastEditedAction":20541,
         "activeRevisionId":6791,
         "revisionIds":[
            6791,
            6790,
            6789,
            6788,
            6786,
            6785,
            6784,
            6782,
            6781,
            6680,
            6651,
            6602
         ],
         "lastActiveUserId":571,
         "lastActiveDate":1538134521000,
         "originalParentId":5070,
         "attachments":[
            {
               "id":1055,
               "fileName":"getlorem-library-to-generate-lorem-ipsum-text.png",
               "size":13298,
               "sizeFormatted":"13.3 kB",
               "url":"/storage/attachments/1055-getlorem-library-to-generate-lorem-ipsum-text.png",
               "image":true
            }
         ],
         "childrenIds":[
            5072,
            5073,
            5074,
            5077,
            5080,
            5177,
            5211
         ],
         "commentIds":[
            5072,
            5073,
            5074,
            5177,
            5211
         ],
         "marked":false,
         "topics":[
            {
               "id":2351,
               "creationDate":1459949562000,
               "creationDateFormatted":"04/06/2016 01:32 PM",
               "name":"article",
               "author":{
                  "id":412,
                  "username":"testandtest888",
                  "reputation":79
               },
               "usedCount":13
            },
            {
               "id":904,
               "creationDate":1428940537000,
               "creationDateFormatted":"04/13/2015 03:55 PM",
               "name":"lorem ipsum",
               "author":{
                  "id":7,
                  "username":"dzone",
                  "realname":"",
                  "reputation":185
               },
               "usedCount":6
            }
         ],
         "primaryContainerId":49,
         "containerIds":[
            49,
            7
         ],
         "slug":"lorem-ipsum-2",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":78,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[
            "site_sticky"
         ]
      },
      {
         "id":3330,
         "type":"kbentry",
         "creationDate":1502105469000,
         "creationDateFormatted":"08/07/2017 11:31 AM",
         "title":"test article august",
         "body":"<p>test test test.</p>",
         "bodyAsHTML":"<p>test test test.</p>",
         "author":{
            "id":153,
            "username":"testlab",
            "realname":"testlab",
            "reputation":469
         },
         "lastEditedAction":12369,
         "activeRevisionId":4446,
         "revisionIds":[
            4446,
            4421
         ],
         "lastActiveUserId":2,
         "lastActiveDate":1523531156000,
         "originalParentId":3309,
         "attachments":[

         ],
         "childrenIds":[
            3331,
            3382,
            3383,
            3384,
            3411,
            3418,
            3419,
            3420,
            3421,
            3423,
            3426,
            3431,
            3432,
            3435,
            3436,
            3437,
            3438,
            4638
         ],
         "commentIds":[
            3331,
            3382,
            3383,
            3384,
            3411,
            3418,
            3419,
            3420,
            3421,
            3423,
            3426,
            3431,
            3432,
            3435,
            3437,
            3438,
            4638
         ],
         "marked":false,
         "topics":[
            {
               "id":3329,
               "creationDate":1502105469000,
               "creationDateFormatted":"08/07/2017 11:31 AM",
               "name":"test article distinguishing",
               "author":{
                  "id":153,
                  "username":"testlab",
                  "realname":"testlab",
                  "reputation":469
               },
               "usedCount":1
            },
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            }
         ],
         "primaryContainerId":194,
         "containerIds":[
            194,
            7
         ],
         "slug":"test-article-august",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":46,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ]
      },
      {
         "id":3703,
         "type":"kbentry",
         "creationDate":1507552609000,
         "creationDateFormatted":"10/09/2017 12:36 PM",
         "title":"New Child TEst Article loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong",
         "body":"<p>New Child TEst Article</p>",
         "bodyAsHTML":"<p>New Child TEst Article</p>",
         "author":{
            "id":153,
            "username":"testlab",
            "realname":"testlab",
            "reputation":469
         },
         "lastEditedAction":14028,
         "activeRevisionId":5072,
         "revisionIds":[
            5072,
            5071,
            4880,
            4879
         ],
         "lastActiveUserId":153,
         "lastActiveDate":1510855806000,
         "originalParentId":3701,
         "attachments":[

         ],
         "childrenIds":[
            3739,
            3887
         ],
         "commentIds":[
            3739,
            3887
         ],
         "marked":false,
         "topics":[
            {
               "id":3702,
               "creationDate":1507552609000,
               "creationDateFormatted":"10/09/2017 12:36 PM",
               "name":"new parent test article145",
               "author":{
                  "id":153,
                  "username":"testlab",
                  "realname":"testlab",
                  "reputation":469
               },
               "usedCount":1
            },
            {
               "id":3308,
               "creationDate":1501838127000,
               "creationDateFormatted":"08/04/2017 09:15 AM",
               "name":"new test parent article",
               "author":{
                  "id":153,
                  "username":"testlab",
                  "realname":"testlab",
                  "reputation":469
               },
               "usedCount":2
            }
         ],
         "primaryContainerId":46,
         "containerIds":[
            46,
            7
         ],
         "slug":"new-chicld-test-article",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":42,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[
            "sticky"
         ]
      },
      {
         "id":4788,
         "type":"kbentry",
         "creationDate":1523640275000,
         "creationDateFormatted":"04/13/2018 05:24 PM",
         "title":"I am creating an article here",
         "body":"<p>This is the content of the article</p><p>I will not mention the user.</p>",
         "bodyAsHTML":"<p>This is the content of the article</p>\n<p>I will not mention the user.</p>",
         "author":{
            "id":2,
            "username":"$$ANON_USER$$",
            "reputation":35
         },
         "lastEditedAction":18593,
         "activeRevisionId":6236,
         "revisionIds":[
            6236
         ],
         "lastActiveUserId":443,
         "lastActiveDate":1537866303000,
         "originalParentId":4788,
         "attachments":[

         ],
         "childrenIds":[
            4789,
            4790,
            4791,
            4792,
            4793,
            4794,
            4795,
            4796,
            4797,
            4798,
            4799,
            4800,
            4803,
            5083
         ],
         "commentIds":[
            4789,
            4790,
            4791,
            4792,
            4793,
            4794,
            4795,
            4796,
            4797,
            4798,
            4799,
            4800,
            4803,
            5083
         ],
         "marked":false,
         "topics":[
            {
               "id":2351,
               "creationDate":1459949562000,
               "creationDateFormatted":"04/06/2016 01:32 PM",
               "name":"article",
               "author":{
                  "id":412,
                  "username":"testandtest888",
                  "reputation":79
               },
               "usedCount":13
            }
         ],
         "primaryContainerId":8,
         "containerIds":[
            8,
            7
         ],
         "slug":"i-am-creating-an-article-here",
         "wiki":false,
         "score":1,
         "depth":0,
         "viewCount":37,
         "upVoteCount":1,
         "downVoteCount":0,
         "nodeStates":[
            "sticky"
         ]
      },
      {
         "id":3068,
         "type":"kbentry",
         "creationDate":1495527649000,
         "creationDateFormatted":"05/23/2017 08:20 AM",
         "title":"Article 826",
         "body":"<p>Article 826 .</p>\n",
         "bodyAsHTML":"<p>Article 826 .</p>\n",
         "author":{
            "id":466,
            "username":"123123",
            "realname":"123123",
            "reputation":129
         },
         "lastEditedAction":11495,
         "activeRevisionId":4142,
         "revisionIds":[
            4142,
            4099,
            4087,
            4084
         ],
         "lastActiveUserId":2,
         "lastActiveDate":1523531023000,
         "originalParentId":3068,
         "attachments":[

         ],
         "childrenIds":[
            3069,
            3070,
            3090
         ],
         "commentIds":[
            3069,
            3070
         ],
         "marked":false,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            },
            {
               "id":2013,
               "creationDate":1444987997000,
               "creationDateFormatted":"10/16/2015 09:33 AM",
               "name":"new article",
               "author":{
                  "id":364,
                  "username":"nescafe",
                  "reputation":67
               },
               "usedCount":10
            }
         ],
         "primaryContainerId":194,
         "containerIds":[
            194,
            7
         ],
         "slug":"article-826",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":34,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ]
      },
      {
         "id":2621,
         "type":"kbentry",
         "creationDate":1493031222000,
         "creationDateFormatted":"04/24/2017 10:53 AM",
         "title":"Test PARENT article REV 4",
         "body":"<p>Test PARENT article REV 4</p><p><img src=\"/storage/attachments/462-3.png\"></p><p>some text under the photo </p><p>and one more photo is here:</p><p><img src=\"/storage/attachments/463-cup.png\"></p><p>after editing please check the PDF format</p>",
         "bodyAsHTML":"<p>Test PARENT article REV 4</p><p><img src=\"/storage/attachments/462-3.png\"></p><p>some text under the photo </p><p>and one more photo is here:</p><p><img src=\"/storage/attachments/463-cup.png\"></p><p>after editing please check the PDF format</p>",
         "author":{
            "id":462,
            "username":"test.dzone2",
            "realname":"",
            "reputation":75
         },
         "lastEditedAction":9557,
         "activeRevisionId":3560,
         "revisionIds":[
            3560,
            3546,
            3544,
            3543,
            3542,
            3541,
            3540,
            3536
         ],
         "lastActiveUserId":443,
         "lastActiveDate":1493036154000,
         "originalParentId":2621,
         "attachments":[
            {
               "id":462,
               "fileName":"3.png",
               "size":3670,
               "sizeFormatted":"3.7 kB",
               "url":"/storage/attachments/462-3.png",
               "image":true
            },
            {
               "id":463,
               "fileName":"cup.png",
               "size":7793,
               "sizeFormatted":"7.8 kB",
               "url":"/storage/attachments/463-cup.png",
               "image":true
            }
         ],
         "childrenIds":[
            2084,
            2352,
            2624,
            2625,
            2626,
            2627,
            2628,
            2629,
            2630,
            2631,
            2632,
            2633,
            2636,
            4576
         ],
         "commentIds":[
            2624,
            2625,
            2626,
            2627,
            2628,
            2629,
            2630,
            2631,
            2632,
            2633,
            2636
         ],
         "marked":false,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            },
            {
               "id":2613,
               "creationDate":1493023331000,
               "creationDateFormatted":"04/24/2017 08:42 AM",
               "name":"4",
               "author":{
                  "id":461,
                  "username":"test.dzone1",
                  "realname":"",
                  "reputation":43
               },
               "usedCount":2
            }
         ],
         "primaryContainerId":194,
         "containerIds":[
            194,
            7
         ],
         "slug":"test-parent-article",
         "wiki":false,
         "score":2,
         "depth":0,
         "viewCount":34,
         "upVoteCount":2,
         "downVoteCount":0,
         "nodeStates":[
            "sticky"
         ]
      },
      {
         "id":3761,
         "type":"kbentry",
         "creationDate":1508338235000,
         "creationDateFormatted":"10/18/2017 02:50 PM",
         "title":"Publish child article in another space1",
         "body":"<ul><li>Publish child article in another space - edited</li></ul>",
         "bodyAsHTML":"<ul><li>Publish child article in another space - edited</li></ul>",
         "author":{
            "id":443,
            "username":"julz_qa",
            "realname":"Yulia ",
            "reputation":92
         },
         "lastEditedAction":14000,
         "activeRevisionId":5050,
         "revisionIds":[
            5050,
            5049,
            4951
         ],
         "lastActiveUserId":443,
         "lastActiveDate":1510588405000,
         "originalParentId":3760,
         "attachments":[

         ],
         "childrenIds":[
            3820,
            3821
         ],
         "commentIds":[
            3820,
            3821
         ],
         "marked":false,
         "topics":[
            {
               "id":280,
               "creationDate":1381311162000,
               "creationDateFormatted":"10/09/2013 09:32 AM",
               "name":"1",
               "author":{
                  "id":2,
                  "username":"$$ANON_USER$$",
                  "reputation":35
               },
               "usedCount":15
            },
            {
               "id":280,
               "creationDate":1381311162000,
               "creationDateFormatted":"10/09/2013 09:32 AM",
               "name":"1",
               "author":{
                  "id":2,
                  "username":"$$ANON_USER$$",
                  "reputation":35
               },
               "usedCount":15
            },
            {
               "id":3836,
               "creationDate":1510588372000,
               "creationDateFormatted":"11/13/2017 03:52 PM",
               "name":"child article for test",
               "author":{
                  "id":443,
                  "username":"julz_qa",
                  "realname":"Yulia ",
                  "reputation":92
               },
               "usedCount":1
            }
         ],
         "primaryContainerId":242,
         "containerIds":[
            242,
            7
         ],
         "slug":"publish-child-article-in-another-space",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":33,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[
            "sticky"
         ]
      },
      {
         "id":4272,
         "type":"kbentry",
         "creationDate":1521145199000,
         "creationDateFormatted":"03/15/2018 08:19 PM",
         "title":"Personal info article - ​My name is @Siteadmin (aka @siteadmin). I'm 23 years old and live with my mammy, Nanna Siteadmin here is Morrisville, NC at 150 Preston Executive Drive Cary, NC 27513. phone number is +1 (919) 678-0300",
         "body":"<p>Article - My name is @Siteadmin (aka <em name=\"deleted_695\">anonymous user</em>). I'm 23 years old and live with my mammy, Nanna Siteadmin here is Morrisville, NC at 150 Preston Executive Drive Cary, NC 27513. My email is support<em name=\"deleted_695\">anonymous user</em>.com and my phone number is +1 (919) 678-0300</p>\n<p> <a href=\"/storage/attachments/844-running.txt\">running.txt</a></p>\n<p>https://www.youtube.com/watch?v=Ec0w6Ssd5QY</p>\n<p>&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/BBz1JnfuuRE&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen&gt;&lt;/iframe&gt;</p>",
         "bodyAsHTML":"<p>Article - My name is @Siteadmin (aka <em>anonymous user</em>). I'm 23 years old and live with my mammy, Nanna Siteadmin here is Morrisville, NC at 150 Preston Executive Drive Cary, NC 27513. My email is support<em>anonymous user</em>.com and my phone number is +1 (919) 678-0300</p> \n<p> <a href=\"/storage/attachments/844-running.txt\">running.txt</a></p> \n<p><a target=\"_blank\">https://www.youtube.com/watch?v=Ec0w6Ssd5QY</a></p> \n<p><iframe width=\"560\" height=\"315\" src=\"&lt;a href=\">https://www.youtube.com/embed/BBz1JnfuuRE&amp;lt;/a&amp;gt;&amp;quot; frameborder=&amp;quot;0&amp;quot; allow=&amp;quot;autoplay; encrypted-media&amp;quot; allowfullscreen&amp;gt;</iframe></p>",
         "author":{
            "id":2,
            "username":"$$ANON_USER$$",
            "reputation":35
         },
         "lastEditedAction":16252,
         "activeRevisionId":5609,
         "revisionIds":[
            5609,
            5608,
            5607,
            5606,
            5605,
            5602,
            5601
         ],
         "lastActiveUserId":694,
         "lastActiveDate":1521177628000,
         "originalParentId":4272,
         "attachments":[

         ],
         "childrenIds":[
            4273,
            4275,
            4276,
            4277,
            4279
         ],
         "commentIds":[
            4273,
            4275,
            4276,
            4277,
            4279
         ],
         "marked":false,
         "topics":[
            {
               "id":4265,
               "creationDate":1521144656000,
               "creationDateFormatted":"03/15/2018 08:10 PM",
               "name":"social",
               "author":{
                  "id":2,
                  "username":"$$ANON_USER$$",
                  "reputation":35
               },
               "usedCount":3
            },
            {
               "id":2216,
               "creationDate":1447855553000,
               "creationDateFormatted":"11/18/2015 02:05 PM",
               "name":"flower",
               "author":{
                  "id":153,
                  "username":"testlab",
                  "realname":"testlab",
                  "reputation":469
               },
               "usedCount":2
            },
            {
               "id":2039,
               "creationDate":1445009232000,
               "creationDateFormatted":"10/16/2015 03:27 PM",
               "name":"whocares",
               "author":{
                  "id":2,
                  "username":"$$ANON_USER$$",
                  "reputation":35
               },
               "usedCount":6
            }
         ],
         "primaryContainerId":194,
         "containerIds":[
            194,
            7
         ],
         "slug":"personal-info-article-my-name-is",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":32,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ]
      },
      {
         "id":2558,
         "type":"kbentry",
         "creationDate":1471990741000,
         "creationDateFormatted":"08/23/2016 10:19 PM",
         "title":"Will this activity show on my profile EDIT",
         "body":"<p>Will this activity show on my profile or will it show thub.blahl.blahl</p><p>revision 1</p><p>revision 4 removed revision 2</p><p>ljas;jhadjfhaldjgh revision 3</p><p>EDIT</p>",
         "bodyAsHTML":"<p>Will this activity show on my profile or will it show thub.blahl.blahl</p><p>revision 1</p><p>revision 4 removed revision 2</p><p>ljas;jhadjfhaldjgh revision 3</p><p>EDIT</p>",
         "author":{
            "id":21,
            "username":"laura",
            "realname":"",
            "reputation":208
         },
         "lastEditedAction":9503,
         "activeRevisionId":3534,
         "revisionIds":[
            3534,
            3533,
            3432,
            3431,
            3430,
            3429,
            3428
         ],
         "lastActiveUserId":462,
         "lastActiveDate":1493030355000,
         "originalParentId":2040,
         "attachments":[

         ],
         "childrenIds":[
            2563,
            2585
         ],
         "commentIds":[
            2563,
            2585
         ],
         "marked":false,
         "topics":[
            {
               "id":247,
               "creationDate":1381248990000,
               "creationDateFormatted":"10/08/2013 04:16 PM",
               "name":"test ",
               "author":{
                  "id":21,
                  "username":"laura",
                  "realname":"",
                  "reputation":208
               },
               "usedCount":401
            },
            {
               "id":1867,
               "creationDate":1444914930000,
               "creationDateFormatted":"10/15/2015 01:15 PM",
               "name":"edited",
               "author":{
                  "id":364,
                  "username":"nescafe",
                  "reputation":67
               },
               "usedCount":14
            }
         ],
         "primaryContainerId":45,
         "containerIds":[
            45,
            7
         ],
         "slug":"will-this-activity-show-on-my-profile",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":32,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ]
      },
      {
         "id":1972,
         "type":"kbentry",
         "creationDate":1444920795000,
         "creationDateFormatted":"10/15/2015 02:53 PM",
         "title":"New middle article",
         "body":"New middle article\n",
         "bodyAsHTML":"New middle article\n",
         "author":{
            "id":364,
            "username":"nescafe",
            "reputation":67
         },
         "lastEditedAction":7147,
         "activeRevisionId":2610,
         "revisionIds":[
            2610
         ],
         "lastActiveUserId":365,
         "lastActiveDate":1493662716000,
         "originalParentId":1971,
         "attachments":[

         ],
         "childrenIds":[
            1975,
            1976,
            2375,
            2758,
            2778
         ],
         "commentIds":[
            2758,
            2778
         ],
         "marked":false,
         "topics":[
            {
               "id":1971,
               "creationDate":1444920769000,
               "creationDateFormatted":"10/15/2015 02:52 PM",
               "name":"New parent space",
               "author":{
                  "id":364,
                  "username":"nescafe",
                  "reputation":67
               },
               "usedCount":3
            },
            {
               "id":545,
               "creationDate":1384289665000,
               "creationDateFormatted":"11/12/2013 08:54 PM",
               "name":"space",
               "author":{
                  "id":2,
                  "username":"$$ANON_USER$$",
                  "reputation":35
               },
               "usedCount":8
            }
         ],
         "primaryContainerId":45,
         "containerIds":[
            45,
            7
         ],
         "slug":"new-middle-article",
         "wiki":false,
         "score":0,
         "depth":0,
         "viewCount":31,
         "upVoteCount":0,
         "downVoteCount":0,
         "nodeStates":[

         ]
      }
   ]
}
Suggest Edits

Search for Content Using a Query and Wildcard

You can use this request to search for content on AnswerHub using a query and wildcard.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/node.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/node.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/node.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

q
string

required

 

/services/v2/node.json?q=[Search%Term]

The following parameters can be used in your search for content using a query and wildcard request:

Other options: wrap, v1

Permissions & Notes:

  • You must have the View users permission.
  • In order to make the Search API request you must use the query parameter (q=) and the search term as well as include the wildcard (*).
    • The wildcard (*) returns the sent query request with any terms found beyond those entered.
    • For example: a query request for q=bal will only return results that match the term "bal" exactly. A request for q=bal*, on the other hand, will include any node that includes "bal" in any portion of their searchable information (balance, balloon, ballad, etc).
  • This request was added in version 1.6.3.

Sample Request

A GET search for content query request for bal, with the wildcard (*), 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/node.json?q=bal*" -v

Use of pageSize

Note that the parameter pageSize = 1 was used to decrease the length of the JSON Response shown below. Without this parameter the response will display a full page worth of response. To change pages simply add the page=[pageNumber] parameter in your query.

Sample Response

{
  "name": "",
  "sort": "relevance",
  "page": 1,
  "pageSize": 1,
  "pageCount": 137,
  "listCount": 1,
  "totalCount": 137,
  "sorts": [
    "active",
    "newest",
    "hottest",
    "votes",
    "viewCount",
    "usedCount",
    "answerCount",
    "answerCountAsc",
    "commentCount",
    "favoriteCount",
    "followers",
    "reportCount"
  ],
  "list": [
    {
      "id": 4101,
      "type": "question",
      "creationDate": 1470325805000,
      "creationDateFormatted": "08/04/2016 03:50 PM",
      "title": "question 5",
      "body": "question 5 question 5 question 5 \n![alt text][1]\n\n\n  [1]: /storage/temp/991-0-r29.jpg\n",
      "bodyAsHTML": "<p>question 5 question 5 question 5 <br><img src=\"/storage/temp/991-0-r29.jpg\" alt=\"alt text\"></p> \n<br>\n<br>",
      "author": {
        "id": 2501,
        "username": "testUser",
        "reputation": 1
      },
      "lastEditedAction": 22380,
      "activeRevisionId": 5452,
      "revisionIds": [
        5452
      ],
      "lastActiveUserId": 12,
      "lastActiveDate": 1470666039000,
      "attachments": [
        {
          "id": 991,
          "fileName": "0-r29.jpg",
          "size": 118467,
          "sizeFormatted": "118.5 kB",
          "url": "/storage/attachments/991-0-r29.jpg",
          "image": true
        }
      ],
      "childrenIds": [
        4114
      ],
      "commentIds": [],
      "marked": false,
      "topics": [
        {
          "id": 2820,
          "creationDate": 1457095017000,
          "creationDateFormatted": "03/04/2016 12:36 PM",
          "name": "testing question",
          "author": {
            "id": 2361,
            "username": "testUser",
            "reputation": 84
          },
          "usedCount": 17
        }
      ],
      "primaryContainerId": 8,
      "containerIds": [
        7,
        8
      ],
      "slug": "question-5",
      "wiki": false,
      "score": 0,
      "depth": 0,
      "viewCount": 5,
      "upVoteCount": 0,
      "downVoteCount": 0,
      "nodeStates": [],
      "answers": [
        4114
      ],
      "answerCount": 1
    }
  ]
}
{"name":"","sort":"relevance","page":1,"pageSize":1,"pageCount":137,"listCount":1,"totalCount":137,"sorts":["active","newest","hottest","votes","viewCount","usedCount","answerCount","answerCountAsc","commentCount","favoriteCount","followers","reportCount"],"list":[{"id":4101,"type":"question","creationDate":1470325805000,"creationDateFormatted":"08/04/2016 03:50 PM","title":"question 5","body":"question 5 question 5 question 5 \n![alt text][1]\n\n\n  [1]: /storage/temp/991-0-r29.jpg\n","bodyAsHTML":"<p>question 5 question 5 question 5 <br><img src=\"/storage/temp/991-0-r29.jpg\" alt=\"alt text\"></p> \n<br>\n<br>","author":{"id":2501,"username":"testUser","reputation":1},"lastEditedAction":22380,"activeRevisionId":5452,"revisionIds":[5452],"lastActiveUserId":12,"lastActiveDate":1470666039000,"attachments":[{"id":991,"fileName":"0-r29.jpg","size":118467,"sizeFormatted":"118.5 kB","url":"/storage/attachments/991-0-r29.jpg","image":true}],"childrenIds":[4114],"commentIds":[],"marked":false,"topics":[{"id":2820,"creationDate":1457095017000,"creationDateFormatted":"03/04/2016 12:36 PM","name":"testing question","author":{"id":2361,"username":"testUser","reputation":84},"usedCount":17}],"primaryContainerId":8,"containerIds":[7,8],"slug":"question-5","wiki":false,"score":0,"depth":0,"viewCount":5,"upVoteCount":0,"downVoteCount":0,"nodeStates":[],"answers":[4114],"answerCount":1}]}
Suggest Edits

Post a Comment to a Node

You can use this request to post a new comment to a node.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json
curl --request POST \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/node_id/comment.json"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

/services/v2/node/[nodeId]/comment.json

The following parameters can be used in your post a comment request:

other options: wrap, v1

Permissions & Notes:

  • You must have the Publish comment permission to post a comment to any node.
    • You must also have the Publish [node type] permission relevant to the node type you are attempting to comment on.
  • The location response header will contain the URL for the newly created comment.
  • The data describing the question to be posted can be specified both in the body of the request, or as request parameter with the same names as the fields in the body.
    • When data is sent in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If data values for the same field are specified both on the request body and as request or query parameters, the value of the parameters takes precedence over the value in the body.
  • This request was added in version 1.6.3.

Sample Request

A POST post a comment request for a comment ("Node comment text goes here.") sent to a node (nodeId: 16) on 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 POST 
-d '{"body":"Node comment text goes here."}' "https://apidocs.cloud.answerhub.com/services/v2/node/16/comment.json" -v
Suggest Edits

Retrieve a Node Revisions List

You can use this API request to retrieve a paged list of revisions made to a node.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/revision.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/16/revision.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/16/revision.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/16/revision.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/node/16/revision.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/16/revision.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required

required

 

/services/v2/node/[nodeId]/revision.json

The following parameters can be used in your retrieve a node revisions list request:

Paging and Sorting: page, pageSize, sort
Projection: include, exclude, includeOnly
Other options: wrap, v1

Permissions & Notes:

  • You must have the View revisions permission to view other users revisions
    • If the node revisions list you are trying to retrieve is your own, you must have the View own revisions permission.
  • With the includeOnly parameter set to id and name (/services/v2/node.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve a node revisions list request for the revisions made to a node (nodeId: 16) 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/node/16/revision.json"

Sample Response

{
  "name": "",
  "sort": "active",
  "page": 1,
  "pageSize": 15,
  "pageCount": 1,
  "listCount": 1,
  "totalCount": 1,
  "list": [
    {
      "id": 5872,
      "revision": 1,
      "node": {
        "id": 4472
      },
      "title": "Test Question",
      "body": "This question is for Testing purposes\n",
      "bodyAsHTML": "<p>This question is for Testing purposes<br></p>\n",
      "author": {
        "id": 2531,
        "username": "testUser",
        "reputation": 150
      },
      "summary": "Initial Revision",
      "revisionDate": 1472839006000,
      "revisionDateFormatted": "9/2/16 5:56 PM",
      "topics": "Test",
      "spaceId": 8,
      "wiki": false
    }
  ]
}
{"name":"","sort":"active","page":1,"pageSize":15,"pageCount":1,"listCount":1,"totalCount":1,"list":[{"id":5872,"revision":1,"node":{"id":4472},"title":"Test Question","body":"This question is for Testing purposes\n","bodyAsHTML":"<p>This question is for Testing purposes<br></p>\n","author":{"id":2531,"username":"testUser","reputation":150},"summary":"Initial Revision","revisionDate":1472839006000,"revisionDateFormatted":"9/2/16 5:56 PM","topics":"Test","spaceId":8,"wiki":false}]}
Suggest Edits

Retrieve a Node Followers List

You can use this API request to retrieve a paged list of FollowRelation (users) that are following a Node.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/followers.json
curl --request GET \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/16/followers.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/16/followers.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/16/followers.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://apidocs.cloud.answerhub.com/services/v2/node/16/followers.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/16/followers.json"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required

required

 

/services/v2/node/[nodeId]/followers.json

The following parameters can be used in your retrieve node followers list request:

Paging and Sorting: page, pageSize, sort
Projection: include, exclude, includeOnly
Other options: wrap, v1

Permissions & Notes:

  • You must have the View users permission.
  • When the details parameter is set as false (the default setting), only the follower information is retrieved; no other relation information is returned.
  • When the details parameter is set as true, a list of "FollowRelation* is returned. Each FollowRelation entry models a social relation between a following user and the followed node.
  • When the active parameter is set as true (the default setting), only active relations are retrieved.
  • When the active parameter is set as false, all relations are retrieved (including those that are inactive).
  • With the includeOnly parameter set to id and name (/services/v2/node.json?includeOnly=id,name) to the AnswerHub REST API.
  • This request was added in version 1.6.3.

Sample Request

A GET retrieve node followers list request for a node (nodeId: 16) 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/node/16/followers.json"

Sample Response

{
  "name": "",
  "sort": "",
  "page": 0,
  "pageSize": 6,
  "pageCount": 1,
  "listCount": 2,
  "totalCount": 2,
  "list": [
    {
      "id": 2531,
      "type": "user",
      "creationDate": 1465833814000,
      "creationDateFormatted": "06/13/2016 04:03 PM",
      "modificationDate": 1472838983000,
      "username": "testUser",
      "slug": "testUser",
      "gold": 0,
      "silver": 5,
      "bronze": 8,
      "reputation": 150,
      "moderator": false,
      "superuser": true,
      "emailHash": "",
      "avatar": "avatarURL",
      "postCount": 86,
      "followerCount": 0,
      "followCount": 1,
      "userFollowCount": 1,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "6",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471355247000,
          "name": "Network Administrators"
        },
        {
          "id": "3",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471615337000,
          "name": "Users"
        },
        {
          "id": "4",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1470919052000,
          "name": "Moderators"
        },
        {
          "id": "5",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1472671521000,
          "name": "Super Users"
        }
      ]
    },
    {
      "id": 2601,
      "type": "user",
      "creationDate": 1470750772000,
      "creationDateFormatted": "08/09/2016 01:52 PM",
      "modificationDate": 1472839006000,
      "username": "testUSer2",
      "realname": "Real_Name",
      "slug": "testUserw",
      "gold": 0,
      "silver": 0,
      "bronze": 5,
      "reputation": 72,
      "moderator": false,
      "superuser": true,
      "emailHash": "",
      "avatar": "avatarURL",
      "company": "COMPANY",
      "website": "websiteURL",
      "location": "Location",
      "postCount": 34,
      "followerCount": 0,
      "followCount": 2,
      "userFollowCount": 2,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "3",
          "creationDate": 1433384476000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1471615337000,
          "name": "Users"
        },
        {
          "id": "5",
          "creationDate": 1433384477000,
          "creationDateFormatted": "06/04/2015 02:21 AM",
          "modificationDate": 1472671521000,
          "name": "Super Users"
        }
      ]
    }
  ]
}
{"name":"","sort":"","page":0,"pageSize":6,"pageCount":1,"listCount":2,"totalCount":2,"list":[{"id":2531,"type":"user","creationDate":1465833814000,"creationDateFormatted":"06/13/2016 04:03 PM","modificationDate":1472838983000,"username":"testUser","slug":"testUser","gold":0,"silver":5,"bronze":8,"reputation":150,"moderator":false,"superuser":true,"emailHash":"","avatar":"avatarURL","postCount":86,"followerCount":0,"followCount":1,"userFollowCount":1,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"6","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471355247000,"name":"Network Administrators"},{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Users"},{"id":"4","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1470919052000,"name":"Moderators"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Super Users"}]},{"id":2601,"type":"user","creationDate":1470750772000,"creationDateFormatted":"08/09/2016 01:52 PM","modificationDate":1472839006000,"username":"testUser2","realname":"Real_Name","slug":"testUser2","gold":0,"silver":0,"bronze":5,"reputation":72,"moderator":false,"superuser":true,"emailHash":"","avatar":"avatarURL","company":"COMPANY","website":"siteURL","location":"Location","postCount":34,"followerCount":0,"followCount":2,"userFollowCount":2,"active":true,"suspended":false,"deactivated":false,"groups":[{"id":"3","creationDate":1433384476000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1471615337000,"name":"Users"},{"id":"5","creationDate":1433384477000,"creationDateFormatted":"06/04/2015 02:21 AM","modificationDate":1472671521000,"name":"Super Users"}]}]}
Suggest Edits

Make a User a Node Follower

You can use this API request to make a user start following a specific node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/follow.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/node_id%7D/follow.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/node_id%7D/follow.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/node_id%7D/follow.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/node_id%7D/follow.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/node_id%7D/follow.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required

Query Params

follower
int32
 

/services/v2/node/[nodeId]/follow.json

The following parameters can be used in your make user a node follower request:

Specific: follower
Other options: wrap

Permissions & Notes:

  • You must have the Follow questions, users, topics, and categories permission.
  • In order to use the optional follower parameter, you must have the Edit users and groups permission.
    • The follower parameter specifies the user that will become a follower of the node.
    • If used, the follower parameter, will be the user's userId.
  • If the follower parameter is not used, the user whose credentials are included in the request is made the node follower.
  • This request was added in version 1.6.3.

Sample Request

A PUT make user a node follower request to make the API authenticated user (userId: 7) a follower of a node (nodeId: 520) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/520/follow.json?follower=7" -v
Suggest Edits

Make a User Unfollow a Node

You can use this API request to make a user stop following a specific node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/unfollow.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required

Query Params

follower
int32
 

/services/v2/node/[nodeId]/unfollow.json

The following parameters can be used in your make a user unfollow a node request:

Specific: follower
Other options: wrap

Permissions & Notes:

  • You must have the Follow questions, users, topics, and categories permission.
  • In order to use the optional follower parameter, you must have the Edit users and groups permission.
    • The follower parameter specifies the user that will no longer follow the node.
    • If used, the follower parameter will be the user's userId.
  • If the follower parameter is not used, the user whose credentials are included in the request will unfollow the node.
  • This request was added in version 1.6.3.

Sample Request

A PUT make a user unfollow a node request to make the API authenticated user (userId: 7) unfollow a Node (nodeId: 520) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/520/unfollow.json?follower=7" -v
Suggest Edits

Make a Node a Favorite

You can use this API request to make a node a favorite.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/markFavorite.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/806/markFavorite.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/806/markFavorite.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/806/markFavorite.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/806/markFavorite.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/806/markFavorite.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required
 

/services/v2/node/[nodeId]/markfavorite.json

The following parameters can be used in your make a node a favorite request:

Other options: wrap

Permissions & Notes:

  • You must have the Mark as favorite and View the question page permissions.
  • Favorites are tracked on a per user basis, with each user having a separate set of nodes marked as favorites.
  • The identity of the user making the node a favorite is extracted automatically from the credentials used to authenticate the request.
  • This request was added in version 1.6.3.

Sample Request

A PUT make a node a favorite request to make a node (nodeId: 806) a favorite 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/806/markfavorite.json"
Suggest Edits

Unfavorite a Node

You can use this API request to unfavorite a node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/unmarkfavorite.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required
 

/services/v2/node/[nodeId]/unmarkfavorite.json

The following parameters can be used in your unfavorite a node request:

Other options: wrap

Permissions & Notes:

  • You must have the Mark as favorite and View the question page permissions.
  • Favorites are tracked on a per user basis, with each user having a separate set of nodes marked as favorites.
  • The identity of the user making unfavoriting the node is extracted automatically from the credentials used to authenticate the request.
  • This request was added in version 1.6.3.

Sample Request

A PUT unfavorite a node request to unfavorite a node (nodeId: 806) sent to https://apidocs.cloud.answerhub.comv 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/806/unmarkfavorite.json"
Suggest Edits

Accept a Node

You can use this API request to accept an answer to a question node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/accept.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required
 

/services/v2/node/[nodeId]/accept.json

The following parameters can be used in your accept a node request:

Other options: wrap

Permissions & Notes:

  • You must have the Accept any answer permission to accept any answer.
    • If the answer is your own, you must have the Accept an answer on own questions or the Accept own answer permission.
  • The answer's nodeId can be found in the edit answer URL after /answers/. For example: https://apidocs.cloud.answerhub.com/qa/answers/17/edit.html (The answer's nodeId in this example is 17).
  • This request was added in version 1.6.3.

Sample Request

A PUT accept a node request to accept a node (nodeId: 807) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json"
Suggest Edits

Unaccept a Node

You can use this API request to unaccept an answer to a question node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/node_id/unaccept.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required
 

/services/v2/node/[nodeId]/unaccept.json

The following parameters can be used in your unaccept a node request:

Other options: wrap

Permissions & Notes:

  • You must have the Accept any answer permission to unaccept any node.
    • If the node you are trying to unaccept is your own, you must have the Accept an answer on own questions or the Accept own answer permission.
  • The answer's nodeId can be found in the edit answer URL after /answers/. For example: https://apidocs.cloud.answerhub.com/qa/answers/17/edit.html (The answer's nodeId in this example is 17).
  • This request was added in version 1.6.3.

Sample Request

A PUT accept a node request to unaccept a node (nodeId: 807) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/807/unaccept.json"
Suggest Edits

Report a Node

You can use this API request to report a node that has violated your AnswerHub site's terms of agreement.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/report.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required

Query Params

prompt
string
 

/services/v2/node/[nodeId]/report.json?prompt=[data]

The following parameters can be used in your report a node request:

Specific: prompt
Other options: wrap

Permissions & Notes:

  • You must have the Report permission.
  • The mandatory request parameter prompt is used to specify the reason why the node is being reported.
  • Must be used with data in the url path as: ?prompt=[data].
  • A node that is in the reported state may still have some of its attributes visible on a GUI, such as the author name and post date, but will have the content hidden.
  • A node is usually reported when the meaning taken from its human readable content violates the terms and agreements setup for a TeamHub site.
    • The exact terms and agreements for each TeamHub site are determined by the site administrators or moderators, not by any logic in the server.
    • Users that post a reported node may be asked by a moderator to review and edit the node in order to comply with site policies.
      • A reported node that is reviewed in this way may subsequently have its content re-published.
  • This request was added in version 1.6.3.

Sample Request

A PUT report a node request to report a node (nodeId: 16) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123), for a specific reason ("This violates our terms") would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/node/16/report.json?prompt=This%20violates%20our%20terms." -v
Suggest Edits

Unreport a Node

You can use this API request to cancel a report for a node that has been reported.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/cancelReport.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

node_id
int32
required
 

/services/v2/node/[nodeId]/cancelReport.json

The following parameters can be used in your unreport a node request:

Other options: wrap

Permissions & Notes:

  • You must have the Cancel any user's report on posted content permission.
  • This request was added in version 1.6.3.

Sample Request

A PUT unreport a node request to unreport a node (nodeId: 16) 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 PUT "https://apidocs.cloud.answerhub.com/services/v2/node/16/cancelReport.json" -v
Suggest Edits

Close a Node

You can use this API request to close down a node.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://apidocs.cloud.answerhub.com/services/v2/node/node_id/close.json
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/node/16/close.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/16/close.json' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://apidocs.cloud.answerhub.com/services/v2/node/16/close.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://apidocs.cloud.answerhub.com/services/v2/node/16/close.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/