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

Getting Started

This page will help you get started with AnswerHub APIs.

 

Below is a generic setup example. Scroll down to the next section called "Learn About Our APIs and How to Test Them" to learn about the basics before diving into each specific endpoint.

$http.post('/someUrl', data).success(successCallback);

alert('test');
Suggest Edits

Learn About Our APIs and How to Test Them

Watch Our Video to Learn About AnswerHub REST APIs and How to Test Endpoints Directly in the Browser

If this is your first time seeing our APIs, we recommend going to the following links below to read about how the APIs are structured, allowed HTTP Requests, Authentication and Headers, MIME types, Access Requirements, Example Request Expectations, Input and Output Formats, URL/URI Structure and finally how to TEST Directly in the Browser with the API Explorer!

 

Basic Structure Summary of the Reference Documentation (The Endpoints):

  1. The endpoints are grouped by different categories; i.e. User, Group, Question, Topic, etc.
  2. Directly underneath the category headers is a summary about the specific endpoints that may apply to each of the specific endpoints; i.e. User-related REST APIs, Group-related REST APIs, etc.
  3. Each endpoint has what is called an API Explorer to test the endpoint directly in the browser; not every endpoint is testable due to specific permissions required for the test username/password, answerhub/test123. Basically, if the permission is an administrative or moderator specific permission (most of which are for POST, PUT and DELETE requests), then you cannot test it directly in the browser. However, you will still have access to the sample requests, responses, and login capability to see the actual result in the community user interface using the test username/password (answerhub/test123).
  4. Each endpoint lists required permissions, the location of them by role category (Anonymous Roles, Site Administration Roles, Custom Roles, etc.), and any important notes inside of the orange, blue and/or red text boxes.

Recommended Links for More Detailed Information About AnswerHub REST API Endpoints
Test Endpoints Directly in the Browser
Allowed HTTP Requests
Authentication And Headers
MIME Types
Access Requirements
Example Requests
Input and Output Formats
URL/URI Structure

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

Permissions & Notes:

  • You must have the Create users permission under Site Administration Roles in the Advanced Editor.

  • 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

Expected Response

Successful Response:

  • HTTP Status 201 - Created

Community User Interface Result

Jon S Profile Created
Note: Some information was added to the profile from the PUT "Update a User" request.

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

Permissions & Notes:

  • You must have the View user's profile permission under Anonymous Roles in the Advanced Editor.
  • 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": 7,
    "type": "user",
    "creationDate": 1542778947000,
    "creationDateFormatted": "11/21/2018 05:42 AM",
    "modificationDate": 1548971891000,
    "username": "dzone",
    "slug": "dzone",
    "gold": 0,
    "silver": 0,
    "bronze": 2,
    "reputation": 36,
    "moderator": false,
    "superuser": true,
    "emailHash": "eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc",
    "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
    "postCount": 10,
    "followerCount": 0,
    "followCount": 0,
    "userFollowCount": 0,
    "about": "I am the main test user for the community!",
    "active": true,
    "suspended": false,
    "deactivated": false,
    "groups": [
        {
            "id": "5",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066163000,
            "name": "Super Users"
        },
        {
            "id": "6",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066174000,
            "name": "Network Administrators"
        }
    ],
    "extraData": {}
}
{"id":7,"type":"user","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1548971891000,"username":"dzone","slug":"dzone","gold":0,"silver":0,"bronze":2,"reputation":36,"moderator":false,"superuser":true,"emailHash":"eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc","avatar":"http://apidocs.cloud.answerhub.com/users/7/photo/view.html","postCount":10,"followerCount":0,"followCount":0,"userFollowCount":0,"about":"I am the main test user for the community!","active":true,"suspended":false,"deactivated":false,"groups":[{"id":"5","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1547066163000,"name":"Super Users"},{"id":"6","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1547066174000,"name":"Network Administrators"}],"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

Permissions & Notes:

  • You must have the View users list permission under Anonymous Roles in the Advanced Editor.
  • 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

Successful Response:

  • HTTP Status 200 - OK
{
    "name": "",
    "sort": "reputation",
    "page": 1,
    "pageSize": 35,
    "pageCount": 3,
    "listCount": 35,
    "totalCount": 88,
    "list": [
        {
            "id": 108,
            "type": "user",
            "creationDate": 1548263008000,
            "creationDateFormatted": "01/23/2019 05:03 PM",
            "modificationDate": 1548971898000,
            "username": "admin",
            "slug": "admin",
            "gold": 0,
            "silver": 0,
            "bronze": 0,
            "reputation": 61,
            "moderator": false,
            "superuser": true,
            "emailHash": "1446851ccea76b1615800de8182d3433a381a446c2ea6ae45196e413c060c3cd",
            "avatar": "http://apidocs.cloud.answerhub.com/users/108/photo/view.html",
            "postCount": 5,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "6",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066174000,
                    "name": "Network Administrators"
                },
                {
                    "id": "5",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066163000,
                    "name": "Super Users"
                },
                {
                    "id": "4",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1542778947000,
                    "name": "Moderators"
                }
            ]
        },
        {
            "id": 21,
            "type": "user",
            "creationDate": 1545231735000,
            "creationDateFormatted": "12/19/2018 03:02 PM",
            "modificationDate": 1548254413000,
            "username": "einstein",
            "realname": "Albert Einstein",
            "slug": "einstein",
            "gold": 0,
            "silver": 0,
            "bronze": 1,
            "reputation": 47,
            "moderator": false,
            "superuser": false,
            "emailHash": "2bb7abcfaf171aaa202a2417b552ff1c6b458cca70d008d6185eb40bafbecfc2",
            "avatar": "http://apidocs.cloud.answerhub.com/users/21/photo/view.html",
            "postCount": 230,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "95",
                    "creationDate": 1547821117000,
                    "creationDateFormatted": "01/18/2019 02:18 PM",
                    "modificationDate": 1548971848000,
                    "name": "Test Group"
                },
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 7,
            "type": "user",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1548971891000,
            "username": "dzone",
            "slug": "dzone",
            "gold": 0,
            "silver": 0,
            "bronze": 2,
            "reputation": 36,
            "moderator": false,
            "superuser": true,
            "emailHash": "eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc",
            "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
            "postCount": 10,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "5",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066163000,
                    "name": "Super Users"
                },
                {
                    "id": "6",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066174000,
                    "name": "Network Administrators"
                }
            ]
        },
        {
            "id": 11,
            "type": "user",
            "creationDate": 1545231253000,
            "creationDateFormatted": "12/19/2018 02:54 PM",
            "modificationDate": 1548972014000,
            "username": "answerhub",
            "slug": "answerhub",
            "gold": 0,
            "silver": 0,
            "bronze": 3,
            "reputation": 2,
            "moderator": false,
            "superuser": false,
            "emailHash": "e0263b946d4613f338882bf7a8ced18d2ba2fe9f8edd8a9444e803a3c9ae97de",
            "avatar": "http://apidocs.cloud.answerhub.com/users/11/photo/view.html",
            "postCount": 3,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 109,
            "type": "user",
            "creationDate": 1548344650000,
            "creationDateFormatted": "01/24/2019 03:44 PM",
            "modificationDate": 1548346503000,
            "username": "demo4",
            "slug": "demo4",
            "gold": 0,
            "silver": 0,
            "bronze": 1,
            "reputation": 1,
            "moderator": false,
            "superuser": false,
            "emailHash": "c6c627f75dc669ee74de4374829c80296ba0e23c885ed7b2c88044875b98c172",
            "avatar": "http://apidocs.cloud.answerhub.com/users/109/photo/view.html",
            "postCount": 0,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 97,
            "type": "user",
            "creationDate": 1548344611000,
            "creationDateFormatted": "01/24/2019 03:43 PM",
            "modificationDate": 1548346440000,
            "username": "demo3",
            "slug": "demo3",
            "gold": 0,
            "silver": 0,
            "bronze": 1,
            "reputation": 1,
            "moderator": false,
            "superuser": false,
            "emailHash": "f1643d58287a4e30d18fd3b0a018fe228e3457f665cef6af1b1404f4359e9bfa",
            "avatar": "http://apidocs.cloud.answerhub.com/users/97/photo/view.html",
            "postCount": 0,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 96,
            "type": "user",
            "creationDate": 1548344519000,
            "creationDateFormatted": "01/24/2019 03:41 PM",
            "modificationDate": 1548346411000,
            "username": "demo2",
            "slug": "demo2",
            "gold": 0,
            "silver": 0,
            "bronze": 1,
            "reputation": 1,
            "moderator": false,
            "superuser": false,
            "emailHash": "14041a0123fdccbbf8b179ebcf14eafef8d6980ac2087b6aae65840045a37c62",
            "avatar": "http://apidocs.cloud.answerhub.com/users/96/photo/view.html",
            "postCount": 0,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 31,
            "type": "user",
            "creationDate": 1547066128000,
            "creationDateFormatted": "01/09/2019 08:35 PM",
            "modificationDate": 1548346523000,
            "username": "demo",
            "slug": "demo",
            "gold": 0,
            "silver": 0,
            "bronze": 1,
            "reputation": 1,
            "moderator": false,
            "superuser": false,
            "emailHash": "2cf3d5badb8d10c1b235f8ac4fe3a102278fce34615487cf1b7581ec7c9716a0",
            "avatar": "http://apidocs.cloud.answerhub.com/users/31/photo/view.html",
            "postCount": 0,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "95",
                    "creationDate": 1547821117000,
                    "creationDateFormatted": "01/18/2019 02:18 PM",
                    "modificationDate": 1548971848000,
                    "name": "Test Group"
                },
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
        {
            "id": 110,
            "type": "user",
            "creationDate": 1549031543000,
            "creationDateFormatted": "02/01/2019 02:32 PM",
            "modificationDate": 1549031544000,
            "username": "JonS",
            "slug": "jons",
            "gold": 0,
            "silver": 0,
            "bronze": 0,
            "reputation": 0,
            "moderator": false,
            "superuser": false,
            "emailHash": "6c9fc7acce644f4fce38022bdb3e91f8f68310d3cf079f6093691265e2c7b55b",
            "avatar": "http://apidocs.cloud.answerhub.com/users/110/photo/view.html",
            "postCount": 0,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        },
       
        {
            "id": 76,
            "type": "user",
            "creationDate": 1547066827000,
            "creationDateFormatted": "01/09/2019 08:47 PM",
            "modificationDate": 1547066827000,
            "username": "EricOdell",
            "slug": "ericodell",
            "gold": 0,
            "silver": 0,
            "bronze": 0,
            "reputation": 0,
            "moderator": false,
            "superuser": false,
            "emailHash": "89f1f742cff984cc397d1748851c6a10f93a5bf4e33826dd8a3a69deb5c81c2d",
            "avatar": "http://apidocs.cloud.answerhub.com/users/76/photo/view.html",
            "postCount": 1,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        }
    ]
}
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:

  • To change a user name through the API, you must have the Edit Users and Groups permission under Site Administration Roles in the Advanced Editor.
  • To update any user, you must have the Edit any profile permission under Moderation Roles in the Advanced Editor.
    • If the user account is your own, you must have the Edit own profile permission under Standard Roles in the Advanced Editor.
  • To edit any profile details, you must have the Edit any profile details (name, location, password, etc.) permission under Moderation Roles in the Advanced Editor.

    • If the user account is your own, you must have the Edit own profile details (name, location, password, etc.) under Standard Roles in the Advanced Editor.

    • 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: 110) 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/110.json" -v

Example of additional queries to update 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"}' "https://apidocs.cloud.answerhub.com/services/v2/user/110.json" -v

Sample Response with a Real Name Query

Successful Response to Update User 110 to have a real name of Jon Smith.

  • HTTP Status code 200 - OK
{
    "id": "110",
    "creationDate": 1549031543000,
    "creationDateFormatted": "02/01/2019 02:32 PM",
    "modificationDate": 1549034012073,
    "username": "JonS",
    "realname": "Jon Smith",
    "type": "user",
    "plug": "jons",
    "gold": 0,
    "silver": 0,
    "bronze": 0,
    "reputation": 0,
    "moderator": false,
    "superuser": false,
    "emailHash": "6c9fc7acce644f4fce38022bdb3e91f8f68310d3cf079f6093691265e2c7b55b",
    "avatar": "http://apidocs.cloud.answerhub.com/users/110/photo/view.html",
    "company": "",
    "website": "",
    "location": "",
    "postCount": 0,
    "followerCount": 0,
    "followCount": 0,
    "userFollowCount": 0
}

Sample Response with About and Location Queries

Successful Response to Update User 110 to have a description in the about section and to add their location.

  • HTTP Status code 200 - OK
{
    "id": "110",
    "creationDate": 1549031543000,
    "creationDateFormatted": "02/01/2019 02:32 PM",
    "modificationDate": 1549047629717,
    "username": "jons",
    "realname": "Jon Smith",
    "type": "user",
    "plug": "jons",
    "gold": 1,
    "silver": 0,
    "bronze": 0,
    "reputation": 0,
    "moderator": false,
    "superuser": false,
    "emailHash": "6c9fc7acce644f4fce38022bdb3e91f8f68310d3cf079f6093691265e2c7b55b",
    "avatar": "http://apidocs.cloud.answerhub.com/users/110/photo/view.html",
    "company": "",
    "website": "",
    "location": "NC",
    "postCount": 0,
    "followerCount": 0,
    "followCount": 0,
    "userFollowCount": 0
}

Community User Interface Result

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/11/question.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/11/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/11/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/11/question.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/11/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

Permissions & Notes:

  • You must have the View the questions list permission under Anonymous Roles in the Advanced Editor.

  • 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: 11) 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/11/question.json"

Sample Response

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 1,
    "totalCount": 1,
    "list": [
        {
            "id": 806,
            "type": "question",
            "creationDate": 1547654401000,
            "creationDateFormatted": "01/16/2019 04:00 PM",
            "title": "Where do I go to learn more about AnswerHub as a Developer?",
            "body": "<div class=\"fr-view clearfix\"><p>I would like to know if there is a site I can go to if I am interested in learning about AnswerHub as a developer. </p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\">\n <p>I would like to know if there is a site I can go to if I am interested in learning about AnswerHub as a developer. </p>\n</div>",
            "author": {
                "id": 11,
                "username": "answerhub",
                "reputation": 2
            },
            "lastEditedAction": 926,
            "activeRevisionId": 806,
            "revisionIds": [
                806
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547663719000,
            "attachments": [],
            "childrenIds": [
                800
            ],
            "commentIds": [],
            "marked": true,
            "topics": [
                {
                    "id": 543,
                    "creationDate": 1547066694000,
                    "creationDateFormatted": "01/09/2019 08:44 PM",
                    "name": "answerhub",
                    "author": {
                        "id": 73,
                        "username": "jessed",
                        "reputation": 0
                    },
                    "usedCount": 3,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 805,
                    "creationDate": 1547654401000,
                    "creationDateFormatted": "01/16/2019 04:00 PM",
                    "name": "developer",
                    "author": {
                        "id": 11,
                        "username": "answerhub",
                        "reputation": 2
                    },
                    "usedCount": 1,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 127,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "technology",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 6,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "where-do-i-go-to-learn-more-about-answerhub-as-a-d",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 5,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": [],
            "answers": [
                800
            ],
            "answerCount": 1
        }
    ]
}
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 under Anonymous Roles in the Advanced Editor.

  • 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": 10,
    "pageCount": 1,
    "listCount": 4,
    "totalCount": 4,
    "list": [
        {
            "id": 800,
            "type": "answer",
            "creationDate": 1547663719000,
            "creationDateFormatted": "01/16/2019 06:35 PM",
            "title": "You can go to the following link: ht ...",
            "body": "<div class=\"fr-view clearfix\"><p>You can go to the following link: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/\" target=\"_blank\">https://api.dzonesoftware.com/</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>You can go to the following link: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/\" target=\"_blank\">https://api.dzonesoftware.com/</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 917,
            "activeRevisionId": 800,
            "revisionIds": [
                800
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547663719000,
            "originalParentId": 806,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": true,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 1,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 1,
            "downVoteCount": 0,
            "nodeStates": [
                "accepted"
            ]
        },
        {
            "id": 807,
            "type": "answer",
            "creationDate": 1547743768000,
            "creationDateFormatted": "01/17/2019 04:49 PM",
            "body": "<div class=\"fr-view clearfix\"><p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 943,
            "activeRevisionId": 807,
            "revisionIds": [
                807
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547743768000,
            "originalParentId": 544,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 812,
            "type": "answer",
            "creationDate": 1547744013000,
            "creationDateFormatted": "01/17/2019 04:53 PM",
            "body": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Go to this page and read about all of AnswerHub&#39;s content types: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/answerhub-content\" target=\"_blank\">https://api.dzonesoftware.com/docs/answerhub-content</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 935,
            "activeRevisionId": 812,
            "revisionIds": [
                812
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547744013000,
            "originalParentId": 520,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [],
            "containerIds": [],
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 811,
            "type": "answer",
            "creationDate": 1547743939000,
            "creationDateFormatted": "01/17/2019 04:52 PM",
            "body": "<div class=\"fr-view clearfix\"><p>Go to this page and navigate down to the GDPR category for those specific endpoints: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/v1.8/reference\" target=\"_blank\">https://api.dzonesoftware.com/v1.8/reference</a></p></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>Go to this page and navigate down to the GDPR category for those specific endpoints: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/v1.8/reference\" target=\"_blank\">https://api.dzonesoftware.com/v1.8/reference</a></p></div>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "lastEditedAction": 933,
            "activeRevisionId": 811,
            "revisionIds": [
                811
            ],
            "lastActiveUserId": 7,
            "lastActiveDate": 1547743939000,
            "originalParentId": 535,
            "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/96/action.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/96/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/96/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/96/action.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/96/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 under the Anonymous Roles and View analytics permissions under Site Administration Roles in the Advanced Editor.

  • 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: 96) 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/96/action.json"

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "name": "",
    "sort": "actionDate",
    "page": 1,
    "pageSize": 20,
    "pageCount": 1,
    "listCount": 3,
    "totalCount": 3,
    "list": [
        {
            "id": 984,
            "ip": "172.20.0.3",
            "user": {
                "id": 96,
                "username": "demo2",
                "reputation": 1
            },
            "actionDate": 1548346411000,
            "canceled": false,
            "extra": "1",
            "privateAction": false,
            "verb": "voted",
            "node": {
                "id": 819,
                "type": "idea",
                "creationDate": 1441108800000,
                "creationDateFormatted": "09/01/2015 12:00 PM",
                "title": "title of an idea",
                "body": "<div class=\"fr-view clearfix\">body of an idea</div>",
                "bodyAsHTML": "<div class=\"fr-view clearfix\">body of an idea</div>",
                "author": {
                    "id": 108,
                    "username": "admin",
                    "reputation": 61
                },
                "lastEditedAction": 979,
                "activeRevisionId": 823,
                "revisionIds": [
                    823
                ],
                "lastActiveUserId": 108,
                "lastActiveDate": 1441108800000,
                "attachments": [],
                "childrenIds": [],
                "commentIds": [],
                "marked": false,
                "topics": [
                    {
                        "id": 817,
                        "creationDate": 1548336293000,
                        "creationDateFormatted": "01/24/2019 01:24 PM",
                        "name": "idea1",
                        "author": {
                            "id": 108,
                            "username": "admin",
                            "reputation": 61
                        },
                        "usedCount": 1,
                        "getImmediateChildren": [],
                        "getParents": []
                    },
                    {
                        "id": 818,
                        "creationDate": 1548336293000,
                        "creationDateFormatted": "01/24/2019 01:24 PM",
                        "name": "idea2",
                        "author": {
                            "id": 108,
                            "username": "admin",
                            "reputation": 61
                        },
                        "usedCount": 1,
                        "getImmediateChildren": [],
                        "getParents": []
                    }
                ],
                "primaryContainerId": 11,
                "containerIds": [
                    7,
                    11
                ],
                "slug": "title-of-an-idea",
                "wiki": false,
                "score": 4,
                "depth": 0,
                "viewCount": 3,
                "upVoteCount": 4,
                "downVoteCount": 0,
                "nodeStates": []
            },
            "rootNode": {
                "id": 819,
                "type": "idea",
                "creationDate": 1441108800000,
                "creationDateFormatted": "09/01/2015 12:00 PM",
                "title": "title of an idea",
                "body": "<div class=\"fr-view clearfix\">body of an idea</div>",
                "bodyAsHTML": "<div class=\"fr-view clearfix\">body of an idea</div>",
                "author": {
                    "id": 108,
                    "username": "admin",
                    "reputation": 61
                },
                "lastEditedAction": 979,
                "activeRevisionId": 823,
                "revisionIds": [
                    823
                ],
                "lastActiveUserId": 108,
                "lastActiveDate": 1441108800000,
                "attachments": [],
                "childrenIds": [],
                "commentIds": [],
                "marked": false,
                "topics": [
                    {
                        "id": 817,
                        "creationDate": 1548336293000,
                        "creationDateFormatted": "01/24/2019 01:24 PM",
                        "name": "idea1",
                        "author": {
                            "id": 108,
                            "username": "admin",
                            "reputation": 61
                        },
                        "usedCount": 1,
                        "getImmediateChildren": [],
                        "getParents": []
                    },
                    {
                        "id": 818,
                        "creationDate": 1548336293000,
                        "creationDateFormatted": "01/24/2019 01:24 PM",
                        "name": "idea2",
                        "author": {
                            "id": 108,
                            "username": "admin",
                            "reputation": 61
                        },
                        "usedCount": 1,
                        "getImmediateChildren": [],
                        "getParents": []
                    }
                ],
                "primaryContainerId": 11,
                "containerIds": [
                    7,
                    11
                ],
                "slug": "title-of-an-idea",
                "wiki": false,
                "score": 4,
                "depth": 0,
                "viewCount": 3,
                "upVoteCount": 4,
                "downVoteCount": 0,
                "nodeStates": []
            },
            "topics": [
                {
                    "id": 817,
                    "creationDate": 1548336293000,
                    "creationDateFormatted": "01/24/2019 01:24 PM",
                    "name": "idea1",
                    "author": {
                        "id": 108,
                        "username": "admin",
                        "reputation": 61
                    },
                    "usedCount": 1,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 818,
                    "creationDate": 1548336293000,
                    "creationDateFormatted": "01/24/2019 01:24 PM",
                    "name": "idea2",
                    "author": {
                        "id": 108,
                        "username": "admin",
                        "reputation": 61
                    },
                    "usedCount": 1,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ]
        },
        {
            "id": 967,
            "ip": "172.18.0.3",
            "user": {
                "id": 96,
                "username": "demo2",
                "reputation": 1
            },
            "actionDate": 1548344805000,
            "canceled": false,
            "privateAction": false,
            "verb": "joined",
            "topics": []
        },
        {
            "id": 981,
            "ip": "172.20.0.3",
            "user": {
                "id": 96,
                "username": "demo2",
                "reputation": 1
            },
            "realUser": {
                "id": 7,
                "username": "dzone",
                "reputation": 36
            },
            "actionDate": 1548344519000,
            "canceled": false,
            "privateAction": false,
            "verb": "joined",
            "topics": []
        }
    ]
}
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/11/award.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/11/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/11/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/11/award.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/11/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 under Anonymous Roles in the Advanced Editor.

  • 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: 11) 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/11/award.json" -v

Award Types

The Awards listed in the JSON Response below are called "Supporter," "Editor" and "Scholar," respectively. Users can obtain the awards by the following actions: When the user performs their first upvote; when a user performs their first edit; when a user accepts their first answer to a question they posted. To see all of the awards and their descriptions, use the GET "Retrieve Award List" request.

Sample Response

Successful Response:

  • HTTP Status 200 - OK
{
    "name": "",
    "sort": "reputation",
    "page": 1,
    "pageSize": 35,
    "pageCount": 1,
    "listCount": 3,
    "totalCount": 3,
    "list": [
        {
            "id": 505,
            "name": "awards.voteupcount.bronze.name",
            "description": "awards.voteupcount.bronze.description",
            "count": 1,
            "level": "bronze",
            "imageUrl": "http://apidocs.cloud.answerhub.com/themes/thub/images/badges/awards.voteupcount.bronze.name.png",
            "creationDate": 1547654242000
        },
        {
            "id": 507,
            "name": "awards.revisecount.bronze.name",
            "description": "awards.revisecount.bronze.description",
            "count": 1,
            "level": "bronze",
            "imageUrl": "http://apidocs.cloud.answerhub.com/themes/thub/images/badges/awards.revisecount.bronze.name.png",
            "creationDate": 1548271912000
        },
        {
            "id": 529,
            "name": "awards.scholar.name",
            "description": "awards.scholar.description",
            "count": 1,
            "level": "bronze",
            "imageUrl": "http://apidocs.cloud.answerhub.com/themes/thub/images/badges/awards.scholar.name.png",
            "creationDate": 1547663731000
        }
    ]
}
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

Query Params

follower
int32
 

/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 under Standard Roles in the Advanced Editor.
  • You must have the Edit users and groups permission under Site Administration Roles in the Advanced Editor 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: 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/follow.json?follower=11" -v

In the example above, Dzone (user 7) is now following Answerhub (user 11).

Expected Response

Successful Response

  • HTTP Status 200 - OK
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

Query Params

follower
int32
 

/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 permissionunder Standard Roles in the Advanced Editor.

  • You must have the Edit users and groups permission under Site Administration Roles in the Advanced Editor 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 as 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: 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/unfollow.json?follower=11" -v

In the example above, Dzone (user 7) has stopped following AnswerHub (user 11).

Expected Response

Successful Response:

  • HTTP Status 200 - OK
Suggest Edits

Suspend a User

You can use this API request to suspend a user from accessing or interacting with your AnswerHub site if you would like to "warn" a user for misconduct within the community.

 

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/111/suspendUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/111/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/111/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/111/suspendUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/111/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 under Moderation Roles in the Advanced Editor.

  • 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:111) 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/111/suspendUser.json" -v

In the example above, suspendabletestuser (user 111) was suspended, until a moderator manually unsuspends the user. The user will not receive a notification, they will just not be able to log in to the community anymore.

Expected Response

Successful Response:

  • HTTP Status 200 - OK
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/111/unsuspendUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/111/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/111/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/111/unsuspendUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/111/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

Path Params

user_id
int32
required
 

/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 under Moderation Roles in the Advanced Editor.

  • This request was added in version 1.6.3.

Sample Request

A PUT unsuspend a user request to unsuspend a user (userId: 111) 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/111/unsuspendUser.json" -v

In the example above, suspendabletestuser (user 111) was manually unsuspended by a moderator. The user will not receive a notification, they will just be able to log in to the community again.

Expected Response

Successful Response:

  • HTTP Status 200 - OK
Suggest Edits

Deactivate User

You can use this API request to deactivate and suspend a user for users who are not abiding by the community rules.

 

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/97/deactivateUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/97/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/97/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/97/deactivateUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/97/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 under Site Administration Roles in the Advanced Editor.

  • This request was added in version 1.6.3.

Sample Request

A PUT deactivate user request to deactivate a user (userId: 97) 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/97/deactivateUser.json" -v

In the example above, demo3 (user 97) was deactivated (similar to suspension) and cannot access the community. The difference between suspension and deactivation is that the user is usually deactivated because of more destructive behavior or they have left the company. The deactivated user also does not get included in the user count, thus freeing up license capacity.

Expected Response

Successful Response:

  • HTTP Status 200 - OK
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/97/reactivateUser.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/97/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/97/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/97/reactivateUser.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/97/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 under Site Administration Roles in the Advanced Editor.

  • This request was added in version 1.6.3.

Sample Request

A PUT reactivate a user request to reactivate a user (userId: 97) 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/97/reactivateUser.json" -v

In the example above, demo3 (user 97) was reactivated (similar to unsuspension) and can access the community again. The difference between suspension and deactivation is that the user is usually deactivated because of more destructive behavior or they have left the company. The reactivated user will get included in the user count, thus taking up license capacity again.

Expected Response

Successful Response:

  • HTTP Status 200 - OK
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 under Anonymous Roles in the Advanced Editor.

  • 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

Successful Response:

  • HTTP Status 200 - OK
{
    "id": 7,
    "type": "user",
    "creationDate": 1542778947000,
    "creationDateFormatted": "11/21/2018 05:42 AM",
    "modificationDate": 1549289924000,
    "username": "dzone",
    "slug": "dzone",
    "gold": 0,
    "silver": 0,
    "bronze": 2,
    "reputation": 36,
    "moderator": false,
    "superuser": true,
    "emailHash": "eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc",
    "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
    "postCount": 10,
    "followerCount": 0,
    "followCount": 0,
    "userFollowCount": 0,
    "active": true,
    "suspended": false,
    "deactivated": false,
    "groups": [
        {
            "id": "5",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066163000,
            "name": "Super Users"
        },
        {
            "id": "6",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066174000,
            "name": "Network Administrators"
        }
    ]
}
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/7/expertise.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/7/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/7/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/7/expertise.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/user/7/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 under Anonymous Roles in the Advanced Editor.

  • This request was added in version 1.6.3.

Sample Request

A GET get topics of expertise request from a specific 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/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": "reputation",
    "page": 1,
    "pageSize": 35,
    "pageCount": 1,
    "listCount": 4,
    "totalCount": 4,
    "list": [
        {
            "id": 579,
            "creationDate": 1547066743000,
            "creationDateFormatted": "01/09/2019 08:45 PM",
            "name": "integration",
            "author": {
                "id": 49,
                "username": "valhuber",
                "reputation": 0
            },
            "usedCount": 9,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 728,
            "creationDate": 1547066838000,
            "creationDateFormatted": "01/09/2019 08:47 PM",
            "name": "microservices",
            "author": {
                "id": 49,
                "username": "valhuber",
                "reputation": 0
            },
            "usedCount": 8,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 543,
            "creationDate": 1547066694000,
            "creationDateFormatted": "01/09/2019 08:44 PM",
            "name": "answerhub",
            "author": {
                "id": 73,
                "username": "jessed",
                "reputation": 0
            },
            "usedCount": 4,
            "getImmediateChildren": [],
            "getParents": []
        },
        {
            "id": 825,
            "creationDate": 1549288957000,
            "creationDateFormatted": "02/04/2019 02:02 PM",
            "name": "analytics",
            "author": {
                "id": 111,
                "username": "suspendabletestuser",
                "reputation": 1
            },
            "usedCount": 1,
            "getImmediateChildren": [],
            "getParents": []
        }
    ]
}
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
curl --request PUT \
  --url https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/user/userId/awardReputation.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/userId/awardReputation.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/userId/awardReputation.json");

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 under Moderation Roles in the Advanced Editor.

  • 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=suggested%an%idea%voted%up%5%times" -v

Expected Response

Successful Response:

  • HTTP Status 200 - OK

Community User Interface Result

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 under Site Administration Roles in the Advanced Editor.

  • 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 human-readable username and password (answerhub/test123) would look like this:

curl 
-u "answerhub:test123" 
-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

In the example above, there will be a new group called "Marketing" with a description of "Marketing Dept" in the admin console.

Expected Response

Successful Response:

  • HTTP Status 201 - Created
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

 

Cannot Test This Endpoint

Due to the type of permission that is required, this endpoint is not testable in the API Explorer. However, you can see the actual response that you would have received in the Sample Response below.

/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 under Site Administration Roles in the Advanced Editor.

  • 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 Responses

Successful Response

{
  "name": "",
  "sort": "reputation",
  "page": 1,
  "pageSize": 35,
  "pageCount": 1,
  "listCount": 2,
  "totalCount": 2,
  "list": [
    {
      "id": 21,
      "type": "user",
      "creationDate": 1545231735000,
      "creationDateFormatted": "12/19/2018 03:02 PM",
      "modificationDate": 1548254413000,
      "username": "einstein",
      "realname": "Albert Einstein",
      "slug": "einstein",
      "gold": 0,
      "silver": 0,
      "bronze": 1,
      "reputation": 47,
      "moderator": false,
      "superuser": false,
      "emailHash": "2bb7abcfaf171aaa202a2417b552ff1c6b458cca70d008d6185eb40bafbecfc2",
      "avatar": "http://apidocs.cloud.answerhub.com/users/21/photo/view.html",
      "postCount": 230,
      "followerCount": 0,
      "followCount": 0,
      "userFollowCount": 0,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "95",
          "creationDate": 1547821117000,
          "creationDateFormatted": "01/18/2019 02:18 PM",
          "modificationDate": 1547821271000,
          "name": "Test Group"
        },
        {
          "id": "3",
          "creationDate": 1542778947000,
          "creationDateFormatted": "11/21/2018 05:42 AM",
          "modificationDate": 1547066915000,
          "name": "Users"
        }
      ]
    },
    {
      "id": 31,
      "type": "user",
      "creationDate": 1547066128000,
      "creationDateFormatted": "01/09/2019 08:35 PM",
      "modificationDate": 1548346523000,
      "username": "demo",
      "slug": "demo",
      "gold": 0,
      "silver": 0,
      "bronze": 1,
      "reputation": 1,
      "moderator": false,
      "superuser": false,
      "emailHash": "2cf3d5badb8d10c1b235f8ac4fe3a102278fce34615487cf1b7581ec7c9716a0",
      "avatar": "http://apidocs.cloud.answerhub.com/users/31/photo/view.html",
      "postCount": 0,
      "followerCount": 0,
      "followCount": 0,
      "userFollowCount": 0,
      "active": true,
      "suspended": false,
      "deactivated": false,
      "groups": [
        {
          "id": "95",
          "creationDate": 1547821117000,
          "creationDateFormatted": "01/18/2019 02:18 PM",
          "modificationDate": 1547821271000,
          "name": "Test Group"
        },
        {
          "id": "3",
          "creationDate": 1542778947000,
          "creationDateFormatted": "11/21/2018 05:42 AM",
          "modificationDate": 1547066915000,
          "name": "Users"
        }
      ]
    }
  ]
}

Error Response

{
    "errors": {
        "message": "You don't have permission to do this action.<br>Please login as another user"
    }
}
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 under Site Administration Roles in the Advanced Editor.

  • 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 Responses

Successful Response

{
    "id": 3,
    "type": "group",
    "creationDate": 1542778947000,
    "creationDateFormatted": "11/21/2018 05:42 AM",
    "modificationDate": 1547066915000,
    "name": "Users"
}

Error Response
500 Internal Server Error

{
    "errors": {
        "message": "Internal server error"
    }
}
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 under Site Administration Roles in the Advanced Editor.

  • 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 Responses

Successful Response

{
    "name": "",
    "sort": "",
    "page": 1,
    "pageSize": 10,
    "pageCount": 1,
    "listCount": 7,
    "totalCount": 7,
    "list": [
        {
            "id": 98,
            "type": "group",
            "creationDate": 1549297120000,
            "creationDateFormatted": "02/04/2019 04:18 PM",
            "modificationDate": 1549297120000,
            "name": "Marketing",
            "description": "Marketing Dept."
        },
        {
            "id": 95,
            "type": "group",
            "creationDate": 1547821117000,
            "creationDateFormatted": "01/18/2019 02:18 PM",
            "modificationDate": 1548971848000,
            "name": "Test Group",
            "description": "Standard Users"
        },
        {
            "id": 6,
            "type": "group",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066174000,
            "name": "Network Administrators"
        },
        {
            "id": 5,
            "type": "group",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066163000,
            "name": "Super Users"
        },
        {
            "id": 4,
            "type": "group",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1542778947000,
            "name": "Moderators"
        },
        {
            "id": 3,
            "type": "group",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066915000,
            "name": "Users"
        },
        {
            "id": 1,
            "type": "group",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1542778947000,
            "name": "Anonymous"
        }
    ]
}

Error Response

{
    "errors": {
        "message": "You don't have permission to do this action.<br>Please login as another user"
    }
}
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 under Site Administration Roles in the Advanced Editor.

  • 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 human-readable username and password (answerhub/test123) that updates a group (groupId: 95) to have a description ("Updating a Group") would look like this:

curl 
-H "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"description":"Updating a Group"}' "https://apidocs.cloud.answerhub.com/services/v2/group/95.json" -v

In the example above, Test Group (group 95) now has an added description, "Updating a Group" in the admin console.

Expected Response

Successful Response:

  • HTTP Status 201 - Created
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/99/add.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/99/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/99/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/99/add.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/99/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 under Site Administration Roles in the Advanced Editor.

  • 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 human-readable username and password (answerhub/test123) to add users (userId: 96, 97, and 107) to a group (groupId: 99), 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/group/99/add.json?users=96,97, 107" -v

In the example above, demo2 (user 96), demo3 (user 97), and guyS (user 107) were added to the Group called "Add Users to this Group" (group 99). The change can be seen in the admin console.

Sample Response

Successful Response:

  • HTTP Status 204 - No Content

Error Response:
If you don't have the correct permissions, you will get this response.

  • HTTP Status 401 Unauthorized
{
    "errors": {
        "message": "You don't have permission to do this action.
Please login as another user"
    }
}

Error Response:
If the users are already in the Group, then you will get this response.

  • HTTP Status 401 Unauthorized
<html>
    <head>
        <title>Apache Tomcat/7.0.81 - Error report</title>
        <style>
            <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
        </style>
    </head>
    <body>
        <h1>HTTP Status 401 - Bad credentials</h1>
        <HR size="1" noshade="noshade">
        <p>
            <b>type</b> Status report
        </p>
        <p>
            <b>message</b>
            <u>Bad credentials</u>
        </p>
        <p>
            <b>description</b>
            <u>This request requires HTTP authentication.</u>
        </p>
        <HR size="1" noshade="noshade">
        <h3>Apache Tomcat/7.0.81</h3>
    </body>
</html>
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/99/remove.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/group/99/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/99/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/99/remove.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/group/99/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 under Site Administration Roles in the Advanced Editor.

  • 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 human-readable username and password (answerhub/test123) to remove a user (userId: 96,97,107) from a group (groupId: 31), 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/group/99/remove.json?users=96,97,107" -v

In the example above, demo2 (user 96), demo3 (user 97), and guyS (user 107) were removed from the Group called "Add Users to this Group" (group 99). The change can be seen in the admin console.

Expected Response

Successful Response:

  • HTTP Status 204 - No Content
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/473/followers.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/473/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/473/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/473/followers.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/473/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

Query Params

details
boolean

default=false

active
boolean

default=true

 

/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 list permission under Anonymous Roles in the Advanced Editor.

  • 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: 473) 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/473/followers.json"

Sample Response

{
    "name": "",
    "sort": "",
    "page": 0,
    "pageSize": 35,
    "pageCount": 1,
    "listCount": 2,
    "totalCount": 2,
    "list": [
        {
            "id": 7,
            "type": "user",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1549308072000,
            "username": "dzone",
            "slug": "dzone",
            "gold": 0,
            "silver": 0,
            "bronze": 2,
            "reputation": 54,
            "moderator": false,
            "superuser": true,
            "emailHash": "eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc",
            "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
            "postCount": 10,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "5",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066163000,
                    "name": "Super Users"
                },
                {
                    "id": "6",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066174000,
                    "name": "Network Administrators"
                }
            ]
        },
        {
            "id": 11,
            "type": "user",
            "creationDate": 1545231253000,
            "creationDateFormatted": "12/19/2018 02:54 PM",
            "modificationDate": 1549059427000,
            "username": "answerhub",
            "slug": "answerhub",
            "gold": 0,
            "silver": 0,
            "bronze": 3,
            "reputation": 2,
            "moderator": false,
            "superuser": false,
            "emailHash": "e0263b946d4613f338882bf7a8ced18d2ba2fe9f8edd8a9444e803a3c9ae97de",
            "avatar": "http://apidocs.cloud.answerhub.com/users/11/photo/view.html",
            "postCount": 3,
            "followerCount": 0,
            "followCount": 0,
            "userFollowCount": 0,
            "active": true,
            "suspended": false,
            "deactivated": false,
            "groups": [
                {
                    "id": "3",
                    "creationDate": 1542778947000,
                    "creationDateFormatted": "11/21/2018 05:42 AM",
                    "modificationDate": 1547066915000,
                    "name": "Users"
                }
            ]
        }
    ]
}
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/807/revision.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/807/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/807/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/807/revision.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/807/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 under Moderation Roles in the Advanced Editor 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 under Standard Roles in the Advanced Editor.
  • 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: 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 GET "https://apidocs.cloud.answerhub.com/services/v2/node/807/revision.json"

Sample Response

{
    "name": "",
    "sort": "active",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 3,
    "totalCount": 3,
    "list": [
        {
            "id": 824,
            "revision": 3,
            "node": {
                "id": 807
            },
            "body": "<p>CHECK OUT THIS PAGE! Here you can learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "bodyAsHTML": "<p>CHECK OUT THIS PAGE! Here you can learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "",
            "revisionDate": 1549309796000,
            "revisionDateFormatted": "2/4/19 7:49 PM",
            "wiki": false
        },
        {
            "id": 838,
            "revision": 2,
            "node": {
                "id": 807
            },
            "body": "<p>Check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "bodyAsHTML": "<p>Check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">JIRA DOCS</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "",
            "revisionDate": 1549309667000,
            "revisionDateFormatted": "2/4/19 7:47 PM",
            "wiki": false
        },
        {
            "id": 807,
            "revision": 1,
            "node": {
                "id": 807
            },
            "body": "<p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p>",
            "bodyAsHTML": "<p>check out this page to learn how to enable the JIRA plugin: <a rel=\"noopener noreferrer noopener noreferrer noopener noreferrer\" href=\"https://api.dzonesoftware.com/docs/jira-integration\" target=\"_blank\">https://api.dzonesoftware.com/docs/jira-integration</a></p>",
            "author": {
                "id": 7,
                "username": "dzone",
                "reputation": 54
            },
            "summary": "Initial Revision",
            "revisionDate": 1547743768000,
            "revisionDateFormatted": "1/17/19 4:49 PM",
            "wiki": false
        }
    ]
}
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

 

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

Permissions & Notes:

  • No permissions necessary.
  • 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*: page, pageSize Search: q, type, lang Projection: include, exclude, includeOnly Other options**: wrap, v1

The following sorting criteria are supported in a node query request (Not all sorting criteria currently work - only sort by date and sort by relevance work):

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 Total number of answers within a configurable number of days (default is 2 - this can be changed in site > default > Navigation page)

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=gps"
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=viewCount"

Use of pageSize and page

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=gps"

{
    "name": "",
    "sort": "relevance",
    "page": 1,
    "pageSize": 15,
    "pageCount": 1,
    "listCount": 5,
    "totalCount": 6,
    "sorts": [
        "active",
        "newest",
        "hottest",
        "votes",
        "viewCount",
        "usedCount",
        "answerCount",
        "answerCountAsc",
        "commentCount",
        "favoriteCount",
        "followers",
        "reportCount"
    ],
    "list": [
        {
            "id": 128,
            "type": "question",
            "creationDate": 1545231744000,
            "creationDateFormatted": "12/19/2018 03:02 PM",
            "title": "Can the government track you if you have a GPS-enabled mobile phone?",
            "body": "",
            "bodyAsHTML": "",
            "author": {
                "id": 22,
                "username": "confused",
                "realname": "Confused User",
                "reputation": 0
            },
            "lastEditedAction": 153,
            "activeRevisionId": 128,
            "revisionIds": [
                128
            ],
            "lastActiveUserId": 22,
            "lastActiveDate": 1545231744000,
            "attachments": [],
            "childrenIds": [
                129
            ],
            "commentIds": [],
            "marked": false,
            "topics": [
                {
                    "id": 1,
                    "creationDate": 1545231736000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "science",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 37,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 126,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "gps",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 2,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 127,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "technology",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 6,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "can-the-government-track-you-if-you-have-a-gps-ena",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": [],
            "answers": [
                129
            ],
            "answerCount": 1
        },
        {
            "id": 399,
            "type": "question",
            "creationDate": 1545231762000,
            "creationDateFormatted": "12/19/2018 03:02 PM",
            "title": "Can the government track you if you have a GPS-enabled mobile phone?",
            "body": "",
            "bodyAsHTML": "",
            "author": {
                "id": 22,
                "username": "confused",
                "realname": "Confused User",
                "reputation": 0
            },
            "lastEditedAction": 420,
            "activeRevisionId": 399,
            "revisionIds": [
                399
            ],
            "lastActiveUserId": 22,
            "lastActiveDate": 1545231762000,
            "attachments": [],
            "childrenIds": [
                400
            ],
            "commentIds": [],
            "marked": false,
            "topics": [
                {
                    "id": 1,
                    "creationDate": 1545231736000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "science",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 37,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 126,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "gps",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 2,
                    "getImmediateChildren": [],
                    "getParents": []
                },
                {
                    "id": 127,
                    "creationDate": 1545231744000,
                    "creationDateFormatted": "12/19/2018 03:02 PM",
                    "name": "technology",
                    "author": {
                        "id": 22,
                        "username": "confused",
                        "realname": "Confused User",
                        "reputation": 0
                    },
                    "usedCount": 6,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "can-the-government-track-you-if-you-have-a-gps-ena-1",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": [],
            "answers": [
                400
            ],
            "answerCount": 1
        },
        {
            "id": 617,
            "type": "kbentry",
            "creationDate": 1547066760000,
            "creationDateFormatted": "01/09/2019 08:46 PM",
            "title": "Simply Having APIs Is Not Enough",
            "body": "<div class=\"fr-view clearfix\"><div class=\"fr-view clearfix\"><p>For several years now, the conventional wisdom among both business and DevOps professionals has been that well-designed APIs are a key contributor to the delivery of successful digital projects.</p>\n<p>In fact, our <a rel=\"nofollow noopener noreferrer\" href=\"http://rewrite.ca.com/us/articles/digital-transformation/exploiting-the-software-advantage-lessons-from-digital-disrupter.html\" target=\"_blank\">study from 2015</a> showed that almost all ?digital disrupters? ? companies at the leading edge of innovation ? had leveraged APIs to achieve twice the revenue growth of their mainstream counterparts. Digging deeper, the research also showed that the best predictor of success is not just having APIs, but having them in the context of a properly managed and coordinated API program.</p>\n<p>APIs accelerate innovation, which in turn leads to the great digital experiences that make consumers and shareholders take notice.</p>\n<p>Mobile apps that give us a constant link to our vehicles, finances, and families; smart devices that monitor our homes and bodies; connected sensors that allow us to track anything in physical space ? these are the emerging use cases that are catapulting businesses into the realm of exponential growth.</p>\n<p>While APIs provide the connectivity that brings these experiences to life, recent events make it painfully clear that in the absence of proper governance and management, they also become a gateway to nightmare scenarios.</p>\n<h2><strong>What Happens Without API Management?</strong></h2>\n<p>One of the more <a rel=\"nofollow noopener noreferrer\" href=\"http://jalopnik.com/how-the-nissan-leaf-can-be-hacked-via-web-browser-from-1761044716\" target=\"_blank\">vivid examples</a> occurred just last month, when security researchers revealed that APIs used to connect the Nissan mobile app to Leaf electric vehicles were implemented without encryption or authentication.</p>\n<p>Anyone with the server address and a vehicle identification number (VIN) could not only intercept personal data including trip logs, but also activate cabin features, anonymously and from anywhere in the world. Primary functions such as throttle, brakes, and steering were not affected this time around, but as cars become ever more autonomous, it?s easy to imagine the safety implications of future vehicle API hacks.</p>\n<h2><strong>API Management Helps to Restore Control</strong></h2>\n<p>As the ?last mile? between mobile apps, IoT endpoints, and their backend services, APIs have rapidly become the new perimeter for today?s digital businesses. In turn, API governance and management have risen from being minor considerations to critical factors in both the design and delivery of digital experiences.</p>\n<p>Properly implemented, API management restores perimeter awareness, security, and control to enterprises, even as they are increasingly exposed to connected ?things? outside the firewall ? whether those things are phones, tablets, cars, baby monitors, webcams, GPS trackers, fitness monitors, or just about any other modern product.</p>\n<p>Of all the businesses in the world, digital disrupters from our survey have had the most experience with this kind of exposure, and it?s telling that they have concluded that proper management of APIs is critical for reducing its risks. Be one of those digital disrupters. Avoid being that Nissan guy.</p>\n<p>For more information about the 13 essential capabilities that API management can bring to your digital initiatives, download the free <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/ebook/the-api-management-playbook.register.html\" target=\"_blank\">API Management Playbook</a>.</p></div></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\">\n <div class=\"fr-view clearfix\">\n  <p>For several years now, the conventional wisdom among both business and DevOps professionals has been that well-designed APIs are a key contributor to the delivery of successful digital projects.</p> \n  <p>In fact, our <a rel=\"nofollow noopener noreferrer\" href=\"http://rewrite.ca.com/us/articles/digital-transformation/exploiting-the-software-advantage-lessons-from-digital-disrupter.html\" target=\"_blank\">study from 2015</a> showed that almost all ?digital disrupters? ? companies at the leading edge of innovation ? had leveraged APIs to achieve twice the revenue growth of their mainstream counterparts. Digging deeper, the research also showed that the best predictor of success is not just having APIs, but having them in the context of a properly managed and coordinated API program.</p> \n  <p>APIs accelerate innovation, which in turn leads to the great digital experiences that make consumers and shareholders take notice.</p> \n  <p>Mobile apps that give us a constant link to our vehicles, finances, and families; smart devices that monitor our homes and bodies; connected sensors that allow us to track anything in physical space ? these are the emerging use cases that are catapulting businesses into the realm of exponential growth.</p> \n  <p>While APIs provide the connectivity that brings these experiences to life, recent events make it painfully clear that in the absence of proper governance and management, they also become a gateway to nightmare scenarios.</p> \n  <h2><strong>What Happens Without API Management?</strong></h2> \n  <p>One of the more <a rel=\"nofollow noopener noreferrer\" href=\"http://jalopnik.com/how-the-nissan-leaf-can-be-hacked-via-web-browser-from-1761044716\" target=\"_blank\">vivid examples</a> occurred just last month, when security researchers revealed that APIs used to connect the Nissan mobile app to Leaf electric vehicles were implemented without encryption or authentication.</p> \n  <p>Anyone with the server address and a vehicle identification number (VIN) could not only intercept personal data including trip logs, but also activate cabin features, anonymously and from anywhere in the world. Primary functions such as throttle, brakes, and steering were not affected this time around, but as cars become ever more autonomous, it?s easy to imagine the safety implications of future vehicle API hacks.</p> \n  <h2><strong>API Management Helps to Restore Control</strong></h2> \n  <p>As the ?last mile? between mobile apps, IoT endpoints, and their backend services, APIs have rapidly become the new perimeter for today?s digital businesses. In turn, API governance and management have risen from being minor considerations to critical factors in both the design and delivery of digital experiences.</p> \n  <p>Properly implemented, API management restores perimeter awareness, security, and control to enterprises, even as they are increasingly exposed to connected ?things? outside the firewall ? whether those things are phones, tablets, cars, baby monitors, webcams, GPS trackers, fitness monitors, or just about any other modern product.</p> \n  <p>Of all the businesses in the world, digital disrupters from our survey have had the most experience with this kind of exposure, and it?s telling that they have concluded that proper management of APIs is critical for reducing its risks. Be one of those digital disrupters. Avoid being that Nissan guy.</p> \n  <p>For more information about the 13 essential capabilities that API management can bring to your digital initiatives, download the free <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/ebook/the-api-management-playbook.register.html\" target=\"_blank\">API Management Playbook</a>.</p>\n </div>\n</div>",
            "author": {
                "id": 47,
                "username": "David.Chiu",
                "reputation": 0
            },
            "lastEditedAction": 686,
            "activeRevisionId": 617,
            "revisionIds": [
                617
            ],
            "lastActiveUserId": 47,
            "lastActiveDate": 1547066760000,
            "originalParentId": 617,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [
                {
                    "id": 616,
                    "creationDate": 1547066760000,
                    "creationDateFormatted": "01/09/2019 08:46 PM",
                    "name": "innovation",
                    "author": {
                        "id": 47,
                        "username": "David.Chiu",
                        "reputation": 0
                    },
                    "usedCount": 1,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "simply-having-apis-is-not-enough",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 635,
            "type": "kbentry",
            "creationDate": 1547066767000,
            "creationDateFormatted": "01/09/2019 08:46 PM",
            "title": "Testing the Internet of Everything",
            "body": "<div class=\"fr-view clearfix\"><div class=\"fr-view clearfix\"><p>The so-called Internet of Things (IoT) or Internet of Everything (IoE) is one of the fastest growing trends in technology, with Gartner having forecast <a rel=\"nofollow noopener noreferrer\" href=\"http://www.gartner.com/newsroom/id/3165317\" target=\"_blank\">6.4 billion connected ?things? in use in 2016</a>. It will be accompanied by fresh challenges as well as opportunities, and this is especially true when it comes to testing the connected devices and their software.</p>\n<h2>The Additional Complexity of the Internet of Things</h2>\n<p>A new article written for CA by Paul Gerrard, Principal, Gerrard Consulting, considers ?<a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/white-papers/how-will-the-internet-of-things-affect-testers.register.html\" target=\"_blank\">How will the Internet of Things Affect Testers?</a>? The potential risks of failure Paul identifies include the complexity of ?interactions between devices? which ?may be unpredicted, unforeseen and unknown?.</p>\n<p>This is not a new challenge for testers who are often faced with more possible combinations than can reasonably be tested, while many of these combinations can be unknown. In both API testing and the IoT, for instance, testers are faced with numerous discrete units of work, each of which can be combined in different ways.</p>\n<p>Some of these APIs might have been created by a third party, while the possible ordering and combinations of different versions of APIs can cause the number of combinations which might be tested to skyrocket to an impossible number.</p>\n<p>The ability to ?? identify the hundreds, thousands or millions of tests? needed to rigorously test the interconnected devices will therefore be necessary when testing the IoT, as it is already in API testing. This will require the ability to systematically reducing the number of tests to a realistic number without compromising quality and Paul, like CA, advocates a <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/white-papers/models-at-heart.register.html\" target=\"_blank\">Model-Based approach</a> to achieve this.</p>\n<h2>Some New Tools and Technology Will Be Needed, Some Might Already Exist</h2>\n<p>There are features particular to the IoT which might make it particularly complex, however. Among other factors, Paul identifies the lower level hardware devices often involved, as well as the fact that the user base might be millions of mobile individuals, with objects moving across networks and certain devices carrying their own network.</p>\n<p>When considering how to perform functional testing in the face of such complexity, Paul suggests numerous requirements. Testers will need to be able to simulate ?thousands or millions of devices?, as well as having ?data that is fit for purpose?. The latter will involve the ability to generate and edit data, as well as to monitor and track its usage.</p>\n<p>On the surface, these requirements are similar to the current need of testers to have constant access to realistic test data and production-like systems. Along with effective test case design, having the right data and environments form three pillars of rigorous testing at speed.</p>\n<p>The IoT will of course present new challenges. It will require tooling to ?execute very large numbers of tests?, as well as the more fundamental challenge of creating these tests in the first place. <a rel=\"nofollow noopener noreferrer\" href=\"http://www.ca.com/us/lpg/perfecto-mobile-inc.aspx\" target=\"_blank\">Tools are emerging</a>, however, capable of executing tests efficiently across both software and hardware, while Model-Based approaches will presumably have a role to play here too.</p>\n<p>Similarly, <a rel=\"nofollow noopener noreferrer\" href=\"http://www.ca.com/gb/products/ca-test-data-manager.html\" target=\"_blank\">high performance data generation engines</a> which offer sufficiently comprehensive data generation functions already exist to create ?trusted data sets? based on ?real world operations?. CA worked with Hitachi Consulting, for instance, to generate realistic data for performance testing as part of Copenhagen?s move to become a smart city. As set out in chapter 5 of Hitachi Consulting?s eBook, <a rel=\"nofollow noopener noreferrer\" href=\"http://learn.hitachiconsulting.com/Engineering-the-New-Reality\" target=\"_blank\"><em>Engineering the New Reality</em></a>, this included creating data on the basis of historical data from 1.7 billion GPS journeys, while also learning from physical sensors such as GPS in mobile devices.</p>\n<h2>A Solid Foundation</h2>\n<p>The IoT will therefore present fresh challenges for testing, but there are already solid foundations on which it can build. As Paul concludes, ?testers will have to learn to create better test models and how to use them with more technical modelling and simulation tools?, but some of the techniques and technology already appear in place, and seem to be moving in the right direction to accommodate this shift.</p></div></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\">\n <div class=\"fr-view clearfix\">\n  <p>The so-called Internet of Things (IoT) or Internet of Everything (IoE) is one of the fastest growing trends in technology, with Gartner having forecast <a rel=\"nofollow noopener noreferrer\" href=\"http://www.gartner.com/newsroom/id/3165317\" target=\"_blank\">6.4 billion connected ?things? in use in 2016</a>. It will be accompanied by fresh challenges as well as opportunities, and this is especially true when it comes to testing the connected devices and their software.</p> \n  <h2>The Additional Complexity of the Internet of Things</h2> \n  <p>A new article written for CA by Paul Gerrard, Principal, Gerrard Consulting, considers ?<a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/white-papers/how-will-the-internet-of-things-affect-testers.register.html\" target=\"_blank\">How will the Internet of Things Affect Testers?</a>? The potential risks of failure Paul identifies include the complexity of ?interactions between devices? which ?may be unpredicted, unforeseen and unknown?.</p> \n  <p>This is not a new challenge for testers who are often faced with more possible combinations than can reasonably be tested, while many of these combinations can be unknown. In both API testing and the IoT, for instance, testers are faced with numerous discrete units of work, each of which can be combined in different ways.</p> \n  <p>Some of these APIs might have been created by a third party, while the possible ordering and combinations of different versions of APIs can cause the number of combinations which might be tested to skyrocket to an impossible number.</p> \n  <p>The ability to ?? identify the hundreds, thousands or millions of tests? needed to rigorously test the interconnected devices will therefore be necessary when testing the IoT, as it is already in API testing. This will require the ability to systematically reducing the number of tests to a realistic number without compromising quality and Paul, like CA, advocates a <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/collateral/white-papers/models-at-heart.register.html\" target=\"_blank\">Model-Based approach</a> to achieve this.</p> \n  <h2>Some New Tools and Technology Will Be Needed, Some Might Already Exist</h2> \n  <p>There are features particular to the IoT which might make it particularly complex, however. Among other factors, Paul identifies the lower level hardware devices often involved, as well as the fact that the user base might be millions of mobile individuals, with objects moving across networks and certain devices carrying their own network.</p> \n  <p>When considering how to perform functional testing in the face of such complexity, Paul suggests numerous requirements. Testers will need to be able to simulate ?thousands or millions of devices?, as well as having ?data that is fit for purpose?. The latter will involve the ability to generate and edit data, as well as to monitor and track its usage.</p> \n  <p>On the surface, these requirements are similar to the current need of testers to have constant access to realistic test data and production-like systems. Along with effective test case design, having the right data and environments form three pillars of rigorous testing at speed.</p> \n  <p>The IoT will of course present new challenges. It will require tooling to ?execute very large numbers of tests?, as well as the more fundamental challenge of creating these tests in the first place. <a rel=\"nofollow noopener noreferrer\" href=\"http://www.ca.com/us/lpg/perfecto-mobile-inc.aspx\" target=\"_blank\">Tools are emerging</a>, however, capable of executing tests efficiently across both software and hardware, while Model-Based approaches will presumably have a role to play here too.</p> \n  <p>Similarly, <a rel=\"nofollow noopener noreferrer\" href=\"http://www.ca.com/gb/products/ca-test-data-manager.html\" target=\"_blank\">high performance data generation engines</a> which offer sufficiently comprehensive data generation functions already exist to create ?trusted data sets? based on ?real world operations?. CA worked with Hitachi Consulting, for instance, to generate realistic data for performance testing as part of Copenhagen?s move to become a smart city. As set out in chapter 5 of Hitachi Consulting?s eBook, <a rel=\"nofollow noopener noreferrer\" href=\"http://learn.hitachiconsulting.com/Engineering-the-New-Reality\" target=\"_blank\"><em>Engineering the New Reality</em></a>, this included creating data on the basis of historical data from 1.7 billion GPS journeys, while also learning from physical sensors such as GPS in mobile devices.</p> \n  <h2>A Solid Foundation</h2> \n  <p>The IoT will therefore present fresh challenges for testing, but there are already solid foundations on which it can build. As Paul concludes, ?testers will have to learn to create better test models and how to use them with more technical modelling and simulation tools?, but some of the techniques and technology already appear in place, and seem to be moving in the right direction to accommodate this shift.</p>\n </div>\n</div>",
            "author": {
                "id": 43,
                "username": "Tom.Pryce",
                "reputation": 0
            },
            "lastEditedAction": 711,
            "activeRevisionId": 635,
            "revisionIds": [
                635
            ],
            "lastActiveUserId": 43,
            "lastActiveDate": 1547066767000,
            "originalParentId": 635,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [
                {
                    "id": 621,
                    "creationDate": 1547066763000,
                    "creationDateFormatted": "01/09/2019 08:46 PM",
                    "name": "iot",
                    "author": {
                        "id": 43,
                        "username": "Tom.Pryce",
                        "reputation": 0
                    },
                    "usedCount": 6,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "testing-the-internet-of-everything-1",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        },
        {
            "id": 794,
            "type": "kbentry",
            "creationDate": 1547066891000,
            "creationDateFormatted": "01/09/2019 08:48 PM",
            "title": "IoT in the Age of GDPR: 3 Tips for Success",
            "body": "<div class=\"fr-view clearfix\"><div class=\"fr-view clearfix\"><p>As organizations are beginning to build digital strategies that span web, mobile, and connected devices, they are encountering a new business landscapes that pose&nbsp;unprecedented challenges around data management, integration, user experience, and security.</p> \n<p>With the Internet of Things (IoT) driving a large part of this digitalization, enterprises are becoming more global and more connected than ever before. The line between industries is blurring as application programming interfaces (APIs) exchange data between app providers, payment processors, health and medical services, and consumer devices ? to name just a few examples of their reach. It is vital, then, that modern organizations approach digital business with an international and industry-agnostic mindset.</p> \n<p>Trust in technology and its components of privacy and security is an issue driving customer attention worldwide. This will translate increasingly to global regulatory mandates and legislation. Organizations, therefore, must be aware of how the regulations, challenges, and opportunities of doing business in specific countries or verticals will impact their enterprise ? either directly or through their customers, partners, and the business landscape at large.</p> \n<p>GDPR is one topical example. Although it is a European law, it will affect the majority of global businesses ? especially those investing in IoT. Let's look at the top 3 tips for preparing your IoT strategy for GDPR.</p> \n<h3><strong>1. Create situational awareness: think critically about the data your IoT systems collect and how to ensure business value outweighs the risk.</strong></h3> \n<p>As the number of connected devices and services grows with your IoT strategy, it can be easy to simply collect as much data as possible. But with GDPR, businesses must decide if the value of data is worth the effort it will take to obtain the appropriate permissions and to put in place adequate security to safeguard it.</p> \n<p>For example, IP address and GPS location are considered personal data and will require a clear legal ground to use. GPS location has been a fairly standard data type to collect from mobile apps and connected devices and provides value to many IoT solutions. Businesses must decide whether they will continue to collect this data, and if so, how to build the necessary features within their apps to obtain user permission.</p> \n<p>Biometrics is also considered a special category under GDPR with more stringent regulations for their collection and use. As connected devices like Amazon's Alexa enable new digital experiences such as voice recognition for mobile banking, global organizations building these types of integrations for customers must take into account GDPR and other privacy and security compliance requirements.</p> \n<h3><strong>2. Use GDPR as an opportunity to build security and privacy throughout.</strong></h3> \n<p>GDPR provides a strong framework for all companies to approach data protection: building security and privacy by design into IoT deployments. As you develop and build new applications, you must integrate a privacy and security mindset throughout that process. Not simply for compliance purposes, but also to drive real business differentiation.</p> \n<p>For example, one question needs to be where data is stored and how it is secured, including who has access to it. Such thinking will allow your business to gain value from IoT, as data must not be locked up in legacy systems or in silos. Rather, a high degree of integration must exist for data flowing from connected devices, apps, business systems, and third parties.</p> \n<p>Securing this data while enabling access will be crucial. This means supporting robust and scalable security from device to app to API to protect the &quot;triangle of trust&quot;&nbsp;? users, apps, and devices. To do so, enterprises must know where their data lives and be able to drill down to granular data such as at the device level. This enables both analysis and the ability to delete specific consumer data if directed to under GDPR.</p> \n<h3><strong>3. It?s not just about you: understand the security approaches taken by partners and system integrators to ensure data flowing into and out of your enterprise is protected.</strong></h3> \n<p>Organizations with an IoT strategy are likely supporting a number of integrations at the device, system, or partner level. This exchange of data opens the enterprise to compromise for which it may be liable under GDPR, posing implications for many global, IoT-driven companies with broad partner or integration ecosystems.</p> \n<p>For these organizations, robust <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/products/api-management.html\" target=\"_blank\">API management</a> solutions provide security at the API level to protect enterprise data leaving the organization. They enable authorization and access management that ensures that only trusted third parties have access to data, and only to data that the business has designated or is legally able to share. This makes it easier to track permissions at a high-level for partners and consumers.</p> \n<p>Building a digital strategy with the above three tips in mind better prepares you for success in IoT, taking into account GDPR and what comes next.</p> \n<p>To learn more about GDPR, <a rel=\"nofollow noopener noreferrer\" href=\"https://twitter.com/CAinc/status/1000049570196459520\" target=\"_blank\">hear from CA's Chief Privacy Strategist</a>.</p> \n<p>Visit <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/products/api-management-accelerate.html?intcmp=headernav\" target=\"_blank\">CA's IoT resource hub</a> for more information on building a secure, scalable IoT strategy.</p></div></div>",
            "bodyAsHTML": "<div class=\"fr-view clearfix\">\n <div class=\"fr-view clearfix\">\n  <p>As organizations are beginning to build digital strategies that span web, mobile, and connected devices, they are encountering a new business landscapes that pose&nbsp;unprecedented challenges around data management, integration, user experience, and security.</p> \n  <p>With the Internet of Things (IoT) driving a large part of this digitalization, enterprises are becoming more global and more connected than ever before. The line between industries is blurring as application programming interfaces (APIs) exchange data between app providers, payment processors, health and medical services, and consumer devices ? to name just a few examples of their reach. It is vital, then, that modern organizations approach digital business with an international and industry-agnostic mindset.</p> \n  <p>Trust in technology and its components of privacy and security is an issue driving customer attention worldwide. This will translate increasingly to global regulatory mandates and legislation. Organizations, therefore, must be aware of how the regulations, challenges, and opportunities of doing business in specific countries or verticals will impact their enterprise ? either directly or through their customers, partners, and the business landscape at large.</p> \n  <p>GDPR is one topical example. Although it is a European law, it will affect the majority of global businesses ? especially those investing in IoT. Let's look at the top 3 tips for preparing your IoT strategy for GDPR.</p> \n  <h3><strong>1. Create situational awareness: think critically about the data your IoT systems collect and how to ensure business value outweighs the risk.</strong></h3> \n  <p>As the number of connected devices and services grows with your IoT strategy, it can be easy to simply collect as much data as possible. But with GDPR, businesses must decide if the value of data is worth the effort it will take to obtain the appropriate permissions and to put in place adequate security to safeguard it.</p> \n  <p>For example, IP address and GPS location are considered personal data and will require a clear legal ground to use. GPS location has been a fairly standard data type to collect from mobile apps and connected devices and provides value to many IoT solutions. Businesses must decide whether they will continue to collect this data, and if so, how to build the necessary features within their apps to obtain user permission.</p> \n  <p>Biometrics is also considered a special category under GDPR with more stringent regulations for their collection and use. As connected devices like Amazon's Alexa enable new digital experiences such as voice recognition for mobile banking, global organizations building these types of integrations for customers must take into account GDPR and other privacy and security compliance requirements.</p> \n  <h3><strong>2. Use GDPR as an opportunity to build security and privacy throughout.</strong></h3> \n  <p>GDPR provides a strong framework for all companies to approach data protection: building security and privacy by design into IoT deployments. As you develop and build new applications, you must integrate a privacy and security mindset throughout that process. Not simply for compliance purposes, but also to drive real business differentiation.</p> \n  <p>For example, one question needs to be where data is stored and how it is secured, including who has access to it. Such thinking will allow your business to gain value from IoT, as data must not be locked up in legacy systems or in silos. Rather, a high degree of integration must exist for data flowing from connected devices, apps, business systems, and third parties.</p> \n  <p>Securing this data while enabling access will be crucial. This means supporting robust and scalable security from device to app to API to protect the &quot;triangle of trust&quot;&nbsp;? users, apps, and devices. To do so, enterprises must know where their data lives and be able to drill down to granular data such as at the device level. This enables both analysis and the ability to delete specific consumer data if directed to under GDPR.</p> \n  <h3><strong>3. It?s not just about you: understand the security approaches taken by partners and system integrators to ensure data flowing into and out of your enterprise is protected.</strong></h3> \n  <p>Organizations with an IoT strategy are likely supporting a number of integrations at the device, system, or partner level. This exchange of data opens the enterprise to compromise for which it may be liable under GDPR, posing implications for many global, IoT-driven companies with broad partner or integration ecosystems.</p> \n  <p>For these organizations, robust <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/products/api-management.html\" target=\"_blank\">API management</a> solutions provide security at the API level to protect enterprise data leaving the organization. They enable authorization and access management that ensures that only trusted third parties have access to data, and only to data that the business has designated or is legally able to share. This makes it easier to track permissions at a high-level for partners and consumers.</p> \n  <p>Building a digital strategy with the above three tips in mind better prepares you for success in IoT, taking into account GDPR and what comes next.</p> \n  <p>To learn more about GDPR, <a rel=\"nofollow noopener noreferrer\" href=\"https://twitter.com/CAinc/status/1000049570196459520\" target=\"_blank\">hear from CA's Chief Privacy Strategist</a>.</p> \n  <p>Visit <a rel=\"nofollow noopener noreferrer\" href=\"https://www.ca.com/us/products/api-management-accelerate.html?intcmp=headernav\" target=\"_blank\">CA's IoT resource hub</a> for more information on building a secure, scalable IoT strategy.</p>\n </div>\n</div>",
            "author": {
                "id": 79,
                "username": "CharlotteODonnelly",
                "reputation": 16
            },
            "lastEditedAction": 890,
            "activeRevisionId": 794,
            "revisionIds": [
                794
            ],
            "lastActiveUserId": 79,
            "lastActiveDate": 1547066891000,
            "originalParentId": 794,
            "attachments": [],
            "childrenIds": [],
            "commentIds": [],
            "marked": false,
            "topics": [
                {
                    "id": 579,
                    "creationDate": 1547066743000,
                    "creationDateFormatted": "01/09/2019 08:45 PM",
                    "name": "integration",
                    "author": {
                        "id": 49,
                        "username": "valhuber",
                        "reputation": 0
                    },
                    "usedCount": 9,
                    "getImmediateChildren": [],
                    "getParents": []
                }
            ],
            "primaryContainerId": 8,
            "containerIds": [
                7,
                8
            ],
            "slug": "iot-in-the-age-of-gdpr-3-tips-for-success",
            "wiki": false,
            "score": 0,
            "depth": 0,
            "viewCount": 0,
            "upVoteCount": 0,
            "downVoteCount": 0,
            "nodeStates": []
        }
    ]
}

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

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/806/comment.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/806/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/806/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/806/comment.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/806/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

Path Params

node_id
int32
required

question node example id

 

/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 under Standard Roles in the Advanced Editor to post a comment to any node.
    • You must also have the Publish [node type] permission under Standard Roles in the Advanced Editor 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 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 parameter, 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 to make a comment ("Testing API. Node comment text goes here.") sent to a node (nodeId: 806) 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":"Testing API. Node comment text goes here."}' "https://apidocs.cloud.answerhub.com/services/v2/node/806/comment.json" -v

Expected Response

Successful Response:

  • HTTP Status 201 - Created

Community User Interface Result

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/806/follow.json
var request = require("request");

var options = { method: 'PUT',
  url: 'https://apidocs.cloud.answerhub.com/services/v2/node/806/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/806/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/806/follow.json");

xhr.send(data);
import requests

url = "https://apidocs.cloud.answerhub.com/services/v2/node/806/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 under Standard Roles in the Advanced Editor.

  • In order to use the follower parameter, you must have the Edit users and groups permission under Site Administration Roles in the Advanced Editor.

    • The follower parameter specifies the user that will become a follower of the node.
    • The follower parameter, will be the user's userId.
  • This request was added in version 1.6.3.

Sample Request

A PUT make a user a node follower request to make the API authenticated user (userId: 7) a follower of a node (nodeId: 806) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl