Retrieve Topic Information

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

/services/v2/topic/[topicId].json

You can use the following parameters in your retrieve topic information request:

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

🚧

Permissions & Notes:

  • You must have the Use site permission under Anonymous Roles in the Advanced Editor.

  • You must have the topic's ID to make this request; go to Find a Topic's topicId to learn how to get the topic ID.

  • With the includeOnly parameter set to id and name (/services/v2/topic.json?includeOnly=id,name) to the AnswerHub REST API.

  • We added this request in version 1.6.3.

Sample Request

A GET topic information request for a topic (topicId: 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/topic/7.json"

Sample Response

{
    "id": 7,
    "creationDate": 1545231736000,
    "creationDateFormatted": "12/19/2018 03:02 PM",
    "name": "people",
    "author": {
        "id": 22,
        "username": "confused",
        "realname": "Confused User",
        "reputation": 0
    },
    "usedCount": 108,
    "getImmediateChildren": [],
    "getParents": []
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!