API Documentation

Purpose

This document outlines the API methods available, the parameters they receive and the results returned. The objective is to give an overall view of the possibilities available for integration with the Answerbase System.

Authentication

All API methods require that the clients API key is passed as a url parameter (methodname.aspx?apikey=xxxxxxx).

API Structure: Rest

The API attempts to conform to the design principles of Representational State Transfer (REST). All methods are invoked via an HTTP Request and returns a result as either XML or JSON.

Http Status Codes

The API attempts to return appropriate HTTP status codes for every request:

  • 200 OK -- This status code will be returned when a successful request has been made.
  • 400 Bad Request -- This status code will be returned if there is an issue with the submitted data. An error message will also be included in the response.
  • 401 Not Authorized -- This status code will be returned if the API service is not enabled for the Answerbase site or if the incorrect credentials are submitted.
  • 500 Internal Server Error -- This status code will be returned if there is an error with the API.

Parameters

Encoding

All data should be UTF-8 encoded.

Dates

All dates are passed and returned in the following format:

m/d/y h:M:s

ex: 9/27/2008 9:35:47

Format

You can have the result returned as either XML or JSON by passing the parameter "format" with the request.
For example:
http://clientanswerssite.com/api/getquestionslist.aspx?format=xml
or
http://clientanswerssite.com/api/getquestionslist.aspx?format=json

General Notes

Categories and Tags

In the administration site of your Answerbase Q&A site you have the feature preference option to choose whether you want to use “categories” or “tags” in your site. There are a range of methods that accept both "categories" and "tags" as parameters, but depending on your preference setting, only one of these will be relevant for your site. Likewise many methods can return both <categories> and <tags> and while for consistency both of those xml nodes are always returned, only the relevant one for your site is populated with data.

SSO UserId

Previously all methods requiring a user as parameter only accepted “username” as the identifier, but we have now (from v.3.8) expanded those methods to also accept “userid” and “sso_userid” as parameters to identify a user. “Userid” refers to our internal Answerbase unique id (which is available in the API and also in the administration site) and “sso_userid” refers to sites that have Single Sign On integration and need to pass their own unique id to identify users in the Answerbase site.

Data Objects

The following are common data objects and their xml structure that the API methods return. In the methods described further below, these common objects are just referenced by their name, i.e. [Short Question].

User

<user>
username
id
sso_userid
displayName
firstname
lastname
title
organization
website
address
city
region
country
profileEmail
homeNumber
officeNumber
mobileNumber
faxNumber
facebookUrl
twitterUrl
linkedInUrl
googleUrl
points – earned within the specific timeframe and categories
totalRank
questionsAnswered
staffexpert
imageUrl
profileUrl
askQuestionUrl
topCategories
topTags
aboutMe
<customFields>
<field>
id
name
value

Example:

XML:
<user username="david" id="”4”" sso_userid=”xy878” displayName="goliath" firstname=”David” lastname=”Martinez” points="60" totalRank="5" questionsAnswered="0" staffexpert="true" expert=”false” imageUrl="http://xxx" profileUrl="http://xxx" topCategories=”Legal, Startups” topTags="" >

JSON:
"user": {
"@username": "david",
"@id": "4",
"@sso_userid": "xy878",
"@displayName": "goliath",
"@firstname": "David",
"@lastname": "Martinez",
"@points": "60",
"@totalRank": "5",
"@questionsAnswered": "0",
"@staffexpert": "true",
"@expert": "false",
"@imageUrl": "http://xxx/profileImage.jpg"
"@profileUrl": "http://xxx"
"@topCategories": "Legal, Startups"
"@topTags": ""
}

Short Question

<question>
id
answersCount
followerCount
url
publicationTime
lastUpdateTime
latestAnswerTime
status – open/closed
type – public/private
<title>
<details>
<author>
name
displayName
url
username
id
sso_userid
<topanswer>
id – internal Answerbase id
publicationtime
goodVotes
badVotes
<text>
source
[User]
<product>
name
sku
<followers>
<follower>
username
id
sso_userid

Example:

XML:
<question id="”2”" answersCount="3" url="http://xxx" publicationTime="11/27/2008 9:35:47 AM" latestAnswerTime="2/2/2009 11:25:38 AM" status="closed" type="public" …>
<title>I can’t figure out how to dig a hole?</title>
<details>I need help…</details>
<author id="”889”" name=”Paul Hanson” url=”http://xxx” username=”paul”>
<product name="Sweater1" sku="123457" />
<topanswer id="77" publicationTime="2/2/2009 10:18:47 AM" goodVotes="1" badVotes="0">
<text>the correct answer is 10</text>
[User]
</topanswer>
<followers>
<follower>
<username>usmith</username>
<id>240003</id>
<sso_userid></sso_userid>
</follower>
</followers>
</question>

JSON:
{
"question": {
"@id": "44777",
"@answersCount": "21",
"@url": "http://xxxx.answerbase.com/44777/What-is-an-average-CPU-Temperature-for-a-laptop-computer",
"@publicationTime": "4/21/2007 11:39:43 AM",
"@latestAnswerTime": "11/20/2013 5:06:52 PM",
"@status": "closed",
"@type": "public",
"title": "What is an average CPU Temperature for a laptop computer?",
"details": "I've been having some issues with my fans not turning on as often as they should so I downloaded a tool that lets me regulate them manually.",
"author": {
"@name": "",
"@url": "http://xxxx.answerbase.com/profile/sbjc23/",
"@username": "sbjc23",
"@id": "27916",
"@sso_userid": "15"
},
"categories": {
"category": [ {
"@name": "CPU Temp",
"@id": "44670",
"@externalId": "er44aa",
"@url": "http://xxxx.answerbase.com/Topic/CPU-Temp/44670"
} ]
},
"product": null,
"followers": {
"follower": [ {
"@username": "nidhi",
"@id": "28099",
"@sso_userid": "373",
} ]
}
"comments": null,
"attachments": null,
"answers": {
"answer": [ {
"@id": "44778",
"@publicationTime": "4/21/2007 3:01:00 PM",
"@goodVotes": "0",
"@badVotes": "0",
"text": "I dont know what kind of average to give. All depends on make/model of your CPU.",
"@source": "http://www.google.com",
"attachments": null,
"comments": null,
"user": {
"@username": "nidhi",
"@id": "28099",
"@sso_userid": "373",
"@points": "15295",
"@questionsAnswered": "329",
"@staffexpert": "false",
"@imageUrl": "http://xxxx.answerbase.com/images/avatar_01.jpg"
}
} ]
}
}
}

Standard Api Methods

Get Questions List

Returns a list of questions based on a range of parameters.

URL: http://clientanswerssite.com/api/getquestionslist.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • keyword (optional): can be a single keyword or a group of keywords. The keywords will be searched for within the question title and description.
  • closed (optional): “true”, “false”
  • type (optional): “public”, “private” ("public" is default if nothing is specified)
  • withanswers (optional): “true”, “false”
  • withstaffanswers (optional): “true”, “false”
  • productsku (optional): SKU of the related product
  • contentUrl (optional): identify the related content URL to pull questions associated with that specific URL through the “Related Content” features.
  • username or sso_userid or userid or useremail (optional): Filters by the author of the questions. Username, userid and useremail are the Answerbase values, sso_userid is the clients own userid
  • questionIds (optional): one or more question IDs, separated by a comma
  • orderby (optional):
    • “newest”: sorts with the newest published questions first.
    • “toprated”: sorts the questions based on the amount of votes the answers have received. The highest amount of votes is first.
    • “closetime”: sorts with the most recently closed questions first.
    • “mostpopular”: sorts by number of views all time with the highest first.
    • “recentlypopular”: sorts by number of views within the last 30 days with the highest first.
    • “recentlyactive”: sorts with the most recently active questions first (where active means having comments or answers published).
    • “recentlyanswered”: sorts with the most recently answered questions first.
  • startindex (optional): the starting element to be returned (useful for paging). 0 = the first element
  • maxresults (optional): the maximum amount of results returned. 0 = all results.
  • fullquestiondetails (optional): if "true", returns full details of each question including the question as well as all answers, comments and attachments ("false" is default if nothing is specified)
  • includeUnpublishedAnswers (optional): "false" is default
  • includeUnpublishedComments (optional): "false" is default
  • categoryoperator (optional): "AND"/"OR", defines if multiple categories/tags have to be associated with the questions with ALL or ANY category/tag. ("AND" is default)

Example:

getquestionslist.aspx?keyword=price&orderby=toprated

Returns:

A list of questions and for each question the best answer if any exists and the related expert. Also a collection of the categories that were used as criteria is returned along with their respective url’s. If the Full Questions Details parameter is specified and its value is "true", the ShortQuestion structure will be extended to include comments, answers, attachments, and related contents (the topAnswer element will not be present).

<searchresult>
<categories>
<category>
name
id
externalId
url
questionscount
<questions>
totalCount
[Short Question]

Example:

<?xml version="1.0" encoding="utf-8"?>
<searchResult>
<categories>
<category name="Employees" id="1" externalId="yt552" url=" http://xxx " />
</categories>
<questions totalCount="19">
[ShortQuestion]
[ShortQuestion][…]
</questions>
</searchResult>

Search Questions

Returns a list of questions that matches the parameters passed. Contrary to the GetQuestionsList method, this method uses the search index, not the database directly, and takes into account similarities, typing errors, keyword proximity etc.

URL: http://clientanswerssite.com/api/searchquestions.aspx

Method: GET

Parameters:

  • keywords (required): can be a single keyword or a group of keywords. The keywords will be searched for within the question title and description.
  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • closed (optional): “true”, “false”
  • staffanswersfirst (optional): “true”, “false” - sort the results with the questions with staff answers first
  • searchanswers (optional): “true”, “false” - include the answers as base of the similarity score
  • mostrecentfirst (optional): “true”, “false” - sort the results with the most recent questions first. If "staffanswersfirst" is set, that has precedence.
  • startindex (optional): the starting element to be returned (useful for paging). 0 = the first element
  • maxresults (optional): the maximum amount of results returned. If set to 0, 500 results are returned.

Example:

searchquestions.aspx?keywords=price&closed=true&maxresults=5

Returns:

A list of questions and for each question the best answer if any exists and the related expert.

<searchresult>
<questions>
totalCount
[Short Question]

Example:

<?xml version="1.0" encoding="utf-8"?>
<searchResult>
<questions totalCount="19">
[ShortQuestion]
[ShortQuestion][…]
</questions>
</searchResult>

Get Similar Questions

Returns a list of questions similar to the keywords passed, based on a range of parameters. This method uses the search index, not the database directly, and takes into account similarities, typing errors, keyword proximity etc.

URL: http://clientanswerssite.com/api/getsimilarquestions.aspx

Method: GET

Parameters:

  • keywords (required): can be a single keyword or a group of keywords. The keywords will be searched for within the question title and description.
  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • closed (optional): “true”, “false”
  • withanswers (optional): “true”, “false”
  • staffanswersfirst (optional): “true”, “false” - sort the results with the questions with staff answers first
  • searchanswers (optional): “true”, “false” - include the answers as base of the similarity score
  • maxresults (optional): the maximum amount of results returned. If set to 0, 50 results will be returned.

Example:

getsimilarquestions.aspx?keywords=price&closed=true&maxresults=5

Returns:

A list of questions and for each question the best answer if any exists and the related expert.

<searchresult>
<questions>
totalCount
[Short Question]

Example:

<?xml version="1.0" encoding="utf-8"?>
<searchResult>
<questions totalCount="19">
[ShortQuestion]
[ShortQuestion][…]
</questions>
</searchResult>

Get Question

Returns the question details for the questionid provided.

URL: http://clientanswerssite.com/api/getquestion.aspx

Method: GET

Parameters:

  • questionid: the id of the question.
  • includeUnpublishedAnswers (optional): “true”, “false” - include unpublished answers ("false" is default if nothing is specified).

Returns:

question with all the answers associated.

<question>
id
answersCount
url
publicationTime
latestAnswerTime
status - open/closed
type - public/private
<title>
<details>
<author>
id
name
url
username
sso_userid
[USER]
<categories>
<category>
name
id
externalId
url
questionscount
<tags>
<tag>
name
id
externalId
url
questionscount
<attachments>
<attachment>
name
fileurl
<product>
name
sku
<comments>
<comment>
Id – internal Answerbase id
publicationtime
goodVotes
<text>
[User]
<contents>
<content>
id – internal Answerbase id
title
url
viewCount
clickCount
clickRate
<answers>
<answer>
id – internal Answerbase id
published
publicationtime
isBestAnswer
goodVotes
badVotes
source
<text>
[User]
<attachments>
<attachment>
name
fileurl
<comments>
<comment>
Id – internal Answerbase id
publicationtime
goodVotes
<text>
[User]

Get Featured Question

Returns a random featured question associated with one or more of the categories. If no categories are specified, the random question will be picked from the entire pool of featured questions.

URL: http://clientanswerssite.com/api/getfeaturedquestion.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.

Returns:

A question with the top answer (if any) and the related expert.

<question>
id
answersCount
followerCount
url
publicationTime
latestAnswerTime
status - open/closed
type - public/private
<title>
<details>
<author>
<categories>
<category>
name
id
externalId
url
questionscount
<tags>
<tag>
name
id
externalId
url
questionscount
<product>
name
sku
<comments>
<comment>
Id – internal Answerbase id
publicationtime
goodVotes
<text>
[User]
<attachments>
<attachment>
name
fileurl <topanswer>
id – internal Answerbase id
publicationtime
goodVotes
badVotes
<text>
[User]

<comments>
<comment>
Id – internal Answerbase id
publicationtime
goodVotes
<text>
[User]

Get Featured Questions

Returns all the featured questions related to the specified categories/tags, product, and/or content URL. If no categories, product or content URL are passed, all featured questions in the database will be returned.

URL: http://clientanswerssite.com/api/getfeaturedquestions.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • productsku (optional): SKU of the related product
  • contentUrl (optional): the URL of a related content.
  • orderby (optional):
    • “random”: the result should be random from all featured questions, the default is by the questions publication date in reverse chronological order.
    • “mostpopular”: sorts by number of views all time with the highest first.
    • “recentlypopular”: sorts by number of views within the last 30 days with the highest first.
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getfeaturedquestions.aspx?categories=law,economy&maxresults=5&orderby=random

Returns:

A list of questions and for each question the best answer if any exists and the related expert. Also a collection of the categories that were used as criteria is returned along with their respective url’s.

<searchResult>
<categories>
<category>
name
id
externalId
url
questionscount
<questions>
totalCount
[Short Question]

Get Updated Questions

Returns all the questions that have been changed since the “asOfDate”. A list of deleted questions can be included. This method can be used when the client wants to maintain a search index of all the questions.

URL: http://clientanswerssite.com/api/getupdatedquestions.aspx

Method: GET

Parameters:

  • productsku (optional): SKU of the related product
  • asofdate (optional): the date since which the questions have been updated.
  • showdeleted (optional): “true”, “false”. If not specified it defaults to “no”. Deleted questions will only include the question id and the “<deleted>true</deleted>” node. The parameter “asofdate” is required if “showdeleted” is used.
  • username or sso_userid or userid (optional): This parameter allows you to narrow the questions that have been changed since the “asOfDate” to those asked by a user you specify here. The username and userid are the Answerbase values, sso_userid is the clients own userid. This does not control the list of deleted questions which will return all questions deleted since the asofdate.

Example:

getupdatedquestions.aspx?asofdate=12/24/2009&showdeleted=true

Returns:

A list of questions and for each question the best answer if any exists and the related expert. The question data are only returned if the question has not been deleted.

<questions>
totalCount
[Short Question]
[or]<question>
id

<deleted> - true/false

Get Recently Viewed Questions By User

Returns a list of questions that the specific user has visited recently. Only the questions viewed when the user is logged in are registered.

URL: http://clientanswerssite.com/api/getquestionsviewedbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getquestionsviewedbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions Asked By User

Returns all the questions asked by the user sorted by publication time (most recent first).

URL: http://clientanswerssite.com/api/getquestionsaskedbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.
  • open (optional): “true”, “false”
  • type (optional): “public”, “private” ("public" is default if nothing is specified)

Example:

getquestionsaskedbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions Answered By User

Returns all the questions answered by the user, with the most recently answered questions first.

URL: http://clientanswerssite.com/api/getquestionsansweredbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getquestionsansweredbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions with Highest Rated Answers By User

Sorts all the answers by the user by the ratings they have received, highest first, and returns a list of questions the answers were posted for.

URL: http://clientanswerssite.com/api/getquestionswithhighestratedanswersbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getquestionswithhighestratedanswersbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions Followed By User

Returns the questions the user is currently following.

URL: http://clientanswerssite.com/api/getquestionswatchedbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid

Example:

getquestionswatchedbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions Commented By User

Returns all the questions commented by the user or questions where answers have been commented by the user.

URL: http://clientanswerssite.com/api/getquestionscommentedbyuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getquestionscommentedbyuser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Questions Asked Directly to User

Returns all the questions asked directly to the user.

URL: http://clientanswerssite.com/api/getquestionsaskeddirectlytouser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • maxresults (optional): the maximum amount of results returned. 0 = all results.

Example:

getquestionsaskeddirectlytouser.aspx?username=patrick

Returns:

A list of questions

<questions>
totalCount
[Short Question]

Get Answer

Returns a specific answer.

URL: http://clientanswerssite.com/api/getanswer.aspx

Method: GET

Parameters:

  • answerid – the Answerbase internal id

Example:

getanswer.aspx?answerid=22

Returns:

An answer with the related question and the expert that posted the answer.

<answer>
id
published
publicationTime
isBestAnswer
goodVotes
badVotes
<text>
[User]
<question>
answersCount
url
status - open/closed
<title>
<description>
[User]
<attachments>
<attachment>
name
fileurl
<comments>
<comment>
Id – internal Answerbase id
publicationtime
goodVotes
<text>
[User]

Example:

<answer published="true" publicationTime="7/14/2008 1:00:52 PM" goodVotes="0" badVotes="0">
<text>This is 10</<text>
<question answersCount="1" url="http://xxx" status="closed">
<title>What is 3 + 7?</title>
</question>
[User]
<comments>
<comment id="180" publicationTime="8/19/2011 11:57:07 AM" goodVotes="1">
<text>I agree with you</text>
[User]
</<comment>
</comments>
</answer>

Get Comment

Returns a specific comment.

URL: http://clientanswerssite.com/api/getcomment.aspx

Method: GET

Parameters:

  • commentid – the Answerbase internal id

Example:

getcomment.aspx?commentid=22

Returns:

A comment with the related question or answer and the member that posted the comment.

<comment>
publicationTime
goodVotes
<text>
<relatedPost>
id
url
type – (question/answer)
[User]

Example:

<comment publicationTime="7/14/2008 1:00:52 PM" likes="3">
<text>Could you please expand on that? </text>
<relatedPost id="”71662”" url="http://xxx" type=”answer” />
[User]
</comment>

Get Top Experts

Returns the experts that earned most points within the specified parameters. If no parameters are specified, the overall top experts are returned. The experts are sorted by highest points first.

URL: http://clientanswerssite.com/api/gettopexperts.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • fromdate (optional)
  • todate (optional)
  • featured (optional)
  • startindex (optional): the starting element to be returned (useful for paging). 0 = the first element
  • maxresults (optional)

Example:

gettopexperts.aspx?categories=marketing&fromdate=9/22/2008&todate=12/5/2009&featured=no

Returns:

A list of users

<users>
totalCount
[USER]

Example:

<users totalCount="3">
<user username="david" id="”4”" sso_userid=”xy878” displayName="goliath" firstname=”David” lastname=”Martinez” points="60" questionsAnswered="0" staffexpert="true" expert=”false” imageUrl="http://xxx" profileUrl="http://xxx" topCategories=”Legal, Startups” >
<customFields>
<field id="53" name="Area of Expertise" value="Economy" />
</customFields>
</user>
<user username="joshua" firstname=”Josh” lastname=”Lopez” points="0" questionsAnswered="1" staffexpert="false" expert=”false” imageUrl="xxx" profileUrl="http://xxx" topCategories=”Legal, Startups” >
<customFields>
<field id="53" name="Area of Expertise" value="Literature" />
</customFields>
</user>
</users>

Get Staff Experts

Returns a list of users with the Staff Expert role associated.

URL: http://clientanswerssite.com/api/getstaffexperts.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • maxresults (optional)

Example:

getstaffexperts.aspx?categories=marketing&maxresults=5

Returns:

A list of users

<users>
totalCount
[USER]

Get User

Returns a user with the specified username, id or sso id.

URL: http://clientanswerssite.com/api/getuser.aspx

Method: GET

Parameters:

  • username or sso_userid or userid or useremail (required): username, userid and useremail are the Answerbase values, sso_userid is the clients own userid

Example:

getuser.aspx?username=patrick

Returns:

A user with a list of categories he/she earned points in.

<user>
username
id
sso_userid
displayName
firstname
lastname
title
organization
website
address
city
region
country
profileEmail
homeNumber
officeNumber
mobileNumber
faxNumber
facebookUrl
twitterUrl
linkedInUrl
googleUrl
points - the total points balance
questionsAnswered
totalRank - the overall rank based on the total points
staffexpert
imageUrl
profileUrl
askQuestionUrl
aboutMe
<customFields>
<field>
id
name
value
<categories>
<category>
name
id
externalId
url
questionscount
points – earned within this category
<tags>
<tag>
name
id
externalId
url
questionscount
points – earned within this tag
<badges>
<badge>
id
name
date

Example:

<user username="david" id="”4”" sso_userid=”xy878” firstname=”David” lastname=”Martinez” title=”IT Manager” website=”http://xxx” organization="" address="" city="Barcelona" region="" country="Spain" profileEmail=”davidm@test.com” homeNumber=”9876543” officeNumber=”9876543” mobileNumber=”9876543” faxNumber=”9876543” facebookUrl="" twitterUrl="" linkedInUrl="" googleUrl="" points="0" questionsAnswered="0" totalRank="2" staffexpert="true" expert=”false” imageUrl="http://xxx" profileUrl="http://xxx" askQuestionUrl="http://xxx" >
<aboutMe></aboutMe>
<customFields>
<field id="53" name="Area of Expertise" value="Economy" />
</customFields>
<categories>
<category name="Cooking" points="50" />
<category name="Economy" points="30" />
<category name="IT" points="10" />
</categories>
<tags>
<tag name="Spicy" points="50" />
<tag name="Cheap" points="30" />
</categories>
<badges>
<badge id="1962" name="Contributor" date="10/23/2013 12:55:35 PM" />
<badge id="1964" name="Knowledgeable" date="3/14/2013 10:13:07 PM" />
</badges>
</user>

Get User Point Summary

Returns the point details for a user with the specified username.

URL: http://clientanswerssite.com/api/getuserpoints.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid

Example:

getuserpoints.aspx?username=patrick

Returns:

A user with the different points he/she has earned.

<user>
username
totalPoints
thumbUpPoints
bestAnswerPoints
askQuestionPoints
answerQuestionPoints
votingPoints
systemPoints

Example:

<user username="david" totalPoints=”580” thumbUpPoints=”0” bestAnswerPoints=”25” askQuestionPoints=”-15” answerQuestionPoints=”10” votingPoints=”35” systemPoints=”525” > </user>

Get User Subscriptions

Returns the list of categories or tags that the user is subscribed to.

URL: http://clientanswerssite.com/api/getusersubscriptions.aspx

Method: GET

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid

Example:

getusercategorysubscriptions.aspx?username=patrick

Returns:

A user with a list of categories or tags he/she is subscribed to.

<user>
username
<categories>
<category>
name
id
externalId
url
questionscount
<tags>
<tag>
name
id
externalId
url
questionscount

Example:

<user username="david">
<categories>
<category name="Cooking" />
<category name="Economy" />
<category name="IT" />
</categories>
<tags>
<tag name="Cheap" />
<tag name="Funny" />
</tags>
</user>

Get Users

Searches for users matching the criteria passed. The result is ordered by the users total points earned descending.

URL: http://clientanswerssite.com/api/getusers.aspx

Method: GET

Parameters:

  • keywords (optional): matches username, id, firstname or lastname
  • startindex (optional): the starting element to be returned (useful for paging). 0 = the first element
  • maxresults (optional)

Example:

getusers.aspx?keywords=mark&maxresults=20

Returns:

A list of users

<users>
totalCount
[USER]

Example:

<users totalCount="3">
<user username="david" id="”4”" sso_userid=”xy878” firstname=”David” lastname=”Martinez” ”title=”IT Manager” website=”http://xxx” organization="" address="" city="Barcelona" region="" country="Spain" profileEmail=”davidm@test.com” homeNumber=”9876543” officeNumber=”9876543” mobileNumber=”9876543” faxNumber=”9876543” facebookUrl="" twitterUrl=”https://twitter.com/davidmartinez” linkedInUrl="" googleUrl="" points="60" questionsAnswered="0" staffexpert="true" imageUrl="http://xxx" profileUrl="http://xxx" topCategories=”Legal, Startups” >
<customFields>
<field id="53" name="Area of Expertise" value="Economy" />
</customFields>
</user>
<user username="joshua" id="”5”" sso_userid=”hg773” firstname=”Josh” lastname=”Lopez” ” title=”IT Manager” website=”http://xxx” organization="" address="" city="Barcelona" region="" country="Spain" profileEmail=”davidm@test.com” homeNumber=”9876543” officeNumber=”9876543” mobileNumber=”9876543” faxNumber=”9876543” facebookUrl="" twitterUrl=”https://twitter.com/davidmartinez” linkedInUrl="" googleUrl="" points="0" questionsAnswered="1" staffexpert="false" imageUrl="xxx" profileUrl="http://xxx" topCategories=”Legal, Startups” >
<customFields>
<field id="53" name="Area of Expertise" value="IT" />
</customFields>
</user>
</users>

Get Featured Expert

Returns a random featured expert related to at least one of the categories passed. If no categories are specified, then the expert will be chosen from the entire pool of featured experts.

URL: http://clientanswerssite.com/api/getfeaturedexpert.aspx

Method: GET

Parameters:

  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.

Example:

getfeaturedexpert.aspx?categories=economy,financing

Returns:

A user with a list of categories he/she earned points in.

<user>
username
id
sso_userid
firstname
lastname
title
organization
website
address
city
region
country
profileEmail
homeNumber
officeNumber
mobileNumber
faxNumber
facebookUrl
twitterUrl
linkedInUrl
googleUrl
points - the total points balance
questionsAnswered
totalRank - the overall rank based on the total points
staffexpert
imageUrl
profileUrl
askQuestionUrl
aboutMe
<customFields>
<field>
id
name
value
<categories>
<category>
name
id
externalId
url
questionscount
points – earned within this category
<tags>
<tag>
name
id
externalId
url
questionscount
points – earned within this tag

Get Categories

Returns a list of categories.

URL: http://clientanswerssite.com/api/getcategories.aspx

Method: GET

Parameters:

  • restrictToFirstLevel (optional): if set to "true" returns only one level of categories, without the child categories associated
  • orderby (optional): "adminorder" - orders by the order set by the administrators. "questionscount" - orders by the amount of questions associated to each category.
  • maxresults (optional)

Example:

getcategories.aspx?maxresults=10&restrictToFirstLevel=true&orderby=questionscount

Returns:

A collection of categories and childcategories (if they exist).

<categories>
<category>
name
id
externalId
url
questionscount
<childCategories>
<category>
name
id
externalId
url
questionscount
<childCategories />
<category>
name
id
externalId
url
questionscount
<childCategories />

Get Category

Returns the requested category.

URL: http://clientanswerssite.com/api/getcategory.aspx

Method: GET

Parameters:

  • Use one of these (mandatory):
    • categoryid: the answerbase category id
    • categoryExternalId: the clients own category id

Example:

getcategory.aspx?categoryid=10851

Returns:

A category.

<category>
name
id
externalId
url
questionscount
<childCategories />

Get Tags

Returns a list of tags.

URL: http://clientanswerssite.com/api/gettags.aspx

Method: GET/POST

Parameters:

  • orderby (optional): "adminorder" - orders by the order set by the administrators. "questionscount" - orders by the amount of questions associated to each tags.
  • maxresults (optional)

Example:

gettags.aspx?maxresults=10&orderby=questionscount

Returns:

A collection of tags.

<tags>
<tag>
name
id
externalId
url
questionscount

Get Tag

Returns the requested category.

URL: http://clientanswerssite.com/api/gettag.aspx

Method: GET/POST

Parameters:

  • Use one of these (mandatory):
    • tagid: the answerbase tag id
    • tagExternalId: the clients own tag id

Example:

gettag.aspx?tagid=10851

Returns:

A tag.

<tag>
name
id
externalId
url
questionscount

Search Tags

Returns a list of tags.

URL: http://clientanswerssite.com/api/searchtags.aspx

Method: GET

Parameters:

  • keywords (optional): can be a single keyword or a group of keywords.
  • maxresults (optional)

Example:

searchtags.aspx?maxresults=10

Returns:

A collection of tags.

<tags>
<tag>
name
id
url
questionscount

Advanced API Methods

Ask Question

Allows a question to be submitted to the application.

URL: http://clientanswerssite.com/api/askquestion.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • question (required): the question title text (max. 150 characters)
  • details (optional) – the question body text
  • type (optional) – public/private
  • expertAskedUsername (optional) – the expert’s username in Answerbase
  • questionexternalurl (optional) – for sites using Answerbase via API only, this can be set so that notifications going out, lead the users to the correct question url.
  • publishDateTime (optional) – the specific time the question was posted. Format: YYYY-MM-DD hh:mm
  • attachments (optional) – files related to the question. These are read from the “Request.Files” collection.
  • productsku (optional) - SKU of the related product (max. 100 characters length)

Returns:

The question id of the created question

<question>
Id
Url

Register User

Allows a user to be registered in the application.

URL: http://clientanswerssite.com/api/registeruser.aspx

Method: POST

Parameters:

  • username (required): the username for the user (recommended max. 30 characters length)
  • password (required): the password for the user
  • email (required): the email for the user
  • firstName (optional): the first name of the user
  • lastName (optional): the last name of the user
  • displayName (optional): the display name of the user
  • aboutMe (optional): the profile for the user
  • title (optional): the title of the user
  • organization (optional): the organization or company for the user
  • address (optional): the address of the user
  • city (optional): the city of the user
  • region (optional): the region of the user
  • country (optional): the country of the user
  • website (optional): the website for the user
  • askDirectlyAllowed (optional): whether the user can be asked questions directly - “true”, “false”
  • profileEmail (optional): the profile email for the user
  • homeNumber (optional): the home telephone number for the user
  • officeNumber (optional): the office telephone number for the user
  • mobileNumber (optional): the mobile telephone number for the user
  • faxNumber (optional): the fax number for the user
  • facebookUrl (optional): the Facebook URL for the user
  • twitterUrl (optional): the Twitter URL for the user
  • linkedInUrl (optional): the LinkedIn URL for the user
  • googleUrl (optional): the Google URL for the user
  • customField[FIELD-ID] (optional): the value for the custom profile field whose ID is [FIELD-ID] (parameter name example: "customField54"). You can find the appropriate Field ID in the General Settings of your admin site, by hovering over the custom field name.
  • sso_userId (optional): the client SSO unique user id
  • externalProfileImageUrl (optional): A url linking to the users profile image (if not managed on Answerbase)

Returns:

The user id of the created user

<user>
Id

Remove Followed Question

Allows a followed question to be deleted from a specified users list.

URL: http://clientanswerssite.com/api/removewatchedquestion.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • questionId (required): the Id of the question.

Returns:

Nothing is returned from this method.

Add User Subscriptions

Adds category or tag subscriptions for a user.

URL: http://clientanswerssite.com/api/addusersubscriptions.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • for products, use one of these (optional):
    • products: one or more product names, separated by commas
    • productIds: one or more product IDs, separated by commas.
    • productExternalIds: one or more product external IDs, separated by commas.
    • productskus: one or more product SKUs, separated by commas.

Returns:

Nothing is returned from this method.

Remove User Subscriptions

Removes a user’s specified category or tag subscriptions.

URL: http://clientanswerssite.com/api/removeuserubscriptions.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • for categories, use one of these (optional):
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these (optional):
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • for products, use one of these (optional):
    • products: one or more product names, separated by commas
    • productIds: one or more product IDs, separated by commas.
    • productExternalIds: one or more product external IDs, separated by commas.
    • productskus: one or more product SKUs, separated by commas.

Returns:

Nothing is returned from this method.

Report Question

Allows a question to be flagged for review.

URL: http://clientanswerssite.com/api/reportquestion.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • questionId (required): the Id of the question.

Returns:

Nothing is returned from this method.

Report Answer

Allows an answer to be flagged for review.

URL: http://clientanswerssite.com/api/reportanswer.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • answerId (required): the Id of the answer.

Returns:

Nothing is returned from this method.

Report Comment

Allows a comment to be flagged for review.

URL: http://clientanswerssite.com/api/reportcomment.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • commentId (required): the Id of the comment.

Returns:

Nothing is returned from this method.

Post Answer

Allows an answer to be submitted to the application.

URL: http://clientanswerssite.com/api/postanswer.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • questionId (required): the Id of the question
  • answer (required): the answer text
  • source (optional): the answer source text
  • staffAnswer (optional): “true”, “false”
  • attachments (optional): files related to the answer. These are read from the “Request.Files” collection.
  • publishDateTime (optional) – the specific time the answer was posted. Format: YYYY-MM-DD hh:mm

Returns:

The answer id of the posted answer

<answer>
Id

Post Comment

Allows a comment to be submitted to the application.

URL: http://clientanswerssite.com/api/postcomment.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • postId (required): the Id of the question or answer that the comment is related to.
  • comment (required): the comment text
  • published (optional): “true”, “false” ("true" is default if nothing is specified)
  • publishDateTime (optional) – the specific time the comment was posted. Format: YYYY-MM-DD hh:mm

Returns:

The comment id of the posted comment

<comment>
Id

Post Related Content

Allows you to associate “related content” to specific questions.

URL: http://clientanswerssite.com/api/postrelatedcontent.aspx

Method: POST

Parameters:

  • postId (required): the Id of the question that the content is related to.
  • contentTitle (required): the title to be used for the “related content” link
  • contentUrl (required): the destination URL to be used for the “related content” link

Returns:

The id of the posted content

<content>
Id

Post Image

Allows you to post an image to be used in new questions or answers.

URL: http://clientanswerssite.com/api/postimage.aspx

Method: POST

Parameters:

  • image (required): image file. It will be read from the “Request.Files” collection.
  • imageWidth (optional): if specified, the image will be resized based on given width.
  • imageHeight (optional): if specified, the image will be resized based on given height

Returns:

The url of the posted image

<url>http://.../Image-1-10030059.jpg</url>

Vote Answer

Allows a user to vote for an answer.

URL: http://clientanswerssite.com/api/voteanswer.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • answerId (required): the Id of the answer
  • rating (required): the rating assigned to the answer – “1”, “-1”

Returns:

The result of the vote, whether it was successful or not.

<result>
voteAccepted (true/false)
message (the reason for why the vote was not accepted)
errorCode (the error code for why the vote was not accepted: 0 = Accepted, 2 = The user cannot vote on his/her own answer)

Vote Comment

Allows a user to vote for a comment. Only positive votes (likes) are allowed.

URL: http://clientanswerssite.com/api/votecomment.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • commentId (required): the Id of the comment
  • rating (required): the rating assigned to the comment – “1”

Returns:

The result of the vote, whether it was successful or not.

<result>
voteAccepted (true/false)
message (the reason for why the vote was not accepted)
errorCode (the error code for why the vote was not accepted: 0 = Accepted, 1 = The user has already submitted a vote for this comment)

Update Question

Allows a question to be updated.
Note that the categories/tags passed replace the existing associated categories/tags, so they need to be passed even if they aren't updated as otherwise they will be removed from the question.

URL: http://clientanswerssite.com/api/updatequestion.aspx

Method: POST

Parameters:

  • questionid: the id of the question.
  • for categories, use one of these:
    • categories: one or more category names, separated by commas.
    • categoryIds: one or more category IDs, separated by commas.
    • categoryExternalIds: one or more category external IDs, separated by commas.
  • for tags, use one of these:
    • tags: one or more tag names, separated by commas
    • tagIds: one or more tag IDs, separated by commas.
    • tagExternalIds: one or more tag external IDs, separated by commas.
  • question (optional): the question title text
  • details (optional) – the question body text
  • type (optional) – public/private
  • questionexternalurl (optional) – for sites using Answerbase via API only, this can be set so that notifications going out, lead the users to the correct question url.
  • productsku (optional) - SKU of the related product
  • closed (optional): “true”, “false” - change the open/close status of the question
  • publishDateTime (optional) – the specific time the question was posted. Format: YYYY-MM-DD hh:mm

Returns:

Nothing is returned from this method.

Update Answer

Allows an answer to be updated.

URL: http://clientanswerssite.com/api/updateanswer.aspx

Method: POST

Parameters:

  • answerid: the id of the answer.
  • answer (optional): the answer text
  • source (optional): the answer source text
  • staffAnswer (optional): “true”, “false”
  • published (optional): “true”, “false”
  • selectAsBest (optional): “true”, this can not be undone
  • publishDateTime (optional) – the specific time the answer was posted. Format: YYYY-MM-DD hh:mm

Returns:

Nothing is returned from this method.

Update Comment

Allows a comment to be updated.

URL: http://clientanswerssite.com/api/updatecomment.aspx

Method: POST

Parameters:

  • commentid (required): the Answer internal id
  • comment (optional): the comment text
  • published (optional): “true”, “false”
  • publishDateTime (optional) – the specific time the comment was posted. Format: YYYY-MM-DD hh:mm

Returns:

Nothing is returned from this method.

Update User Data

Allows a user’s data to be updated.

URL: http://clientanswerssite.com/api/updateuserdata.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • email (optional): the email for the user
  • password (optional): the users password
  • firstName (optional): the first name of the user
  • lastName (optional): the last name of the user
  • displayName (optional): the display name of the user
  • aboutMe (optional): the profile for the user
  • title (optional): the title of the user
  • organization (optional): the organization or company for the user
  • address (optional): the address of the user
  • city (optional): the city of the user
  • region (optional): the region of the user
  • country (optional): the country of the user
  • website (optional): the website for the user
  • askDirectlyAllowed (optional): whether the user can be asked questions directly - “true”, “false”
  • profileEmail (optional): the profile email for the user
  • homeNumber (optional): the home telephone number for the user
  • officeNumber (optional): the office telephone number for the user
  • mobileNumber (optional): the mobile telephone number for the user
  • faxNumber (optional): the fax number for the user
  • facebookUrl (optional): the Facebook URL for the user
  • twitterUrl (optional): the Twitter URL for the user
  • linkedInUrl (optional): the LinkedIn URL for the user
  • googleUrl (optional): the Google URL for the user
  • customField[FIELD-ID] (optional): the value for the custom profile field whose ID is [FIELD-ID] (parameter name example: "customField54"). You can find the appropriate Field ID in the General Settings of your admin site, by hovering over the custom field name.
  • externalProfileImageUrl (optional): A url linking to the users profile image (if not managed on Answerbase)

Returns:

Nothing is returned from this method.

Update User Permissions

Allows a user’s permissions to be updated.

URL: http://clientanswerssite.com/api/updateuserpermissions.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • grantedAccess (optional): sets the access permission for the user
  • postQuestionsAllowed (optional): allows the user to post questions
  • postAnswersAllowed (optional): allows the user to post answers
  • allowLinks (optional): allows the user to submit content with external links
  • allowLinksFollow (optional): allow the links that the user submits within content to be followed by search engines
  • featured (optional): features the user
  • visibleOnLists (optional): allows the user to be shown on the leaderboards and lists
  • allowPublicProfile (optional): allows the user to have a public profile page
  • isTrusted (optional): identify this user as a trusted member for anti-spam purposes
  • allowDirectQuestions (optional): allows the user to receive direct questions by other users on the system

Returns:

Nothing is returned from this method.

Update Email Settings

Allows you to update the email notification settings for each user.

URL: http://clientanswerssite.com/api/updateuseremailsettings.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • answerNewAnswersNotification (optional): Indicates whether the user will receive an email notification if an new answer is submitted to a question which has been answered by the user - “true”, “false”
  • questionNewAnswersNotification (optional): Indicates whether the user will receive an email notification if an new answer is submitted to a question that has been asked by the user - “true”, “false”
  • answerAcceptedNotification (optional): Indicates whether the user will receive an email notification if an answer submitted by the user is selected as the “best” answer - “true”, “false”
  • watchedQuestionsNotification (optional): Indicates whether the user will receive an email notification if a question they are following receives a new answer - “true”, “false”
  • questionCommentsAfterNotification (optional): Indicates whether the user will receive an email notification if a comment is submitted to a question the user has commented on - “true”, “false”
  • questionNewCommentsNotification (optional): Indicates whether the user will receive an email notification if the users question receives a comment - “true”, “false”
  • answerCommentsAfterNotification (optional): Indicates whether the user will receive an email notification if a comment is submitted to an answer the user has commented on - “true”, “false”
  • answerNewCommentsNotification (optional): Indicates whether the user will receive an email notification if an answer by the user receives a new comment - “true”, “false”
  • watchedQuestionsNewCommentsNotification (optional): Indicates whether the user will receive an email notification if a question they are following receives a new comment - “true”, “false”
  • questionNewAnswerCommentsNotification (optional): Indicates whether the user will receive an email notification if a comment is submitted to an answer of a question the user has asked - “true”, “false”

Returns:

Nothing is returned from this method.

Follow Question

Allows a user to follow the specified question.

URL: http://clientanswerssite.com/api/watchquestion.aspx

Method: POST

Parameters:

  • username or sso_userid or userid (required): username and userid are the Answerbase values, sso_userid is the clients own userid
  • questionId (required): the Id of the question

Returns:

Nothing is returned from this method.

Log Pageview

Logs a pageview for the specified question.

URL: http://clientanswerssite.com/api/logpageview.aspx

Method: POST

Parameters:

  • questionId (required): the Id of the question
  • username or sso_userid or userid (optional): username and userid are the Answerbase values, sso_userid is the clients own userid
  • pagename (optional): the name or url of the page
  • querystring (optional)
  • referrer (optional)
  • ipaddress (optional)
  • useragent (optional)

Returns:

Nothing is returned from this method.

Log Pageview

Logs a pageview for the specified question.

URL: http://clientanswerssite.com/api/logpageview.aspx

Method: POST

Parameters:

  • questionId (required): the Id of the question
  • username or sso_userid or userid (optional): username and userid are the Answerbase values, sso_userid is the clients own userid
  • pagename (optional): the name or url of the page
  • querystring (optional)
  • referrer (optional)
  • ipaddress (optional)
  • useragent (optional)

Returns:

Nothing is returned from this method.

Log Pageview

Logs a pageview for the specified question.

URL: http://clientanswerssite.com/api/logpageview.aspx

Method: POST

Parameters:

  • questionId (required): the Id of the question
  • username or sso_userid or userid (optional): username and userid are the Answerbase values, sso_userid is the clients own userid
  • pagename (optional): the name or url of the page
  • querystring (optional)
  • referrer (optional)
  • ipaddress (optional)
  • useragent (optional)

Returns:

Nothing is returned from this method.

Change Log

Last Revised: Feb. 20th, 2019

Version 6.3 (No breaking changes)

Version 6.2 (No breaking changes)

Version 6.1 (No breaking changes)

  • Update the method Register User to return the user id after succesfull creation.
  • Fixed a bug where the Get User method would not return the user if it wasn't granted access.

Version 6.0 (Breaking changes)

  • Added the method Update User Permissions to manage the users personal settings.
  • Added the methods Get Tag, Get Tags
  • Method Get Answer was updated adding the properties "isBestAnswer" and "id" to the result.
  • Method Get Answer and Get Question and Get Questions List was updated allowing the parameter "includeUnpublishedComments"
  • Method Get Questions List was updated allowing the parameter "includeUnpublishedAnswers"
  • Fixed bug with Update Answer method where Source could not be reset
  • The methods Search Questions and Get Similar Questions now allow passing categories and tags as parameters.
  • Added DisplayName as parameter for the Register User and Update User Data methods.
  • Added user as parameter for the Get Questions List in order to filter by question author.
  • The methods Get Question and "Get Featured Question" now returns the categories and tags associated with the question.
  • Returns the result of a vote submitted for an answer or a comment
  • Fixed bug with timestamps where they weren't taking the timezone into account: Badge-date, Answer/Comment-publicationtime, question-publicationtime/latestanswertime
  • Unified the user data returned in these methods: Get Staff Experts, Get Top Experts, Get Users. Now displayName, TotalRank and askQuestionUrl is returned for all as well.
  • Fixed bug where the questions count on the Search Questions method was not correct all the time.
  • Fixed a bug in the method Update Question where if a category parameter is not passed, it would delete the existing categories associated.
  • [Short Question] now returns the parameters displayName and sso_userid as well.
  • The methods Get Top Experts, Get Staff Experts and Get Users all return a TopTags property of the user, apart from the TopCategories that already existed.
  • The method Get User now return the tags the user has earned points also.
  • Renamed "Add User Category Subscriptions" to Add User Subscriptions since both categories and tags can be passed simultaneously now.
  • Renamed "Get User Category Subscriptions" to Get User Subscriptions and the method is now returning categoreis and tags separately.
  • The method Get Featured Expert now returns the points earned for tags, seperately from the categories.
  • The data object [EXPERT] was replaced with [USER] adding a range of extra properties and unifying the user data throughout the methods.
  • The method Get Question now returns the [USER] data object instead of the "author" providing more properties for the user that created the question.

Version 5.7 (No breaking changes)

Version 5.6 (No breaking changes)

  • Added "source" property to answers

Version 5.5 (No breaking changes)

Version 5.4 (No breaking changes)

Version 5.3 (No breaking changes)

  • Added category "externalId" property to all methods returning categories

Version 5.2 (No breaking changes)

Version 5.1 (No breaking changes)

  • Added the methods Get Category, Get Categories and Search Tags
  • Added Question Type parameter (public/private) for all relevant methods
  • Added the parameter ExternalQuestionUrl to the Ask Question method

Version 5 (No breaking changes)

  • Added paging to the methods: "GetQuestionsList", "GetTopExperts" and "GetUsers"
  • All methods accepting category names as parameters now accept also category IDs and category external IDs
  • Added the Get Similar Questions method
  • Added the methods Add User Category Subscriptions and Remove User Category Subscriptions and removed the "Update User Category Subscriptions" (still works for backwards compatibility).
  • Added the method Search Questions
  • Changed boolean values from "yes"/"no" to "true"/"false" (the old values are still accepted for backwards compatibility)

Version 4.1 (No breaking changes)

  • Added “contents” to method Get Question
  • Added “contentUrl” parameter to “Get Questions List” method
  • Added “contentUrl” parameter to “Get Featured Questions” method
  • Added “Post Related Content” method

Version 4.0 (No breaking changes)

  • Added “sso_userid” and "categories" to method Get Question
  • Added “badges” to method Get User

Version 3.9 (No breaking changes)

  • Added “id” and “sso_userid” to all methods returning users
  • Added “details”, “categories”, “followerCount” and “author” to all methods returning a list of questions
  • Changed terminology of Watch Question to Follow Question

Version 3.8 (No breaking changes)

  • Adjust to accept tags as parameters
  • Add sso_userid and userid as parameters to all methods accepting username
  • Make question details on Post Question optional
  • Fix bug when posting a question that required tags to already exist