Skip to content

List topics

Topics

List and filter all topics. Optionally apply some filtering/sorting to find topics matching specific criteria. It's possible to list topics from all categories, or filtered on specific categories. Only the first 10,000 topics matching the filter can be queried, requests for further topics will return a 422 error. IMPORTANT NOTES : 1) using parameters like categoryId and categoryIds simultaneously leads to their merging 2) using categoryId(s) and productAreaIds simultaneously gives OR effect

GET
/topics

Parameters

Query Parameters

q

The search term which will match the title, content. Skipping this parameter will return all topics

Type
string
Example"search-term"
publicIds[]

A list of public ids

Type
string
Example"1""2"
categoryId

Deprecated it's recommended to use categoryIds

Type
string
Example"123"
categoryIds[]

A list of category ids

Type
string
Example"1""2"
productAreaIds[]

A list of product area ids

Type
string
Example"1""2"
contentType

Deprecated, it's recommended to use contentTypes

Type
string
Valid values
"article""conversation""question""productUpdate"
contentTypes[]

A list of topic content types

Type
string
Example"idea""conversation"
tags

A comma-separated list of public tags

Type
string
Example"announcement,official"
moderatorTags

A comma-separated list of moderator tags

Type
string
Example"urgent,trending"
moderationLabels

A comma-separated list of moderation labels

Type
string
Example"checkup,handled"
createdAt

A date range to filter topics based on creation date

Type
object
Example{ "from": "2018-06-20", "to": "2018-12-20" }
lastActivityAt

A date range to filter topics based on last activity

Type
object
Example{ "from": "2018-06-20", "to": "2018-12-20" }
sort

Defines the field to sort the results on. The sort order will be descending. By default the results are ordered by recent activity from most recent to least recent

Type
string
Valid values
"lastActivityAt""createdAt""likes""voteCount""replyCount"
Default
"lastActivityAt"
page

Selects the page to retrieve on paginated responses. Used in combination with the pageSize parameter to paginate over results

Type
integer
Default
1
Minimum
1
pageSize

Limits the number of items returned in a single paginated response. Used in combination with the page parameter to paginate over results

Type
integer
Default
25
Maximum
100
Minimum
1

Responses

Successful response

application/json
JSON
{
  
"result": [
  
  
{
  
  
  
"contentType": "conversation",
  
  
  
"id": "1",
  
  
  
"publicId": "5",
  
  
  
"title": "Some conversation title",
  
  
  
"content": "This is the content of a conversation",
  
  
  
"featuredImage": "",
  
  
  
"publicLabel": "",
  
  
  
"categoryId": "6",
  
  
  
"categoryName": "News",
  
  
  
"tags": [
  
  
  
  
"announcement",
  
  
  
  
"first topic"
  
  
  
],
  
  
  
"moderatorTags": [
  
  
  
  
"urgent",
  
  
  
  
"trending"
  
  
  
],
  
  
  
"moderationLabel": "checkup",
  
  
  
"replyCount": 34,
  
  
  
"likes": 124,
  
  
  
"votes": 124,
  
  
  
"voteSet": [
  
  
  
  
"124",
  
  
  
  
"345"
  
  
  
],
  
  
  
"trashed": false,
  
  
  
"sticky": true,
  
  
  
"bestAnswer": true,
  
  
  
"author": {
  
  
  
  
"id": "7",
  
  
  
  
"username": "awesome_user",
  
  
  
  
"avatar": "http://example.com/avatar123.jpg"
  
  
  
},
  
  
  
"lastContributor": {
  
  
  
  
"id": "7",
  
  
  
  
"username": "awesome_user",
  
  
  
  
"avatar": "http://example.com/avatar123.jpg"
  
  
  
},
  
  
  
"createdAt": "2017-04-10T15:29:06+00:00",
  
  
  
"lastActivityAt": "2017-08-10T16:45:54+00:00",
  
  
  
"status": "published",
  
  
  
"productAreas": [
  
  
  
  
"community",
  
  
  
  
"embeddable"
  
  
  
]
  
  
}
  
]
}

Samples

Gainsight CC Developer Portal